【问题标题】:Another BC30002: Type is not defined另一个 BC30002:类型未定义
【发布时间】:2010-04-23 20:15:22
【问题描述】:

这就是我所做的......

我使用 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

有什么想法吗?

【问题讨论】:

    标签: asp.net dll types defined


    【解决方案1】:

    您似乎缺少某些程序集的注册;准确地说,在这种情况下,CalculatorService.dll。查看您是否在调用计算器方法的页面中添加了<%@ Register... > 标记。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-07-14
      • 2019-08-31
      • 1970-01-01
      • 1970-01-01
      • 2018-10-30
      相关资源
      最近更新 更多