Print Page | Close Window

Remoting with iis 7

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1471
Printed Date: 28-Mar-2024 at 8:17am


Topic: Remoting with iis 7
Posted By: lars-erik
Subject: Remoting with iis 7
Date Posted: 14-Sep-2009 at 1:01pm

I have a strange problem with iis 7. I run my client from a computer no 1 - everything works fine. Then I run it from computer no 2- then it doesn't get contact with BOS at all (404 error I think it was...). Then I rerun the client at computer no. 1 - then it doesn't work here either. Then I retry the same after some hours, but in the opposite sequence - then the same thing happens: the first client that connects succeds, but any other client breaks the whole thing.

I have checked the IIS application pool - it is still running  - no errors at server, and nothing in the Debuglog.
I have also checked that machinename in web.config is correct.
I am running the application pool as a classic asp.net pool.
Everything works fine on all IIS 6 servers though..but not on IIS 7.
It seems to me like the singleton object is dying...



Replies:
Posted By: JoshO
Date Posted: 15-Sep-2009 at 1:22pm
The problem you are encountering does occur 100% of the time when using .NET Remoting with an application pool in "Integrated" mode. "Classic" mode is supposed to solve this by emulating an IIS 6 server but does not seem to have exactly the same behavior. I found a fix on MSDN which you need to add to your web.config:
 
   This problem occurs because of a Microsoft Internet Information Services (IIS) 7.0 security enhancement in Windows Vista. When a client computer activates a COM+ SOAP-enabled server, .NET Framework remoting generates a URL. However, the URL that .NET Framework remoting generates contains a double escape sequence. By default, IIS 7.0 rejects URLs that contain a double escape sequence. Therefore, IIS 7.0 denies the request with a 404.11 (not found) error message, and the server activation fails.

Note URLs that contain a double escape sequence work in earlier versions of IIS.

In order to fix this, I had to add a <security> section under <system.webServer> :

<system.webServer>
<security>
   <requestFiltering allowDoubleEscaping="True"/>
 </security>
</system.webServer>



Print Page | Close Window