c# - SQL server connection failed after deploy in IIS? -
below code working fine when coding. publish code in iis , connection failing.
i know, when coding taking window login credentials , in iis taking apppool identity. how can pass windows login credentials connectionstring?
public shared function dbcollection(connectionstring string) databasecollection dim server new microsoft.sqlserver.management.smo.server(connectionstring) homecoming server.databases end function
error:
login failed user 'domain\computername$'. description: unhandled exception occurred during execution of current web request. please review stack trace more info error , originated in code. exception details: system.data.sqlclient.sqlexception: login failed user 'domain\computername$'.
i'd add together @smoore's post lot depends on connection string , configuration of sql server of allowing incoming connections. might set allow sql users, not windows ones looks problem description. can give details of connection string (anonymize/delete user/password before pasting!) , authentication mode allowed sql server instance?
c# asp.net vb.net sql-server-2008
No comments:
Post a Comment