In Visual Web Developer 2005 Express if I connect to the database and view some table data I can do that fine but then as soon as I try to view a page in the browser I get the error:
Login failed for user 'MachineName\ASPNET'
If in web developer I go to the database explorer and close the connection to the database then refresh the page it all works fine.
Anyone have anyideas on how to correct this?
Thanks
Scott
This is a frequently asked issue The login 'MachineName\ASPNET' is used by IIS when your website trying to connect to SQL with Window Authentication (Integrated Security=SSPI). So in this case just add the account to SQL Server Logins with proper database permissions, which can be easily done in Management Studio: go to Security->Logins->right clich and choose add login->add the Windows account 'MachineName\ASPNET' and give it permissions (or simply add it to sysadmin server role). You can download Management Studio Express from here:
http://msdn.microsoft.com/vstudio/express/sql/download/
No comments:
Post a Comment