Connecting TFS to TeamCity - visual-studio

I'm trying to connect my TeamCity project to my TFS project with a free account (a windows live account). But I'm having a little bit a trouble doing this. I'm getting the error TF30063 (You are not authorized to access /DefaultCollection/).
I've tried a lot of things, I even follow the instruction of this question -http://youtrack.jetbrains.com/issue/TW-20909-, but no luck...
I already have:
- Set admin permission to all members to my TFS project
- Put the project on my computer in a public folder
- Checked every url, user and password inputs on the TeamCity config page
- Tested in more than one TFS account
- Checked if all projects were in the same domain
- I've tested in a network that doesn't uses proxy and one that does
Neither of these configuration seem to make a difference... The only lead I have to why this problem is happening is because I'm using the Windows Live (free) TFS account and not a paid licensed one... Can that be it?
Any help would be appreciated... Cheers!
Here is the full error:
Failed for the root 'DimasTeste' #16: TFS failed. ExitCode: 111, command: C:\TeamCity\webapps\ROOT\WEB-INF\plugins\tfs\bin\tfs-native.exe ##C:\TeamCity\temp\TC-TFS-108-6176_396\command.params, in file: {https://budiedimas.visualstudio.com/DefaultCollection/, /user: /password: /hash:S, /noProxy, C:\TeamCity\temp\TC-TFS-108-6176_393.result, GetCurrentVersion}, completed in: 2 second(s)
stdout: TFS Native Verifier v8.0 Copyright (C) 2006-2013 JetBrains s.r.o.
Running under .NET Framework 4.0.30319.18052
INFO -
INFO - Use Team Explorer 2012
INFO -
TFS Native Accessor v8.0 Copyright (C) 2006-2013 JetBrains s.r.o.
INFO - Connecting to server https://budiedimas.visualstudio.com/DefaultCollection/
INFO - WebProxy is disabled
Get current version:
Server='https://budiedimas.visualstudio.com/DefaultCollection/'
Username='dimas_budie#hotmail.com'
ERROR - TF30063: You are not authorized to access https://budiedimas.visualstudio.com/DefaultCollection/.
System.Exception: TF30063: You are not authorized to access https://budiedimas.visualstudio.com/DefaultCollection/. ---> Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException: TF30063: You are not authorized to access https://budiedimas.visualstudio.com/DefaultCollection/.
em Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.EnsureTokenProvider(HttpWebResponse webResponse)
em Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.SendRequest()
em Microsoft.TeamFoundation.Client.Channels.TfsHttpRequestChannel.Request(TfsMessage message, TimeSpan timeout)
em Microsoft.TeamFoundation.Client.Channels.TfsHttpClientBase.Invoke(TfsClientOperation operation, Object[] parameters, TimeSpan timeout, Object[]& outputs)
em Microsoft.TeamFoundation.Framework.Client.Registration.GetRegistrationEntries(String toolId)
em Microsoft.TeamFoundation.Framework.Client.RegistrationProxy.GetRegistrationEntries(String toolId)
em Microsoft.TeamFoundation.Framework.Client.RegistrationService.GetInstanceId()
em Microsoft.TeamFoundation.Framework.Client.RegistrationService.get_InstanceClientCacheDirectory()
em Microsoft.TeamFoundation.Framework.Client.RegistrationService..ctor(TfsTeamProjectCollection tfsObject)
em Microsoft.TeamFoundation.Client.TfsTeamProjectCollection.CreateServiceProxy(Type serviceType)
em Microsoft.TeamFoundation.Client.TfsTeamProjectCollection.GetServiceInstance(Type serviceType, Object serviceInstance)
em Microsoft.TeamFoundation.Client.TfsConnection.GetService(Type serviceType)
em Microsoft.TeamFoundation.Framework.Client.PreFrameworkServerDataProvider.FindServiceLocation(String serviceType, String toolId)
em Microsoft.TeamFoundation.Framework.Client.PreFrameworkServerDataProvider.LocationForCurrentConnection(String serviceType, Guid serviceIdentifier)
em Microsoft.TeamFoundation.Client.TfsConnection.EnsureProviderConnected()
em JetBrains.TeamCity.Tfs.Command.Do() na c:\BuildAgent\work\23f504c63c17dfdf\TfsNativeAccessor\src\Command.cs:linha 28
em JetBrains.TeamCity.Tfs.Program.Main(String[] args) na c:\BuildAgent\work\23f504c63c17dfdf\TfsNativeAccessor\src\Program.cs:linha 143
--- Fim do rastreamento de pilha de exce‡äes internas ---
em JetBrains.TeamCity.Tfs.Program.Main(String[] args) na c:\BuildAgent\work\23f504c63c17dfdf\TfsNativeAccessor\src\Program.cs:linha 438

