简体   繁体   English

在IIS7中运行C#ASP.net Soap Web服务

[英]Running C# ASP.net Soap Web Service in IIS7

I am currently working on ac# asp.net web project and I am trying to install the soap service to be used in iis7. 我目前正在ac#asp.net Web项目上工作,我正在尝试安装要在iis7中使用的soap服务。

I have used Visual Studio to build a deployment package by selecting Only files need to run the application in the package/publish settings window. 我已使用Visual Studio通过在“程序包/发布设置”窗口中选择“ Only files need to run the application来构建部署程序包。

I have then copied the contents of the built package to a location within my website but when I trying and access the service using http://localhost/EmailSoapService/EmailSoapService.asmx but I am getting an error. 然后,我已将构建包的内容复制到网站内的某个位置,但是当我尝试使用http://localhost/EmailSoapService/EmailSoapService.asmx访问该服务时,却出现了错误。 The error I'm getting is 我得到的错误是

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. 

Parser Error Message: Could not create type 'EmailSoapService.EmailSoapService'.

Source Error: 


Line 1:  <%@ WebService Language="C#" CodeBehind="EmailSoapService.asmx.cs" Class="EmailSoapService.EmailSoapService" %>

Source File: /EmailSoapService/EmailSoapService.asmx    Line: 1 

Version Information: Microsoft .NET Framework Version:2.0.50727.5456; ASP.NET Version:2.0.50727.5456

I don't understand why it is saying it can't find the .cs file. 我不明白为什么它说找不到.cs文件。 Admittedly this isn't on the server but as I selected to only export what's required to run the application, I assume the .cs file isn't required on the webserver. 诚然,这不在服务器上,但是由于我选择仅导出运行该应用程序所需的内容,因此我假定Web服务器上不需要.cs文件。

Thanks for any help you can provide. 感谢您的任何帮助,您可以提供。

A build package typically consists of a "bootstrap" executable that fires up an installer for the package. 构建软件包通常由“ bootstrap”可执行文件组成,该可执行文件会启动该软件包的安装程序。 It sounds as though you copied the package, but didn't install the package, hence the site thinks it needs the core .cs files to accommodate the request. 听起来好像您已复制软件包,但未安装软件包,因此该站点认为它需要核心.cs文件来容纳请求。 You can't just copy the build/deployment package - you typically need to deploy it to the destination server. 您不能只复制构建/部署程序包-通常需要将其部署到目标服务器。

You might find some extra insight here. 您可能会在这里找到一些额外的见解 Hope this is helpful. 希望这会有所帮助。 Good luck! 祝好运!

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

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