[SqlException (0x80131904): Cannot open user default database. Login failed.

ImDaFrEaK

Well-known member
Joined
Jan 7, 2006
Messages
416
Location
California
Programming Experience
5-10
I have added a login Control to my site and used the Security Wizard to define Access Rules, Roles, and Users.

When I run this site through VS2005 either by right clicking (view in browser) or just running (w/o debugging enabled) it works every time. No glitches no problems.

When I try to few the same site through IIS I get the follow error message a long with a lot of other stuff.

[SqlException (0x80131904): Cannot open user default database. Login failed.

What is going on?


Also this is really weird.
Now when I try to reach the site instead of the above error message all I get is the Login Error message (You login attempt was not successful. Please try again.)

It's acting like I typed the password or username wrong but believe me I've spent hours on this and i've tried it inside, outside VS2005 and the names and passes are correct. It works everytime inside VS2005 but never through IIS. Please, please help.
 
An error has occurred while establishing a connection to the server. When connecting

I have about had enough with SQL Server and the stupid glitchy Visual Database binding tools. But anyways, I got to get this figured out.

I un-installed, re-installed, configured, re-configured, blah blah blah. I finally got the Login Control to work with my SQL Server 2005 from IIS via the web. That was last night. I got o add a new datatable today via a dataset ect... and after pidling with it for hours managed to get it to work. Then out of the blue, it quit connecting to SQL Server 2005.

I tried several times, rebooted VS 2005, I even removed all my database table, tools, datasets, Login Control, web.config connections strings, everything from my website. Then rebooted my computer. I can't connect to SQL.

I even tried SQL Server Management Studio after a free reboot and it won't connect. I get this error.

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (.Net SqlClient Data Provider)
I am on my quest to remove and re-install SQL now but dang, what is going on? Anyone know what causes this?
 
Back
Top