Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jul 01, 2011 09:40 AM by Sathesh_Pandian
Jun 23, 2011 07:25 AM|LINK
i am facing some problems when i am trying to deploy the MVC3 application in IIS. This application is developed on database first approach.
Its working fine in IIS express and also working fine with visual web developer express.
its throwing error when i have tried to deploy it on production server.
The configurations are same. IIS 7.5, sql server 2008.
i have added the _bin_deployableAssemblies so that it would not miss any dlls.
Everything fine except when its calling the dbcontext.
Please give me some solution for this.
Jun 23, 2011 07:29 AM|LINK
Could you perhaps give us the errormessage? Otherwise its impossible to locate the problem
Jun 23, 2011 08:37 AM|LINK
Jun 23, 2011 08:46 AM|LINK
You need to set the username and password in the connectionstring or allow that user to connect to the sql server.
When you run it in IIS Express it is executed as yourself, but when you deploy it runs as the user set on the applicationpool
Jun 23, 2011 08:48 AM|LINK
can you provide me the sample connectionstring?
Jun 23, 2011 08:52 AM|LINK
If you just remove "Integrated Security=true" and add "User ID=xxx;Password=xxx" instead it should work
That is the userid and password of the sql server user.
Jun 23, 2011 08:57 AM|LINK
i used it already and still its throwing the same error.
Jun 23, 2011 09:09 AM|LINK
It says "Login failed".
Either there is wrong username/pass combination. OR the user don't have access to the SQL Server. It is as easy as that.
But since the errormessage say that it is using the applicationpool user i suspect you dont have userId/password in the connectionstring
Jun 23, 2011 11:34 AM|LINK
its not related to either sql server or asp.net.
This is issue happened only in MVC3
Jun 23, 2011 12:07 PM|LINK
I think you are wrong, the login still fail according to the errormessage. How does your connectionstring look like?