I have published both my WCF service and ASP.NET Web application in IIS but i seem to have a problem connecting to the database after publishing. Its like the two cannot see each other. I have tested both and saw that they have been successfully published.
the service reference is referenced in the web application and works as normal when i run the web application locally but not working after publishing.
Is there a setting that i am missing. Both are hosted on IIS.
There is possibility that you are using Windows authentication, I mean if Integrated Security = true in your connection string than make sure your Windows authentication enabled in your IIS.
Do this if this is the case. IIS7: Setup Integrated Windows Authentication like in IIS6
if this is not the case than this answer is helpful for you Change connection string from development to production when publishing
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.