vb.net - provider: SQL Network Interfaces, error: 25 - Connection string is not valid -
i developed application on local computer using vs2012 , sql 2008r2. trying move onto production server. virtual server 2012 sql server. checked properties remote connection , enabled. application opens login screen , once enter username , password (this created on computer using wsat. error: 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: sql network interfaces, error: 25 - connection string not valid) have in web.config:
<connectionstrings> <remove name="localsqlserver" /> <add connectionstring="server=\\events;database=digital signage;integrated security=true" name="dsconnectionstring" /> <add connectionstring="data source=\\events;integrated security=sspi;attachdbfilename=c:\\ds\aspnetdb.mdf;user instance=true" name="localsqlserver" providername="system.data.sqlclient" />
not entirely sure, points may troubleshoot:
- you can use resource this generate appropriate connection string
- i not sure
server=\\events
sounds entirely right - should perhaps replace actual sql instance name here when deploying remotely (either<machine name>
or<machine name>\<instance name>
named instance) - you don't need explicitly state port sql server listening on (if it's still default 1433), keep in mind
- do have anywhere explicitly reference connection string
localsqlserver
in code? if so, have changed reference connection stringdsconnectionstring
before building , deploying? (nb. may better keep connection string entry change value of connection string need sql 2012 instance, rather creating new connection string entry i'm not sure specific use case)