.NET Won't Connect to Sql Server  
Author Message
MarlAtkins





PostPosted: .NET Framework Data Access and Storage, .NET Won't Connect to Sql Server Top

I'm running SQL Server on a remote machine.

I can connect to it with no problem using Sql Server Enterprise Manager or Query Analyzer.

I recently had to reinstall my operating system and reinstall Visual Studio .NET 2003.
Before doing this I was able to connect to the database from within ASP.NET using the same EXACT connection string I'm using now.

Since I reinstalled the O/S and .NET, none of my .NET applications that connect to Sql Server can connect. I'm not having any problems with connections to MySQL at all.

I'm not having any problems connecting to Sql Server OUTSIDE .NET.

I've made the ASPNET user have full control of the entire Framework 1.1 directory and all its subdirectories and files, as well as all directories and files within the application.

Why does .NET STILL refuse to connect to the database
'Access is denied or the database does not exist'




.NET Development37  
 
 
MarlAtkins





PostPosted: .NET Framework Data Access and Storage, .NET Won't Connect to Sql Server Top

Well, none of my .NET applications will connect to the database.

Not 2003 or 2005, Not ASP or Windows.
The database is Sql Server 2000 and it's on a remote machine.
Until I reinstalled my O/S and both versions of Visual Studio, I had no problems with any of these applications.

What can I do to solve this nightmare



 
 
iamunmad





PostPosted: .NET Framework Data Access and Storage, .NET Won't Connect to Sql Server Top

Can u please give the connection stringu r using. If u are using IntegratedAuthentication then ur user account (that u r using to run the app ) needs to be grant appropriate permission with the Sql Server.

 
 
Paul P Clement IV





PostPosted: .NET Framework Data Access and Storage, .NET Won't Connect to Sql Server Top


As iamunmad mentioned I think we need to provide a little bit more information, such as the type of connection you're attempting to establish with SQL Server. Also, make sure that your web applications are configured for the same level of authentication as before. You may also want to indicate what type of authentication your are using.

If the machine name or your user account changed this could also present a problem as well.