简体   繁体   English

在Windows Server 2003上配置Web服务

[英]Configuring web services on Windows Server 2003

We have recently moved from an online hosting provider to a local server and we are currently trying to set up a .net website with web services and are having difficulties. 我们最近已从在线托管提供商转移到本地服务器,并且我们目前正在尝试建立具有Web服务的.net网站,但遇到了麻烦。

We have two websites running on IIS (in Windows Server 2003) - one that is the actual website where we gain input from the user and one which is running the web services where we talk to the database / deal with logic etc... 我们有两个在IIS上运行的网站(在Windows Server 2003中)-一个是我们从用户那里获得输入的实际网站,另一个是在运行我们与数据库进行对话/处理逻辑等的Web服务。

At the moment we can display the main website page but as soon as it accesses the web services it receives the following 404 error: 目前,我们可以显示网站的主页,但是一旦它访问Web服务,就会收到以下404错误:

The request failed with HTTP status 404: Not Found. 请求失败,HTTP状态为404:找不到。

Description: An unhandled exception occurred during the execution of the current web request. 说明:执行当前Web请求期间发生未处理的异常。 Please review the stack trace for more information about the error and where it originated in the code. 请查看堆栈跟踪,以获取有关错误及其在代码中起源的更多信息。

Exception Details: System.Net.WebException: The request failed with HTTP status 404: Not Found. 异常详细信息:System.Net.WebException:请求失败,HTTP状态为404:找不到。

Source Error: 源错误:

Line 1120: >[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://localhost:58605/Dev_GetVersion", RequestNamespace="http://localhost:58605", ResponseNamespace="http://localhost:58605", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] Line 1121: public string Dev_GetVersion() { Line 1122: object[] results = this.Invoke("Dev_GetVersion", new object[0]); 1120行:> [System.Web.Services.Protocols.SoapDocumentMethodAttribute(“ http:// localhost:58605 / Dev_GetVersion”,RequestNamespace =“ http:// localhost:58605”,ResponseNamespace =“ http:// localhost:58605” ,Use = System.Web.Services.Description.SoapBindingUse.Literal,ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]第1121行:public string Dev_GetVersion(){第1122行:object [] results = this.Invoke (“ Dev_GetVersion”,新对象[0]); Line 1123: return ((string)(results[0])); 第1123行:return((string)(results [0])); Line 1124: } 1124行:}

Source File: c:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\Temporary ASP.NET Files\\root\\b0534295\\1f56ee4c\\App_WebReferences.mjxicnrr.0.cs Line: 1122 源文件:c:\\ WINDOWS \\ Microsoft.NET \\ Framework \\ v2.0.50727 \\ Temporary ASP.NET Files \\ root \\ b0534295 \\ 1f56ee4c \\ App_WebReferences.mjxicnrr.0.cs行:1122

Stack Trace: 堆栈跟踪:

[WebException: The request failed with HTTP status 404: Not Found.] System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +431289 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204 IPASWebServices.AccountManagementServices.Dev_GetVersion() in c:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\Temporary ASP.NET Files\\root\\b0534295\\1f56ee4c\\App_WebReferences.mjxicnrr.0.cs:1122 MasterPage.displayVersionDetails() in c:\\www_ipas\\MasterPage.master.cs:46 MasterPage.Page_Load(Object sender, EventArgs e) in c:\\www_ipas\\MasterPage.master.cs:28 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Control.LoadRecursi [WebException:请求失败,HTTP状态为404:找不到。] System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage消息,WebResponse响应,流responseStream,布尔asyncCall)+431289 System.Web.Services.Protocols.SoapHttpClientProtocol .invoke(字符串methodName,Object []参数)+204 IPASWebServices.AccountManagementServices.Dev_GetVersion()在c:\\ WINDOWS \\ Microsoft.NET \\ Framework \\ v2.0.50727 \\ Temporary ASP.NET Files \\ root \\ b0534295 \\ 1f56ee4c \\ App_WebReferences中。 mjxicnrr.0.cs:1122 c:\\ www_ipas \\ MasterPage.master.cs:46中的MasterPage.displayVersionDetails():c:\\ www_ipas \\ MasterPage.master.cs:28系统中的MasterPage.Page_Load(Object sender,EventArgs e)。 Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp,Object o,Object t,EventArgs e)+14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender,EventArgs e)+35 System.Web.UI.Control.OnLoad( EventArgs e)+99 System.Web.UI.Control.LoadRecursive()+50 System.Web.UI.Control.LoadRecursi ve() +141 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627 ve()+141 System.Web.UI.Page.ProcessRequestMain(布尔includeStagesBeforeAsyncPoint,布尔includeStagesAfterAsyncPoint)+627


Version Information: Microsoft .NET Framework Version:2.0.50727.3082; 版本信息:Microsoft .NET Framework版本:2.0.50727.3082; ASP.NET Version:2.0.50727.3082 ASP.NET版本:2.0.50727.3082

I see it's trying to access the web server and then the method ("http://localhost:58605/Dev_GetVersion") but it is leaving out the actual web service name. 我看到它正在尝试访问Web服务器,然后尝试访问方法(“ http:// localhost:58605 / Dev_GetVersion”),但它忽略了实际的Web服务名称。 (It should be "http://localhost:58605/AccountManagementServices.asmx?op=Dev_GetVersion"). (它应该是“ http:// localhost:58605 / AccountManagementServices.asmx?op = Dev_GetVersion”)。

Any idea why it does this? 知道为什么这样做吗? It works perfectly fine on the online web hosting and on the development computer, just not in this new environment. 它可以在在线虚拟主机和开发计算机上完美运行,只是不能在这种新环境中使用。

Make sure the App is running as an account that has the proper rights in IIS. 确保该应用程序作为具有IIS中正确权限的帐户运行。 If unsure, make sure the account the app is running as is in the IIS_WPG group. 如果不确定,请确保该应用程序的帐户正在IIS_WPG组中运行。

Here is more details on properly setting up the IIS App Pool Identity: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/12a3d96c-65ea-4210-96ad-86a801f6a88c.mspx?mfr=true 以下是有关正确设置IIS应用程序池标识的更多详细信息: http : //www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/12a3d96c-65ea-4210-96ad-86a801f6a88c.mspx? mfr= true

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM