Cannot open user default database. Login failed. Login failed for user 'DOMAIN\User'. (.Net SqlClient Data Provider)

Hi when i try and open a database in sql server management studio i get the error "Cannot open user default database. Login failed. Login failed for user 'DOMAIN\User'. (.Net SqlClient Data Provider)", what can i do to rectify this, i have googled around and still havent found no answers.

1
Pmillio
4/16/2008 9:57:28 AM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

4 Replies
5107 Views

Similar Articles

[PageSpeed] 55

Which authentication mode is your Sql Server configured - MixedMode, Windows Authentication or Sql Server Authentication?

Please refer to http://msdn2.microsoft.com/en-us/library/ms366351.aspx and http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx

 

 


Please click "Mark As Answer" if this hepled in solving your problem.
0
sudipta
4/16/2008 1:41:36 PM

Make sure your Windows account is defined as a user in the database you try to open, or change your connection in Management Studio to use SQL Server authentication, and use a login with sufficient permissions to open the database.


If this answered your question, be sure to mark it as the answer. Then you give credit to people who help you, and others will know that the question is already answered.
My SQL Server blog (swedish): http://www.underlandet.com/SqlServer
0
BlogPortalist
4/16/2008 2:14:52 PM

Hi, the problem is this login was working with it before, then all of a sudden it stopped, what steps do i need to take in orer to change the connection in management studio, thanks.

0
Pmillio
4/16/2008 2:25:52 PM

When you open Management Studio, you get a "Connect to server"-dialog. There you can change from "Windows Authentication" to "SQL Server Authentication", which should allow you to login with for example the SA-account to get you permissions to open the database you want.


If this answered your question, be sure to mark it as the answer. Then you give credit to people who help you, and others will know that the question is already answered.
My SQL Server blog (swedish): http://www.underlandet.com/SqlServer
0
BlogPortalist
4/17/2008 7:00:40 AM
Reply:

Similar Artilces:

Login failed for user 'Bachelorplace'. The user is not associated with a trusted SQL Server connection. (.Net SqlClient Data Provider)
please tellme how to resolve this error, i m using server studio management tool. and trying to connect using sql server authentication. my pc is over a domain.   Login failed for user 'Bachelorplace'. The user is not associated with a trusted SQL Server connection. (.Net SqlClient Data Provider)  check whether that sql server is allowing sqlauthentication or not.select that server -> right click it-> select  properties  -> in the window, select security -> check what is the server authentication. it should be  sqlserver and windows authentica...

Cannot open user default database. Login failed. Login failed for user 'KONTORET\ASPNET'.
Hi all I get the above error when i try to  open http://localhost/Beerhouse. This is what i have done:Opened the TheBeerHouse.sln in WWD and copyed the website to my http://localhost/BeerhouseIIS and SQL Experss is running.I am logged in as Administrator. It works fine when i run F5 in the orginal solution, but i want to publish it to my localhost. TIA   First, try detaching the database in Visual Studio (by right clicking on it). If that doesn't help, try deleting the database log file (it will be re-created automatically). Jos Jos Branders: First, try detaching ...

Cannot open user default database. Login failed. Login failed for user 'Server\Username'... again
I have been working for a few month on a project, when suddenly I can not access the local database I use for testing. Here are some details:Microsoft Visual Studio, C# application, The database is in the folder "App_Data," gets attached automatically, and is accessed using Windows authentication, and hence, no user accounts were created explicitely. Connection string:<add name="ASPNETDBConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True" providerName="Sy...

Cannot open database requested in login 'sql'. Login fails. Login failed for user '\ASPNET'.
I am using the MSDE to connect to my ASP.NET application. I get this error after clicking the login button of my login page. Anyone know why this would happen? Thanks for any help, Cannot open database requested in login 'DataSQL'. Login fails. Login failed for user 'server\ASPNET'.Thank youJackxxx I thought i shold add that when this was on the development PC the database was named DataSQL. On the new PC it is DataSQL2, so I'm not sure why the error shows DataSQL. Thanks,Thank youJackxxx What are the contents of your connection string? Where is it stored? TerriTerri MortonE...

Cannot open database "DataBase" requested by the login. The login failed.Login failed for user 'User\ASPNET'.
hi all, i am having my asp.net project and database is in same system. in web.config i diclaire my connection string as <add name="MyWebConString" connectionString="Data Source=AIPL069\SQLEXPRESS;Initial Catalog=MyWeb;Integrated Security=True" providerName="System.Data.SqlClient"/> when i login application i got an error error is Server Error in '/MyWeb' Application. Cannot open database "MyWeb" requested by the login. The login failed.Login failed for user 'AIPL069\ASPNET'. Description: An unhandled exception...

Cannot open database requested in login 'database'. Login fails. Login failed for user 'webuser'.
I am getting the following error from a previously working asp.net application Cannot open database requested in login 'fieldservice'. Login fails. Login failed for user 'webuser'. I checked the connection string dim myconn as sqlconnection=new sqlconnection("server=milkman;uid=webuser;pwd=xxx;database=fieldservice"), and it is the same as another application that is still working. I am able to use query anaylizer and connect to the db and run the query that is attempting with this information so I am lost. Anyone out there got any ideas? Thanks, Justin T...

