Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 Connecting to a Remote SQL server using ASP.NET

Author  Topic 

jforward5
Starting Member

19 Posts

Posted - 2008-12-17 : 16:13:59
I am having a great deal of trouble trying to make my website connect to a remote instance of SQL Server 2005. I am using the Developer Edition of SQL and the ASP.NET version 3.5. Initially I had the SQL Server local to the IIS and all was well, but due to performance issues I had to move SQL to its own server. I tried all the suggestions about making a user account on the SQL instance running on the remote computer, I even made an account for the web server machine on the SQL Server and gave it exclusive rights to the databases it needs to operate successfully. However nothing seems to work. I tried with trusted connection, I tried with credentials but to no avail. Please if some one knows what i can do to fix this issue I am in need of suggestions.

The web machine is a server 2008 running in 64 bit and the SQL machine is a server 2003 machine in a 32 bit environment. My connection string is:

Data Source=<ServerName>\INTRANETSQL;Initial Catalog=NIRDB;integrated security=True

The error I am getting is:

Cannot open database "NIRDB.mdf" requested by the login. The login failed.
Login failed for user 'GROVES-INC\GISNETWORK13$'

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-12-17 : 16:18:31
I don't understand why it is referencing NIRDB.mdf, when you've specified NIRDB in the connection string. Are you sure that's the latest connection string you've tried and that what you've shown us is the exact error using that connection string?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

jforward5
Starting Member

19 Posts

Posted - 2008-12-17 : 16:24:48
quote:
Originally posted by tkizer

I don't understand why it is referencing NIRDB.mdf, when you've specified NIRDB in the connection string. Are you sure that's the latest connection string you've tried and that what you've shown us is the exact error using that connection string?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog




LOL!!
I fixed it! Thank you for picking my brain with that question Tara! It was very simple. My connection string had the .mdf all I did was remove that and it started working!!

YEY!!
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-12-17 : 17:09:44
Yep, that's why I wanted to see the exact connection string.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -