Windows應用程序Web服務無法正常工作

[英]Windows Application Web service not working


I have upgraded my asp.net 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.

我已經將我的asp.net應用程序從框架2.0升級到4.0,並且我已經在框架2.0中運行了一個Web服務。

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

在部署到服務器時,我無法在應用程序運行正常時獲取Web服務的輸出

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

我是否還需要升級Web服務的版本?並且需要對app.config文件進行任何更改?

1 个解决方案

#1


0  

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.

最簡單的方法是將Web服務升級到v4.x.每個應用程序池只能綁定到.Net框架的單個版本。技術上可以在4.x站點內托管2.x應用程序,但從長遠來看,它將節省很多麻煩,以便在單個版本的框架上實現標准化。

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.

如果您不想升級服務,最好的辦法是阻止web.config繼承。這篇博文詳細介紹了實現這一目標的幾種不同方法。


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2014/09/24/7250c310befa9a3f469805feed10a4e.html



 
粤ICP备14056181号  © 2014-2020 ITdaan.com