Click here to Skip to main content
15,905,419 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using Microsoft dynamic Nav 2009 R2.. I have published my web application in IIS 6.0. Now when i attempt to access my web application from iis..i get an error " The login failed when connecting to SQL Server KRISHAB-PC. " is it that something is missed in web.config or during configuration of iis??? ny help..
Posted

1 solution

It sounds as though you didn't change your connection string when you published the website. I also suspect your connection string uses a Trusted Connection instead of a username and password.

When published, your website code runs as the ASP.NET service account by default, no longer as you when you run it from inside Visual Studio.

You have two options.

Either change the account that the website is using to run your code to an account trusted by the SQL Server or change your connection string to use a username and password specified account instead of Trusted Connection.

What is not optional is that you have to do some research and teach yourself about IIS, Windows and SQL Server security models, along with what impacts they have on your connection string.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900