使用计算机名称时应用程序请求路由重定向调用失败
我的应用程序中有两台服务器。一个是 Web 服务器,另一个是应用程序服务器。我的 IIS Web 应用程序内的应用程序服务器中有一个静态文件。应用服务器 Web 应用程序通过 Windows 身份验证启用。我已经使用 ARR 创建了 URL 重写,用于具有特定 URL 的调用,以重定向到静态文件。
当我在 URL 中使用 IP 地址并从客户端计算机调用 Web 服务器时,一切正常。当我使用机器名称时,出现 401 错误。
1) 我检查了 IIS 日志 ->当调用失败时,客户端会重复尝试连接 Web 服务器,所有调用都会失败并出现 401 错误。从Web服务器到应用服务器,只调用了一次,就返回了401错误。 2) 调用成功场景时,Web 服务器出现 2 个 401 故障,应用服务器出现 1 个 401 故障。之后,Web 服务器和应用程序服务器均成功调用。
我还检查了失败请求跟踪,但没有获得其他信息。
以下是我在 ARR 网络服务器中的配置。
<validation validateIntegratedModeConfiguration="false" />
<rewrite>
<rules>
<rule name="Reverse Proxy to Test Model" stopProcessing="true">
<match url="^Sample/(.*)" />
<action type="Rewrite" url="http://appserver/{R:0}" />
</rule>
</rules>
</rewrite>
如果需要更多信息,请告诉我。
问候, 马德汉
I am having two servers in my application. One is web server and another is app server. I have a static file in my application server inside my IIS Web Application. App Server web application is enabled with Windows Authentication. I have created URL rewrite using ARR for calls with specific URL to get redirected to the static file.
When I use IP address in my URL and call web server from client machine, things works fine. When I use machine name, I am getting 401 error.
1) I checked on the IIS Logs -> When call fails, repeated attempt was made by client to connect with web server and all calls failed with 401 error. From web server to app server, call was made only one and it returned 401 error.
2) When call success scenario, two 401 failure in web server and one 401 failure in app server. after that one success call in both web server and app server.
I also checked on Failure Request Tracing and didn't get additional information.
Below is the configuration I have in web server for ARR.
<validation validateIntegratedModeConfiguration="false" />
<rewrite>
<rules>
<rule name="Reverse Proxy to Test Model" stopProcessing="true">
<match url="^Sample/(.*)" />
<action type="Rewrite" url="http://appserver/{R:0}" />
</rule>
</rules>
</rewrite>
Let me know if more information is required.
Regards,
Madhan
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
上述问题是由于 Kerberos 问题造成的。我们针对 Web 服务器在应用程序服务器中注册了所访问 URL 的运行时帐户(基本上是运行虚拟应用程序的应用程序池帐户)的 SPN。此后,应用程序服务器接受调用并返回所需的响应。
The above issue was due to a Kerberos issue. We registered the SPN for the runtime account of the accessed URL (basically the Application Pool account in which Virtual Application is running) in the application server against the web server. After this, calls were accepted in the application server and required response was returned back.