简体   繁体   English

DLLImport调用上的IIS 7.5错误

[英]IIS 7.5 error on a DLLImport call

I have an error running a asmx WebService that uses asp.net 2.0 on IIS 7.5. 我在运行IIS 7.5上使用asp.net 2.0的asmx Web服务时出错。 The webservice calls a method from a dll using the Dllimport call. Web服务使用Dllimport调用从dll调用方法。 The point where the call is made is where the error happens. 进行呼叫的地方就是发生错误的地方。 However I get no exceptions, just ERR_CONNECTIO_RESET from any explorer. 但是我没有例外,任何浏览器都没有ERR_CONNECTIO_RESET。

What i've tried: 我试过的

  • The dll is located in the right place, the bin folder. dll位于正确的位置,bin文件夹。 I tried moving it to system32 and other locations. 我尝试将其移动到system32和其他位置。 However if I change the name of the dll on the DLLIMPORT call i do get an error of not locating the dll, which means it does finds the dll, just crashes on the method. 但是,如果我在DLLIMPORT调用上更改了dll的名称,则会收到未找到dll的错误,这意味着它确实找到了dll,只是在方法上崩溃。
  • I also used GetLastWin32Error() and got the message 127 ERROR_PROC_NOT_FOUND. 我还使用了GetLastWin32Error()并得到了消息127 ERROR_PROC_NOT_FOUND。 Not sure if it's relevant, however is something I tried too. 不知道它是否相关,但是我也尝试过。
  • If I run the Webservice on debug from VisualStudio, I get no error on the call. 如果我通过VisualStudio调试运行Web服务,则调用不会出错。 So the error is when running on IIS. 因此,错误是在IIS上运行时。
  • I also tried on a older machine with IIS 6 on Windows XP and I get no error. 我还在Windows XP上使用IIS 6的旧计算机上尝试过,但没有收到任何错误。 This make me think it has to do with a security issue, because when I created the website on IIS I got this screen: 这使我认为这与安全问题有关,因为当我在IIS上创建网站时,出现了以下屏幕:

IIS 6 IIS 6

And i haven't configurated any security options on IIS 7.5. 而且我还没有在IIS 7.5上配置任何安全选项。 So i tried this 所以我尝试了这个

http://forums.iis.net/post/2119656.aspx http://forums.iis.net/post/2119656.aspx

Which are steps to configure the user with enough permissions over the folder. 这些步骤是为用户配置对文件夹具有足够权限的步骤。 However, still no luck. 但是,仍然没有运气。

What i believe now could be, is something asociated to GOP (Group Policy Object). 我现在所相信的是与GOP(组策略对象)相关的东西。 The pc I'm running this service is on a company network. 我正在运行此服务的PC在公司网络上。 I have admin rights and no firewall restrictions, however I don't know if IIS 7.5 uses something from a different user or needs different permissions. 我具有管理员权限,没有防火墙限制,但是我不知道IIS 7.5是否使用其他用户提供的内容或需要不同的权限。

All the other threads i've found don't have the right answer for me. 我发现的所有其他线程都没有适合我的正确答案。 Any help i could get is appreciated. 我能得到的任何帮助都表示赞赏。

Finally after a week of dealing with this, I found the problem. 经过一周的努力,终于找到了问题所在。 After finding out there are some Logs I could check on C:\\Windows\\System32\\LogFiles\\HTTPERR i found the error code Connection_Abandoned_By_ReqQueue. 找到一些日志后,我可以在C:\\ Windows \\ System32 \\ LogFiles \\ HTTPERR上检查,我发现了错误代码Connection_Abandoned_By_ReqQueue。

After some long investigation, I found out that the message means the program is droping because of memorry corruption (As seen on this post Connection_Abandoned_By_ReqQueue Problems ). 经过长时间的调查,我发现该消息表示该程序由于内存损坏而正在退出(如本文章Connection_Abandoned_By_ReqQueue Problems所示 )。 The dll I'm using is quite old and the people who generated didn't make a version who handles memory the correct way (At least for IIS 7.5), so I'm stuck with finding another library to do that work, or using a server with IIS 6. 我正在使用的dll很旧,并且生成的人没有创建可以正确方式处理内存的版本(至少对于IIS 7.5而言),因此我一直在寻找另一个库来执行此工作或使用具有IIS 6的服务器。

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

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