ASP.NET: Can't connect to SQL Server database after uploading to server
I'm trying to upload my asp.net site to my HostGator windows server. I'm having a problem connecting to the SQL Server database in my App_Data
folder. It's giving me the error:
Login failed for user 'PSS004\IWPD_353([UserName])'.
I use Windo开发者_C百科ws Authentication in Visual Studio 2010 to access the database and view the site just fine locally. Is that causing a problem? If so how do I set up a user/pass to use when accessing the database file once it's on my hosting server?
If any further information is needed that I left out just let me know.
Thanks!
When you run the code from your webserver, its most likely using a network service account (and hence windows auth wont work). Add a user account to sql server and change the connection string to use sql auth instead and that should fix it
精彩评论