You should enable alternate credentials (basic authentication) for your account.
http://tfs.visualstudio.com/en-us/news/2012-aug-27/
Go to your profile -> credentials -> enable alternate credentials. Then use them in TeamCity.

Team Foundation Service is supported only on TC 7.1.4+.
Which version are you running?
http://blogs.jetbrains.com/teamcity/2013/02/07/teamcity-7-1-4-build-24331-is-ready/comment-page-1/#comment-38321

Related

Security exception calling DCOM service

We have .Net app running on a Windows Server 2019 VM that is attempting a DCOM call to a service running on Win Server 2012 in our quality assurance environment. We are getting a security error:
System.Runtime.InteropServices.COMException (0x80070721): Creating an instance of the COM component with CLSID {} from the IClassFactory failed due to the following error: 80070721 A security package specific error occurred. (Exception from HRESULT: 0x80070721).
We did some research and identified the following article: https://scomblogs.com/f/a-security-package-specific-error-occurred---runbook-designer
which said that changing HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\Kerberos\Parameters\supportedencryptiontypes from 0x7ffffff8 to 0x7ffffffc resolves the issue. We made this change on the Svr 2019 server and the call succeeded. However our operations team is balking as this will require a change to group policy and allows for weak encryption methods so it is a no-op.
I looked in our Dev environment, where we have a similar configuration as in QA, and everything works fine. I verified that the Kerberos supportedencryptiontypes is set to 0x7ffffff8 in Dev. So this points to a configuration on the calling server and or the server hosting the DCOM service in our QA environment. Can anyone provide any input on how to debug or troubleshoot this issue? Thanks.

TFS 2015 Update 2 TF246018 error creating agent

Have been attempting to remedy this. The only solution I found in googling involves changing the settings for the VM NIC card, however, we use Hyper V and those configuration settings are not available. Currently a TFS 2013 build server resides and operates properly on this machine. TFS operates on another VM, but there appears to be no connection issues for the 2013 versions TFS=>TFSBuild=>TFSDB
Thanks.
Complete Error Message:
C:\Users\svc_tfsbuild\Agent>ConfigureAgent.cmd
Enter the name for this agent (default is Agent-WPTFS05) VS2015U2
Enter the URL for the Team Foundation Server (default is ) http://tfs:8080/tfs
Configure this agent against which agent pool? (default pool name is 'default') VS2015U2
Enter the path of the work folder for this agent (default is 'C:\Users\svc_tfsbuild\Agent\_work')
Would you like to install the agent as a Windows Service (Y/N) (default is N) Y
Enter the name of the user account to use for the service (default is NT AUTHORITY\NETWORK SERVICE) svc_tfsService
Enter the password for user account svc_tfsService:
TF246018: The database operation exceeded the timeout limit and has been cancelled. Verify that the parameters of the operation are correct.
The bug was fixed in TFS 2015 Update 3 This issue was actually caused by a bug which would not allow creation of a build agent with an underscore character in the service name.

Visual Studio 2013.3 publish to azure website via web deploy validate connection fails with no error code

