[英]Windows Application Web service not working

I have upgraded my application from framework 2.0 to 4.0 and with this stated I am also running one web service which is in framework 2.0.


On deploying to the server, I am not able to get the output of the web service while application is running alright


Do I need to upgrade the version of web service too? And any change in app.config file required?


1 个解决方案



The easiest way forward is going to be to upgrade the web service to v4.x as well. Each application pool can only be tied to a single version of the .Net framework. It is technically possible to host a 2.x application inside of a 4.x site, but it will save a lot of trouble in the long term to standardize on a single version of the framework.


As This article describes:


If an IIS Web application that targets the .NET Framework 3.5 or earlier is nested inside an IIS Web application that targets the .NET Framework 4, the compiler might report errors when it compiles the nested application. This is because Web.config files inherit settings from files that are higher in the configuration file hierarchy.

如果面向.NET Framework 3.5或更早版本的IIS Web應用程序嵌套在面向.NET Framework 4的IIS Web應用程序中,編譯器可能會在編譯嵌套應用程序時報告錯誤。這是因為Web.config文件從配置文件層次結構中較高的文件繼承設置。

If you don't want to upgrade the service, your best bet is to prevent web.config inheritance. This blog post has details on a few different ways to accomplish this.




粤ICP备14056181号  © 2014-2021