Login failure: unknown user name or bad password - authentication

We are running Visual Studio 2012 and Team Foundation Server 2012. In the Team Explorer window, I am able to successfully connect to our TFS environment. However, when I select the Security link under Team Project or Team Project Collection, I receive a message "Team Foundation Server: Login Failure: unknown user name or bad password".
I have not found a log file or anything in any event viewer file that helps debug this problem.
Is there a log file I can search for that contains some 'hints' as to want the connection problem is?
where are your credentials stored on your locale machine that are used to connection team foundation?

We realized that the root cause for this issue is that Visual Studio is trying to open a browser using the same credentials used to connect to TFS. If those credentials are not allowed to run processes on your machine (I suspect in your case it’s domain users on a different domain which is not trusted by the client domain) then opening the browser will fail. That explains why you can hit those URLs using a browser instance that is opened using your own credentials.This will be fixed in a future release of visual studio.

In TFS 2012, the management interface for permissions and project settings has largely shifted to Team Web Access.
Clicking any of the following settings from Team Explorer 2012 will produce the "Logon failure: unknown user name or bad password" error:
•Team Project Collection > Security
•Team Project Collection > Group Membership
•Team Project > Security
•Team Project > Group Membership
•Team Project > Work Item Areas
•Team Project > Work Item Iterations
•Team Project > Project Alerts

I have the same problem. To correct it (temporaly), you must run VS 2012 with this command:
C:\Windows\System32\runas.exe /netonly /user:{domain\loginname} "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe"
Change {domain\loginname} by the domain and login name of your tfs domain account. A console will ask for your password and all works!

I also experienced the same issue with TFS. I found a solution for that. You have to remap your workspaces in your PC or Remote server. If you have any uncommitted changes in your projects, you have to keep backup, otherwise you will lost your changes.
Steps -
Go to Workspaces in Visual Studio
File-> Source Control -> Advanced -> Workspaces
Remove the current workspaces.
Remap the projects again.

I was experiencing the same issue with TFS Express 2012. I don't know if my situation applies to you but here are the facts:
My TFS instance was running on a remote server.
Neither that server or my local machine were on a domain.
I was using the same user account name on both machines but with
different passwords.
Setting the passwords to be same fixed the problem.
The functions that weren't working were the ones that launch the project website, which I could navigate to directly anyway.

Managed to fix the issue myself by mapping a drive to the area where TFS appears to have A cache located - but then I have 2 separate workspaces going across 2 separate domains

Related

VS2019 Cannot launch .NET Core ASP 2 web site and browse from another computer on the same network

I have been trying to browse a website run under IIS Express VS2019 from another computer on the same network. I see the following error.
Bad Request - Invalid Hostname
I found several discussions where people suggested adding bindings and I did try adding so many different bindings in applicationhost.config with specific hostname, IP, hostname+ip, wildcards. When I add any binding or modify the existing localhost binding VS 2019 start giving me the following error
Unable to connect to web server 'IIS Express'
I am running VS2019 as an admin. What else I am missing?
Here is what I discovered. I do not have admin privileges on my local PC. Our sysadmin had created a shortcut for me which launches VS2019 as an admin. However, the VS was still not run as elevated Admin privileges. Turns out, you need to be an admin, and you must right-click the VS2019 shortcut and choose Run As Administrator with a shield and say Yes to the warning. The shortcut wasn't doing none of that. Now my custom IIS Express bindings are picked up from applicationhost.config without any issue.

Why is Remote Desktop Services missing from Group Policy Management in Server 2008?

