简体   繁体   English

IIS 500中的asp.net与WCF请求管道错误

[英]asp.net vs WCF request pipeline in IIS 500 error

Using .net 4.0 , IIS 7.4 Windows Server 2008 R2 使用.net 4.0,IIS 7.4 Windows Server 2008 R2

I have an asp.net application that sits between WCF web services and routes the requests according to some rules. 我有一个位于WCF Web服务之间的asp.net应用程序,并根据一些规则路由请求。

The iis error page setting is set to 'Detailed errors for local requests and custom ....' iis错误页面设置设置为“本地请求和自定义...的详细错误”。

the asp.net routing service calls the WCF service using HttWebRequest object. asp.net路由服务使用HttWebRequest对象调用WCF服务。

I am getting an iis html error response when wcf service throws a fault exception. wcf服务引发错误异常时,我收到iis html错误响应。

but i get a proper IIS 500 error with a proper soap response when i call the service directly (without the router) 但是当我直接致电服务(没有路由器)时,我得到了正确的IIS 500错误,并带有正确的肥皂响应。

I know i can fix it by changing IIS error page setting, but i dont want to do that since it would expose my non wcf errors. 我知道我可以通过更改IIS错误页面设置来修复它,但是我不想这样做,因为它会暴露我的非wcf错误。

question is 问题是

  1. is there a difference in how iis treats wcf requests vs asp.net request when it comes to 500 errors 当涉及到500个错误时,iis处理wcf请求与asp.net请求的方式有所不同

  2. also this used to work in IIS 6, how to get this behavior back in iis 7 这也曾经在IIS 6中起作用,如何在IIS 7中恢复这种行为

You should leave ASP.NET out of the picture. 您应该将ASP.NET排除在外。 Create a WCF service to stand between the two services. 创建一个WCF服务以站在两个服务之间。 You can copy the routing logic from your existing ASP.NET router. 您可以从现有的ASP.NET路由器复制路由逻辑。 The WCF service should just use "Add Service Reference" to talk to the two services. WCF服务应仅使用“添加服务引用”来与这两个服务对话。

Alternatively, just use "Add Service Reference" yourself in the ASP.NET router. 另外,您也可以在ASP.NET路由器中自己使用“添加服务参考”。

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

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