如果已经解决,我道歉。我已经阅读了几个类似的问题,但却找不到任何与我遇到的情况相似的内容,或者是针对在这种情况下未使用的特定技术。
我有一个Web应用程序(后端有HTML,JavaScript,VB.NET)。这个应用程序使用了我在开始之前编写的内部DLL。内部DLL也使用第三方DLL。第三方DLL应该执行与处理.dbf数据库文件相关的几个函数。
当我在本地设置所有内容(Visual Studio 2013,IIS Express)时,一切都运行良好。我可以输入我的标准,我的代码执行它应该做的事情,最终调用我们的内部DLL,DLL通过它的例程,最终调用第三方DLL,结果返回并显示在浏览器中,正如人们所期望的那样。但是,当我在IIS中的Web服务器上设置它时,出现了问题。
我现在使用IIS 8.5在Server 2012 R2上设置了应用程序。我已在本地计算机上复制了目录结构,并进行了调试以确保正在使用正确的路径并检查了文件权限。无论如何,当我启动网络应用程序时,我会做出选择,但应用程序会卡在等待屏幕上。
虽然我实际上无法在Web服务器上进行调试,但我已经能够通过放置" MsgBox("测试")和#34来跟踪问题到何时调用第三方DLL ;沿着代码路径,直到它停止抛出有关在客户端代码(或类似的东西)中显示服务器端消息的错误。错误在第三方DLL调用时停止。我已经运行了几个Fiddler跟踪,并且最终到达第三方DLL的对我的函数的调用永远不会收到响应。
以下是该通话的属性:
对我来说,似乎服务器永远不会响应来自DLL的数据。除此之外,如果我去网络服务器并尝试删除应用程序的目录,它会告诉我第三方DLL无法删除,因为它正在被w3wp.exe使用。
这一切似乎都表明服务器正在访问第三方DLL,但却挂在某处。我知道在不知道我们的网络服务器或代码本身的设置的情况下很难确定确切的问题,但有没有人知道我可能检查的东西?权限似乎没问题,我可以在IIS日志或Windows系统日志中找到错误。我想可能是防火墙,但我试图从网络服务器本身的浏览器上运行它。是否有某种方法可以允许DLL中可能出现的任何消息通过,或者某些工具可以更详细地捕获正在发生的事情?这更可能是配置问题还是代码问题?
任何帮助将不胜感激!提前谢谢!
更新:在Fiddler日志中找到一些可能有用的信息,但我不知道该怎么做。也许知道Fiddler比我更好的人会知道这对于原始问题意味着什么。
-= Fiddler Event Log =-
16:06:25:8250 HTTPSLint> Warning: ClientHello record was 508 bytes long. Some servers have problems with ClientHello's greater than 255 bytes. https://github.com/ssllabs/research/wiki/Long-Handshake-Intolerance
16:06:25:8280 !SecureClientPipeDirect failed: System.Security.Authentication.AuthenticationException A call to SSPI failed, see inner exception. < The certificate chain was issued by an authority that is not trusted on pipe to (CN=osce11.icrc.trendmicro.com, O=DO_NOT_TRUST, OU=Created by http://www.fiddler2.com).
16:06:25:9110 HTTPSLint> Warning: ClientHello record was 508 bytes long. Some servers have problems with ClientHello's greater than 255 bytes. https://github.com/ssllabs/research/wiki/Long-Handshake-Intolerance
16:06:25:9110 !SecureClientPipeDirect failed: System.Security.Authentication.AuthenticationException A call to SSPI failed, see inner exception. < The certificate chain was issued by an authority that is not trusted on pipe to (CN=osce11.icrc.trendmicro.com, O=DO_NOT_TRUST, OU=Created by http://www.fiddler2.com).
16:06:29:9998 [Fiddler] No HTTPS request was received from (chrome:6568) new client socket, port 61029.
16:06:37:1810 [Fiddler] No HTTP request was received from (chrome:6568) new client socket, port 61026.
16:06:37:1810 [Fiddler] No HTTP request was received from (chrome:6568) new client socket, port 61025.
16:06:37:1810 [Fiddler] No HTTP request was received from (chrome:6568) new client socket, port 61024.
16:06:37:1810 [Fiddler] No HTTP request was received from (chrome:6568) new client socket, port 61023.
16:06:37:1810 [Fiddler] No HTTP request was received from (chrome:6568) new client socket, port 61022.
16:06:38:3785 !SecureClientPipeDirect failed: System.Security.Authentication.AuthenticationException A call to SSPI failed, see inner exception. < An unknown error occurred while processing the certificate on pipe to (CN=osce110-en.fbs10.trendmicro.com, O=DO_NOT_TRUST, OU=Created by http://www.fiddler2.com).
16:06:25:8250 HTTPSLint> Warning: ClientHello record was 508 bytes long. Some servers have problems with ClientHello's greater than 255 bytes. https://github.com/ssllabs/research/wiki/Long-Handshake-Intolerance
16:06:25:8280 !SecureClientPipeDirect failed: System.Security.Authentication.AuthenticationException A call to SSPI failed, see inner exception. < The certificate chain was issued by an authority that is not trusted on pipe to (CN=osce11.icrc.trendmicro.com, O=DO_NOT_TRUST, OU=Created by http://www.fiddler2.com).
16:06:25:9110 HTTPSLint> Warning: ClientHello record was 508 bytes long. Some servers have problems with ClientHello's greater than 255 bytes. https://github.com/ssllabs/research/wiki/Long-Handshake-Intolerance
16:06:25:9110 !SecureClientPipeDirect failed: System.Security.Authentication.AuthenticationException A call to SSPI failed, see inner exception. < The certificate chain was issued by an authority that is not trusted on pipe to (CN=osce11.icrc.trendmicro.com, O=DO_NOT_TRUST, OU=Created by http://www.fiddler2.com).
16:06:29:9998 [Fiddler] No HTTPS request was received from (chrome:6568) new client socket, port 61029.
16:06:37:1810 [Fiddler] No HTTP request was received from (chrome:6568) new client socket, port 61026.
16:06:37:1810 [Fiddler] No HTTP request was received from (chrome:6568) new client socket, port 61025.
16:06:37:1810 [Fiddler] No HTTP request was received from (chrome:6568) new client socket, port 61024.
16:06:37:1810 [Fiddler] No HTTP request was received from (chrome:6568) new client socket, port 61023.
16:06:37:1810 [Fiddler] No HTTP request was received from (chrome:6568) new client socket, port 61022.
16:06:38:3785 !SecureClientPipeDirect failed: System.Security.Authentication.AuthenticationException A call to SSPI failed, see inner exception. < An unknown error occurred while processing the certificate on pipe to (CN=osce110-en.fbs10.trendmicro.com, O=DO_NOT_TRUST, OU=Created by http://www.fiddler2.com).
答案 0 :(得分:1)
好的,现在答案已经超过一天了,所以我会回到“任何帮助”条款 - 我不确切知道发生了什么,但也许我的一些“我会尝试的”可能帮助你。
首先,它听起来像是权限问题,但可能是与文件权限相对的策略。您的IIS应用程序池是使用域帐户还是本地服务帐户?如果它正在运行本地服务帐户,请确保您的本地计算机正在为其应用程序池使用相同的服务,并且该服务帐户的本地策略在您的PC上设置为与服务器上相同。
文件在哪里?您提到了一个DBF文件,您的PC本地驱动器和服务器的网络驱动器是否可以?有时,这可能会导致真正的头痛,NTLM多跳等。如果您的文件是本地的,并且服务器是网络的,请尝试将文件移动到同一网络驱动器。
如果您在服务器上为应用程序池使用域帐户,请在本地计算机上为应用程序池使用相同的域帐户,并再次确保该策略在您的计算机上授予与在服务器。
如果没有解决这个问题,我会查看内部DLL,并记下对第三方DLL所做的所有调用的API签名。然后我会创建两个存根 - 一个是对第三方DLL(带有一些虚拟值)进行相同调用的线束,另一个是模仿第三方DLL但只返回一些固定的虚拟数据,或者可能是一些虚拟数据像嵌入在其中的用户名等诊断内容。然后我会一起确保你可以进行简单的调用,每一半都按预期工作。当这一切都很好时,使用你的线束测试服务器上的第三方DLL,它是否运行?如果是这样,尝试将您的线束挂钩到一个简单的ASP页面,看看是否可以使用IIS应用程序池使用简单的情况来练习第三方DLL。还可以尝试使用您的线束使用应用程序池在服务器上运行存根,并验证所运行的用户上下文。
了解有关您拥有的身份验证基础结构的更多信息 - 使用本地服务帐户的位置以及使用的域帐户在哪里,您使用的是NTLM,委派约束,Kerberos,模拟等。不要发布帐户名称等详细信息,只有DomainAcct1,DomainAcct2等
顺便说一下,我以前一直在你的鞋子里,它很糟糕,你有我的同情: - )
答案 1 :(得分:0)
感谢罗伯特的评论,我相信我已经找到了问题所在!
我在本地计算机上安装了完整版本的IIS,而不是IIS Express,并将其设置为与Web服务器上的一样。一个有趣的事情发生了,我得到了与我在服务器上看到的相同的结果。并非IIS本身有帮助,但它允许我将Identity设置为ApplicationPoolIdentity,而我相信IIS Express必须使用我的Windows凭据。
无论如何,我尝试了应用程序池的所有内置身份,但没有一个工作,所以我将其设置为使用我的Windows域凭据,它工作。从那里我将应用程序池设置回使用ApplicationPoolIdentity并修改了文件夹权限,直到它工作。
事实证明,我需要做的就是给用户组修改权限。
再次感谢!