I have SBS 2008 and my client PC's are not able to RDP to each other. The settings are grayed out due to being joined to the domain.
No prob, right? go into Group Policy Management, and locate this section to make changes:
Computer Configuration\Policies\Administrative Templates\Windows
Components\Remote Desktop Services\Remote Desktop Session Host
Except, shoot!. Windows Components\ Remote Desktop Services is not even in the list! Why is this happening?
You can get to it using Start > Search "gpedit.msc", then go to
Computer Configuration > Administrative Templates >
Windows Components > Terminal Services > Terminal Server > Connections.
It called different things in different systems.
It may be called as Terminal Services.
Right click on "Administrative Templates", select "Add/Remove Templates ..." and verify that the "system" template is there
Right-click Administrative Templates, select Add/Remove.
Remove an item (I removed inetres) and close.
The templates rearranges and expands. At this point Terminal Services should now be listed.
Right-click Administrative Templates and add back the item you removed.
I came across the same issue, and the solution in articles I found was to use an older machine from which to edit the GPO. You'd have to try from a Windows XP or Windows 2003 machine.
However, I didn't have any of those available on the network anymore.
In the end, I deleted the following folder under the policy I was working with, and those settings no longer appear. (There is an ini file in that folder that defines the 3 settings we want to remove.)
\\domain\sysvol\domain\Policies\GUIDOfPolicy\User\Microsoft\RemoteInstall
To find the GUIDOfPolicy, look in GPMC under Details. You will see it as the Unique ID.
Remember to substitute your domain name as you look for this folder.
I was able to clean this up on a policy of mine.
Reference this article for instructions:
https://support.microsoft.com/en-us/help/2722241/policy-reporting-tools-indicate-empty-internet-explorer-maintenance-policy-as-winning
And then remove these instead of the ones listed there:
[{3060E8D0-7020-11D2-842D-00C04FA372D4}{3060E8CE-7020-11D2-842D-00C04FA372D4}]
If
Computer Configuration > Administrative Templates > Windows Components > Terminal Services > Terminal Server
does not appear in
gpedit.msc
then go into
%windir%\system32\GroupPolicy
and rename the
Adm
folder to
Adm-renamed.
Run gpedit.msc and the Adm folder should be recreated correctly and the Terminal Server policies should be visible. You can then delete the Adm-renamed folder.

Error when start new SharePoint project in visual studio 2010

I am a new administrator to a SharePoint farm and I want to start developing web-parts for our sites.
In our company we have installed SharePoint 2010 on Windows Server 2008 R2.
And we have installed Microsoft visual studio 2010 on that server.
We also have Microsoft SQL server management studio installed in the same server.
In my computer (Windows 7 professional), I have used remote desktop connection to access that server.
From SharePoint central administration, I have created new application, new site collection and new site.
I started VS with admin rights.
From File => New => Project =>Visual basic => SharePoint =>2010 => Empty SharePoint project => ok
Then I got a dialog box asking me to enter the local site that I want to use for debugging.
I entered: "http://sharepoint:21029/team1/"
I chose deploy as a farm solution checkbox.
Click Validate.
The problem is:
When I click Validate, I get the following error:
Cannot connect to the SharePoint site: "http://sharepoint:21029/team1/" Make sure that the Site URL is valid, that the SharePoint site is running on the local computer, and that the current user as the necessary permissions to access the site.
I made a lot of searches on the internet and finally I found this link:
http://www.sharemuch.com/2010/03/19/resolving-vs-2010-solution-deployment-issues-for-sharepoint-2010-projects/
When I tried to solve my problem as described in the previous link, I could not find the following databases:
SharePoint_Config
SharePoint_AdminContent_[guid]
SharePoint Site Content DB
Why I could not find the databases in the SQL Management Studio?
And why I get the error?
I want to start developing web-parts in visual studio... Any help please!!
Thank you
I got the solution finally :)
I found this critical in Event Viewer:
SQL database log in for 'SharePoint_Config' on instance 'sharepoint' failed.
I did the following steps and it solves my issue and I can now connect visual studio to my SharePoint site successfully ^_^
Grant correct permissions to the database access account
To resolve this issue, assign the database access account and then verify that the account has correct permission in SQL Server.
To assign the database access account:
On the Central Administration Web page, on the Quick Launch, click Security, and in the General Security section click Configure service accounts.
In the Credential Management section, in the upper drop-down list click the correct Web application pool for your Web application.
In the Select an account for this component drop-down list, click the domain account with which you want to associate this Web application pool, or click Register new managed account to associate a new domain account with this application pool.
Click OK to save changes.
Thank you all
What is team1? a sub site?
Try using the root site collection:
http://sharepoint:21029/
If you install sp in standalone mode read here about the connection string because sp uses an embedded edition of SQL server

SQLExpress connection fails in IIS 7 w/ user instance error - "Failed to generate a user instance