In Visual Studio 2013.3 I have created a test .Net 4.5 C# MVC 5 project to run in an Azure Website. I created a new Azure a/c and logged into it in VS. When I try and publish the project (running VS as Administator) the Validate Connection fails with no error code. I have re-downloaded the Publish settings from Azure to make sure I have the correct publish settings. The message I get is:
(2014-10-27 11:04:13) An error occurred when the request was processed on the remote computer.
The server experienced an issue processing the request. Contact the server administrator for more information.
When I try and publish the project anyway I get the following message:
C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(4270,5):
Error : Web deployment task failed. ((2014-10-27 11:06:25) An error
occurred when the request was processed on the remote computer.)
(2014-10-27 11:06:25) An error occurred when the request was processed
on the remote computer. The server experienced an issue processing the
request. Contact the server administrator for more information.
Publish failed to deploy.
I have installed the latest Azure SDK for Visual Studio 2013 2.4.1 via MS Web Plaform Installer 5.
The online Azure management pages shows the default website running. I'm running Windows 8.1.
One thing I have noticed is that if I change the sitename in the Publish settings I get:
Could not connect to the remote computer [...] The Remote name could
not be resolved.
Also when I try to ping the remote url i.e. [sitename].scm.azurewebsites.net:443 it times out, however, I can access it via a browser.
[UPDATE]
By Changing the output to verbose I get this message:
(2014-10-27 12:28:01) An error occurred when the request was processed on the remote computer.
The server experienced an issue processing the request. Contact the server administrator for more information.
at Microsoft.Web.Deployment.AgentClientProvider.GetHttpResponse(HttpWebRequest request)
at Microsoft.Web.Deployment.AgentClientProvider.PerformHeadRequestHelper(Boolean getVersionInfo, Version& maximumSupportedVersion, Version& minimumSupportedVersion)
at Microsoft.Web.Deployment.AgentClientProvider..ctor(DeploymentProviderContext providerContext, DeploymentBaseContext baseContext, String serverVersion)
at Microsoft.Web.Deployment.DeploymentManager.CreateObjectPrivate(DeploymentProviderContext providerContext, DeploymentBaseOptions baseOptions, DeploymentObject sourceObject, String serverVersion)
at Microsoft.Web.Deployment.DeploymentManager.CreateDestinationObject(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentObject sourceObject, String serverVersion)
at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
at CallSite.Target(Closure , CallSite , Object , Object , Object , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid4[T0,T1,T2,T3](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
at Microsoft.Web.Publishing.Tasks.VSMSDeployObject.SyncTo(VSMSDeployObject destObject, Object syncOptions, IVSMSDeployHost _host)
at CallSite.Target(Closure , CallSite , VSMSDeployObject , VSMSDeployObject , Object , IVSMSDeployHost )
at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid4[T0,T1,T2,T3](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
at Microsoft.Web.Publishing.Tasks.BaseMSDeployDriver.InvokeMSdeploySync()
at Microsoft.Web.Publishing.Tasks.VSMSDeployDriverInCmd.StartSync()
at Microsoft.Web.Publishing.Tasks.BaseMSDeployDriver.SyncThruMSDeploy()
at Microsoft.Web.Publishing.Tasks.VSMSDeploy.Execute()
VSMSDeploy: Publish failed to deploy.
Done executing task "VSMSDeploy" -- FAILED.
Many thanks in advance.
Will
I ran to a similar problem while trying to publish Azure Mobile Service. Finally I managed to get rid of the problem by using MSDeploy.exe with -verb:delete parameter. I cannot provide you with the exact command line for your case, but in my case I've downloaded .publishsettings file from Azure Management portal and then I've run the following command:
set MSDeployPath=C:\Program Files\IIS\Microsoft Web Deploy V3\
"%MSDeployPath%"\msdeploy.exe -verb:delete -dest:ContentPath=<site name here>,PublishSettings=<path to downloaded .publishsettings file here>,AuthType='Basic'
Without .publishsettings file you'd have to deal with detailed parameters: computername, username and password.
After running the above command, I could publish my mobile service from VS.
It turned out to be an issue with the Windows region setting I was using. Apparently the region I was using wasn't supported by the VS publish system and Microsoft hadn't a fall back setup. I posted the question on an MSDN forum and a Microsoft engineer worked out what was going on.

Clickonce application error on mac based windows platform

I developed my application in visual studio 2008 and i deployed it on many computers with windows paltform. Its working fine but there is one mac book who has virtual windows 7 over it. my clickonce appliaction is working fine for the first time on this machine when it is installed. but after closing it when user start it again it is giving the following error. I have googled it but could not find the proper answer. Can anyone help?
PLATFORM VERSION INFO
Windows : 6.1.7601.65536 (Win32NT)
Common Language Runtime : 4.0.30319.296
System.Deployment.dll : 4.0.30319.1 (RTMRel.030319-0100)
clr.dll : 4.0.30319.296 (RTMGDR.030319-2900)
dfdll.dll : 4.0.30319.1 (RTMRel.030319-0100)
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of \\.psf\Home\Desktop\MyApplication.appref-ms| resulted in exception. Following failure messages were detected:
+ Invalid URI: The hostname could not be parsed.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
No phase information is available.
ERROR DETAILS
Following errors were detected during this operation.
* [01/03/2013 10:58:47] System.UriFormatException
- Invalid URI: The hostname could not be parsed.
- Source: System
- Stack trace:
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at System.Uri..ctor(String uriString)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
The answer is explained in the error: "\.psf\Home\Desktop\MyApplication.appref-ms| resulted in exception". It can't parse that as a URL or a network share.
So how are you installing your application? Are you hosting it on a webserver or a fileshare, or taking it on a cd and copying it to the machine and installing it? What is your installation URL in the Publish window for the project properties?

OleDbException (0x80004005): Oracle client and networking components were not found. How can I fix this?

I want to connect with oledb connection(msdaora.dll) in my webapplication to oracle.
I USE :
IIS 7.5
64 bit windows server 2008 r2 enterprise.
64 bit oracle 11g
32 bit oracle client
visual studio 2010
32bit msdaora.dll
my aplication is .aspx
and what is my error :
Server Error in '/PPIGanTT' Application.
--------------------------------------------------------------------------------
Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation.
Provider is unable to function until these components are installed.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation.
Provider is unable to function until these components are installed.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[OleDbException (0x80004005): Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation.
Provider is unable to function until these components are installed.]
System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) +351
System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +86
System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +31
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +76
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +126
System.Data.OleDb.OleDbConnection.Open() +43
csOra.OpenCnn() +47
csOra..ctor(String sTnsName, String sUserId, String sPassword) +273
_Default.Page_Load(Object sender, EventArgs e) +8801
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
what i try before :
1-- in iis, I change the enable32applications to true.
2-- change my connection type from oledb to oracle.data.access but it isnt work too.
3-- I want to find 64 bit msdaora.dll but i cant find it.
What can I do to fix this error?
Thanks.
I had a similar problem. The underlying issue was that my platform target was Any CPU. There were two solutions that worked for me:
Changed the platform target to the CPU of the existing (and only) oracle client you have on the target, x86 in your case, or
Installed the oracle client that was missing, msdora.dll for x64 in your case.
I think IIS is deciding which (x86 or x64) msdora.dll it will use because of the Any CPU platform target compilation. You have to either take away IIS's choice or provide it all the answers.
For me, it was a matter of switching items on the PATH environment variable.
i.e. I placed this : C:\Oracle\product\11.2\bin; before this:C:\Oracle\product\12.1.0\dbhome_1\bin;
These path parts will be different for different companies.
There is then a requirement to remember to switch items on PATH back to use Oracle 12 again.

Resources