Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot connect to SystemDSN ODBC datasource IIS 7

Tags:

iis-7

odbc

I have configured odbc datasource as System DSN. It works fine by itself and from Visual studio.

When I try to start applicattion under the IIS 7 on connection I get an error:

ERROR [08001] [Microsoft][SQL Server Native Client 10.0]Named Pipes Provider: Could not open a connection to SQL Server [5].

ERROR [HYT00] [Microsoft][SQL Server Native Client 10.0]Login timeout expired

ERROR [08001] [Microsoft][SQL Server Native Client 10.0]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.

like image 523
SpoksST Avatar asked Dec 05 '25 13:12

SpoksST


1 Answers

IIS Application runs as different user - this user has no access premonitions to somewhere that ODBC uses.

I changed ApplicationPool identity to ran as administrator - this solved my problem. This was the fast solution. At least this is dirrection to dig. :)

like image 198
SpoksST Avatar answered Dec 07 '25 17:12

SpoksST



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!