Cannot open database requested in login 'dbName'. Login fails. Login failed for user 'machineName\ASPNET'
Been looking through the forums for a solution to this problem.I already tried granting access through statements such as:exec sp_grantloginaccess N1'machineName\ASPNET'But they don't seem to work.. i vaguely remember seeing somewhere a DOS command line statement that grants access to the ASPNET_WP and that fixed my problem before on another computer.. but this is a new computer and i forgot to write down the command.Can anyone help explain and propose a solution to my problem. Many thanxs. osql -E -S InstanceName -C -Q "sp_grantlogin 'computer\ASPNET'" osql -E -S InstanceName -d database ...

Error: Cannot open database requested in login 'projectAllocations'. Login fails. Login failed for user 'sa'.
Hi, Im getting this error when attempting to retrieve data from an sql database. 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.SqlClient.SqlException: Cannot open database requested in login 'projectAllocations'. Login fails. Login failed for user 'sa'. Source Error: Line 13: objConn = New SqlConnection( "Server=LAB303-066\NETSDK; Database=projectAllocations; User ID=sa;Password=mypas...

Cannot open database requested in login 'Portal'. Login fails. Login failed for user 'JAY\ASPNET'.
Guys, I've been beating my head with this. Please help. Let me see if I can explain. I'm running the IBuySpy Portal self install utility. It used to fail and say could not find SQL server, but after someone posted that you need to enable TCP/IP it has gotten further. Now, it will bring up a dos prompt and it looks like it tries to create the database. It errors our saying Could not add aspnet user to database: Cannot open database requested in login 'Portal'. Login fails. Login failed for user 'JAY\hawkswim32'. I looked at the output when it was installing the datab...

Cannot open database requested in login 'AstraTrain'. Login fails. Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. "
Hi I just made some changes to my Website.... I configured my website to run under SQL server authentication....so i created an user under SQL server named it "sqltestapp".Then I was trying to connect to the database using this user account. So I made theconnection string as <add name="AstraTrainConnectionString" connectionString="Data Source=ITAPPDEV;Initial Catalog=AstraTrain;User id=sqltestapp; password= sqltestapp;Integrated Security=false"providerName="System.Data.SqlClient" />Now I am using  SQL authentication to connect to the ...

Error: Cannot open database requested in login 'dbname'. Login fails. Login failed for user 'NTAUTHORTY\NETWORKSERVICE
HI all when I was trying to host a website I got the following error Cannot open database requested in login 'dbname'. Login fails. Login failed for user 'NTAUTHORTY\NETWORKSERVICE Previously I got an error Login failed for user 'NTAUTHORTY\NETWORKSERVICE so I ran sp_grantlogin 'NTAUTHORITY\NETWORKSERVICE' in query analyzer.When I wet through the page once again I encountred the error  Cannot open database requested in login 'dbname'. Login fails. Login failed for user 'NTAUTHORTY\NETWORKSERVICEpls help me!!!Thanks in advance.... Ravi Chilakamart...

Cannot open database requested in login "database". Login fails. Login failed for user 'TAMILARASI\ASPNET'
Hi, I have a big problem with accessing asp.net application with sql server express database in IIS. Normally my application working fine but some time i got the error like "Cannot open database requested in login "database". Login fails. Login failed for user 'TAMILARASI\ASPNET'. " i already gave permission for ASPNET account by calling stored procedure "exec sp_grantlogin 'TAMILARASI\ASPNET'  my connection string is<remove name="TranslationConnectionString"/> <add name="TranslationConnectionString" connectionStri...

Cannot Open Database "XXXX" requested by login. The login failed. Login failed for user 'xxx'
hi,  so i have a new box and I'm trying to get my websites and SQL Server 2005 Standard Edition working on it, but the pages give me the following error when I try to load them: "Cannot Open Database "XXXX" requested by login.  The login failed.  Login failed for user 'xxx'" Everything seems exactly the same settings and user-wise from my old box to my new one, but nevertheless everything I've tried gives me the same error. I've tried creating new users in SQL Server and giving them appropriate permissions to my database.  I've even tried just using the buil...

Cannot open database "Noddy" requested by the login. The login failed.Login failed for user 'ANOTHER\asmith'.
Hi   Using Visual Studio 2005, SQL Server 2005.   I am trying to implement error trapping in my first asp.net application.   I want to error trap database being offline so I took the database offline.   Therefore when I tried to login into my application I was expecting to get an error such as   Exception Details: System.Data.SqlClient.SqlException: Cannot open database "CRM" requested by the login. The login failed.Login failed for user 'CSLSYSTEMS\ywhittaker'.     Then in the Web.config file, I included the following code    &nb...

Web resources about - Cannot open user default database. Login failed. Login failed for user 'DOMAIN\User'. (.Net SqlClient Data Provider) - asp.net.sql-datasource

Resources last updated: 1/7/2016 8:14:56 PM