简体   繁体   中英

asp.net vs WCF request pipeline in IIS 500 error

Using .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.

The iis error page setting is set to 'Detailed errors for local requests and custom ....'

the asp.net routing service calls the WCF service using HttWebRequest object.

I am getting an iis html error response when wcf service throws a fault exception.

but i get a proper IIS 500 error with a proper soap response when i call the service directly (without the router)

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.

question is

  1. is there a difference in how iis treats wcf requests vs asp.net request when it comes to 500 errors

  2. also this used to work in IIS 6, how to get this behavior back in iis 7

You should leave ASP.NET out of the picture. Create a WCF service to stand between the two services. You can copy the routing logic from your existing ASP.NET router. The WCF service should just use "Add Service Reference" to talk to the two services.

Alternatively, just use "Add Service Reference" yourself in the ASP.NET router.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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