简体   繁体   English

ASP.NET Web服务项目中的VB6 .dll

[英]VB6 .dll in ASP.NET Web Service project

I got a strange problem recently. 我最近遇到一个奇怪的问题。 I have some VB6 .dll that I must use in my ASP.NET Web Service project. 我在ASP.NET Web服务项目中必须使用一些VB6 .dll。 When I test the .dll in Console application - all works fine - I create an object and can use all methods as it should be. 当我在控制台应用程序中测试.dll时-一切正常-我创建了一个对象,可以使用应有的所有方法。 But when I start to use it in my Web Service I got a strange problem. 但是,当我开始在Web服务中使用它时,我遇到了一个奇怪的问题。 When I'm creating an instance of dll class - it is created (after a long pause) but all properties instead of being nulls (as it happens when I test it in Console Application) in the debugger are set as "Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation". 当我创建dll类的实例时-会创建它(长时间停顿之后),但调试器中的所有属性(而不是null)(在控制台应用程序中测试时会发生)都设置为“功能评估已禁用,因为先前的功能评估超时。您必须继续执行才能重新启用功能评估”。 Something competely strange I've never seen before :) And at the same time in my client application (which actually invokes the service) I'm getting a connection reset. 以前从未见过的非常奇怪的竞争方法:)同时,在我的客户端应用程序(实际上调用该服务)中,我正在重置连接。

Any suggestions? 有什么建议么?

If this DLL was created for a desktop environment, then it may simply not work in a server environment. 如果此DLL是为桌面环境创建的,则它可能根本无法在服务器环境中工作。 It may depend on using a Windows message loop for synchronization, and may not be thread-safe at all (and it needs to be thread-safe in order to use it in a multithreaded server environment like ASMX). 它可能取决于使用Windows消息循环进行同步,并且可能根本不是线程安全的(为了在多线程服务器环境(如ASMX)中使用它,它必须是线程安全的)。

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

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