Monday 15 February 2010

sql server - Unable to access database on different subnet from IIS application -



sql server - Unable to access database on different subnet from IIS application -

i have web server in dmz on different vlan , subnet trusted network. web server must communicate database server on trusted network, appropriate firewall rules have been applied. able connect database web server using powershell , using odbc info source administrator snapin. however, running iis application throws next error:

a network-related or instance-specific error occurred while establishing connection sql server. server not found or not accessible. verify instance name right , sql server configured allow remote connections. (provider: sql network interfaces, error: 26 - error locating server/instance specified) inner exception: source: .net sqlclient info provider

i using same connection string in web.config file of iis application 1 utilize in powershell, connects without issue. here connection string web.config:

"data source=192.168.1.xxx\sqlexpress;database=mydb;uid=myuserid;password=mypassword;integrated security=false;"

the difference in powershell connection string not specify provider. if leave out of web.config there no difference.

i have disabled firewalls on both servers test purposes, still same error.

as ping , tracert web server database server finish , able connect via powershell , odbc info source administrator, have no thought why iis application cannot connect.

is tcp/ip protocol enabled database instance?

on machine database instance installed, go start -> ms sql server 20xx -> configuration tools -> sql server configuration manager.

there go 'sql server network configuration' -> 'protocols sqlexpress'. check tcp/ip enabled (by default disabled).

sql-server iis networking

No comments:

Post a Comment