另一个BC30002:类型未定义

发布于 2024-08-30 01:41:34 字数 975 浏览 11 评论 0原文

这就是我所做的...

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

有什么想法吗?

Here's what I've done...

I used wsdl.exe to create a .cs class for my wsdl service connection.
I made a Visual Studio project to compile the .cs into a dll having namespace CalculatorService (CalculatorService.dll).
Successful thus far.

I created an asp.net project added my namespace import:

%@ Import Namespace="CalculatorService" %

I right-clicked on the project, clicked Add Reference, found my .dll, added it, built the project, checked /bin to ensure my dll was there (and it was).

%
'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)
%

All is well LOCALLY while debugging. It found the CalculatorService, connected to it, got the XML and displayed it.

I then wanted to put it on the web so I built and published my project:
under "Copy" - Only files needed to run this application...selected!

Deploying on the web says Type 'CalculatorService.CalculatorService' is not defined.

Here is a link to the live script:
http://vansmith.com/_iaps.wsdl/pub/Default.aspx

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

轻拂→两袖风尘 2024-09-06 01:41:34

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

It seems that some how you are missing the registration of some assembly; and precisely, in this case, the CalculatorService.dll. See if you have added the <%@ Register... > tag in your page that is calling the calculator methods.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文