这就是我所做的...
我使用 wsdl.exe 为我的 wsdl 服务连接创建了一个 .cs 类。我制作了一个 Visual Studio 项目来将 .cs 编译成一个具有命名空间 CalculatorService (CalculatorService.dll) 的 dll。成功至今。
我创建了一个 asp.net 项目,添加了我的命名空间导入:
%@ Import Namespace="CalculatorService" %
我右键单击项目,单击添加引用,找到我的 .dll,添加它,构建项目,检查 /bin 以确保我的 dll 存在(确实存在)。
%
'I called the namespace:'
Dim calcService As New CalculatorService.CalculatorService()
'called the function from the service'
Dim xmlResult = calcService.GetSVS_ItemTable_XML("", "", "", "", "", "")
'printed the result'
Response.Write(xmlResult)
%
调试时一切都很好。它找到了 CalculatorService,连接到它,获取 XML 并显示它。
然后我想把它放在网上,所以我构建并发布了我的项目:在“复制”下 - 仅运行此应用程序所需的文件...已选中!
在网络上部署说“CalculatorService.CalculatorService”类型未定义。
这是实时脚本的链接:http: //vansmith.com/_iaps.wsdl/pub/Default.aspx
有任何想法吗?