asp.net - Error connecting to SQL Server via alias from local IIS7 -


just wondering if has run before. had few devs @ this, , none of can figure out.

i have asp.net web forms app connecting sql server db via alias using ef4. alias set point machine name (not "." or "local"). when run out of vs2012, works fine. if deploy local instance of iis7 , try pull in browser, error:

a network-related or instance-specific error occurred while establishing connection sql server. server not found or not accessible. verify instance name correct , sql server configured allow remote connections. (provider: named pipes provider, error: 40 - not open connection sql server)

my connection string looks this:

data source=aliasname;initial catalog=databasename;integrated security=true;multipleactiveresultsets=true 

if change connection string data source machine name instead of alias, works fine iis7. so, problem appears alias , when running out of iis7.

as workaround, using local build profile deploy different web.config doesn't use alias locally, figure out why it's not working.

any advice appreciated.

check this, specifically:

pre-requisites sql server alias usage

  1. you must willing clients connect instance via network protocol. not possible use shared memory connections available when client , instance on same system. use tcp/ip connections aliases.

  2. on system hosting sql server instance must have sql server browser service running (this has start mode set automatic).

  3. on 64-bit system, if have both 32-bit , 64-bit clients, need create alias both 32-bit , 64-bit clients.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -