c# - 从一台电脑复制到另一台电脑后,WebService (.asmx) 功能未显示

标签 c# asp.net web-services

我有一个由 webservices(.asmx) 组成的项目。 关键是当我将该项目从我的一台计算机复制到另一台计算机然后编写一个函数时,发生的事情是它没有抛出任何错误但它没有向我显示我编写的新函数并显示了所有的列表在复制之前声明的函数。

WebMethod代码如下:

[WebMethod]
public string test(string msg)
{
   return msg;
}

在输出选项卡中构建或重建后显示:

1>------ Build started: Project: CabSoftService, Configuration: Debug Any CPU ------
1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1635,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Postcode". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(2151,5): warning MSB3283: Cannot find wrapper assembly for type library "MSDATASRC". Verify that (1) the COM component is registered correctly and (2) your target platform is the same as the bitness of the COM component. For example, if the COM component is 32-bit, your target platform must not be 64-bit.
1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(2151,5): warning MSB3293: Could not resolve dependent COM reference "7c0ffab0-cd84-11d0-949a-00a0c91110ed" version 1.0.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

最佳答案

创建webservice后,必须部署到IIS中,文件可能丢失的原因可能是项目可能没有部署到第二个系统中。如果您采用相同的项目,请始终重建并再次发布

关于c# - 从一台电脑复制到另一台电脑后,WebService (.asmx) 功能未显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30371141/

相关文章:

java - 如果设备将参数作为 .asp 发送到 apache tomcat 服务器,我想在 jsp 页面上访问这些参数

wcf - 在 WCF Web 编程模型中,如何编写具有一组查询字符串参数(即具有相同名称)的操作协定?

java - wsdl 到 java 类

c# - 在 WPF 滚动查看器中的文本框控件上启用滑动滚动

c# - 用随机字节填充列表

c# - 如何在 XAML 中实例化 DataContext 对象

c# - 如何使用HTML输入控件上传文件

asp.net - 将 asp.net 网站从 IIS6 迁移到 IIS7 - 调试差异

asp.net - 在 ASP.NET 中生成 Excel 文件

java - Glassfish:EJB 容器初始化错误