Mainly looking to answer my question #1 below, but more knowledge would be appreciated.
I tried to use these resources during my investigation, but was unsuccessful:
http://social.msdn.microsoft.com/Forums/en/sqldatabaseengine/thread/f5eb164d-9774-4864-ae05-cac99740949b (For this error: Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.)
http://social.msdn.microsoft.com/forums/en-US/sqlexpress/thread/6dfdcc22-7a81-4e8f-a947-c1ce6982d4b3/ (For this error: CREATE DATABASE permission denied in database master. An attempt to attach an auto-named database for file ? failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.)
Questions
1.) Why does this error occur while running the Telerik Rad Controls for ASP.NET AJAX "Live Demos" project with IIS 7 (Running Telerik Live Demos works fine using ASP.NET Development Server with this connection string)
Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.
2.) How is creating a SQL Server Express instances different in IIS 7, from ASP.NET Development Server & SSMSE
3.) Are there certain attributes of a SQL connection string not allowed when running a website on different contexts (based on #2).
Environment:
I'm not running the "Live Demos" .NET 3.5 ASP.NET web application via the ASP.NET Development Server (feature that pops up in your system tray and picks a port for you after clicking play in Visual Studio). That works just fine! I'm running the website on IIS 7. SQL Server Express is using the NETWORK SERVICE user in Control Panel > Administrative Tools > Services > SQL Server (SQLExpress).
Using this connection string provided with the installed "Live Demos" web application demo project:
<add name="NorthwindConnectionString"
connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|Northwind.mdf;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
I've tried setting "User Instance=False", but that just throws another error:
CREATE DATABASE permission denied in database master. An attempt to attach an auto-named database for file ? failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
(where "?" is the path of the *.mdf file - C:\Users\\MyDocuments\Visual Studio 2008\Projects\TelerikDemos\Telerik\RadControls for ASP.NET AJAX Q2 2011\Live Demos\App_Data\Northwind.mdf .. Stack Overflow italics is broken with some of those characters, so I had to remove that path)
Someone answered me on a previous question to set this "User Instance=False", but it appears User instances have nothing to do with whether or not you use SQL Express. User Instances are simply a feature of SQL Express that allows a very unprivileged user to host a database instance in it's own user context.
Note, this Northwind database is stored in an *.mdf file in the App_Data folder (under the "Live Demos" root application directory) along with the *.ldf (log file). I did previously try attaching the *.mdf files as actual databases under the "Databases" folder (in the SSMSE Object Explorer tree), but later removed them.
Web application "Live Demos" root folder (and nested folders/files) have the following users assigned with ALL privileges:
- IIS APPPOOL\Telerik ("Telerik" is the name of my application pool in IIS 7 for this site)
- IUSR
- NETWORK SERVICE
Making a note for myself about this SQLExpress master database query:
SELECT * FROM sys.dm_os_child_instances
Also tried different combinations of *.mdf & *.ldf permissions while also changing the user on the SQL Server (SQLExpress) Windows 7 service (Control Panel > Administrative Tools > Services) .. and also restarted the service after making those changes.
To reproduce:
download the Telerik Rad Controls for ASP.NET AJAX. Set the permimssions I mentioned in the "Live Demos" folder under Program Files\Telerik, change the .NET version of the web application to .NET 3.5, switch out their 3.5 web.config file with the normal web.config file in that folder. You have to use Visual Studio 2010, but I am running this in Visual Studio 2008 (with a little grunt work I did because our company is not yet on VS2010). Also switch out the proper Bin35 assemblies into the "Live Demos" folder Bin folder. Compile the solution. Create an IIS 7 website. Add Windows authentication. Enabled anonymous and Windows authentication.. all others are disabled. Set application pool to use Classic and 32 bit.
Then navigating to this URL and clicking the "First Look" image.
http://localhost/combobox/examples/overview/defaultcs.aspx
====================
More evidence will be provided if requested.
You are using a connection string with trusted authentication = true. This means that the connection uses the security context of the calling process.
When you run with the development server you are running in the security context of the logged in user, so every thing works fine.
When you run in IIS you are in the security context of the application pool process, which is NETWORK SERVICE, which does not have a user profile, therefore it crashes.
You can fix it by either:
Change the identity of the application pool to a normal user with access to the database
Use a connection string with user name and password
IIS doesn't load the Windows user profile, but certain applications might take advantage of it anyway to store temporary data. SQL Express is an example of an application that does this. However, a user profile has to be created to store temporary data in either the profile directory or in the registry hive. The user profile for the Network Service account was created by the system and was always available. However, with the switch to unique Application Pool identities, no user profile is created by the system. Only the standard application pools (DefaultAppPool and Classic .NET AppPool) have user profiles on disk. No user profile is created if the Administrator creates a new application pool.
However, if you want, you can configure IIS application pools to load the user profile by setting the LoadUserProfile attribute to "true".
https://learn.microsoft.com/en-us/iis/manage/configuring-security/application-pool-identities

Connecting BIDS to TFS2010 problem - dialog doesn't allow a path to be specified

I want to attach my BIDs (VS2008) to our Team Foundation Server 2010 to put the project artifacts under source control.
I've installed the Visual Studio 2008 SP1 Forward Compatibility Update for Team Foundation Server 2010 so I get the dialog to attach to the TFS server, but it only asks for the name of the server. When connecting via VS2010 I get the option to add the path as well as the server name which, evidently, is required to connect to our TFS server.
Is the URL/path saved to a solution or project file so I can hack it manually?
The secret is to type the full URL to the TFS project in the dialog box - it just seems to accept it without attempting to parse it.