Delen via


IIS stops handling *.svc requests after installing .Net 3.0 RC1

Hello,

I experienced this problem on two machines with Windows XP as OS, so I think other people may also run into this.

After uninstalling .Net 3.0 June CTP and all additional components (SDK, VS extensions for .Net 3.0 and WF), then installing .Net 3.0 RC1, IIS does not handle *.svc requests appropriate. A request like https://localhost/MyService/service.svc simply displays the service.svc file itself. So I checked whether the Http Handlers are registered in the web.config:

<buildProviders>

.

.

<add extension=".svc" type="System.ServiceModel.Activation.ServiceBuildProvider, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

.

.

</buildProviders>

and

<httpHandlers>

.

.

<add path="*.svc" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

validate="false" />

.

.

</httpHandlers>

After I checked this I tried to register ASP.NET again manually by calling “aspnet_regiis /i” and “aspnet_regiis /r” from the command line, but still no success. The I tried to register WCF manually by calling “servicemodelreg /i” , this tool is located in the following directory “C:\WINDOWS\Microsoft.Net\Framework\v3.0\Windows Communication Foundation”. But this was not successful to activate *.svc processing.

Then I checked the Configuration of Extensions in IIS: Go to “Administrative Tools” and start “Internet Information Services” navigate to “Default Web Site” and right click on it in the tree view. Select “Properties” from the Popup Menu, then select the “Home Directory" Tab and click on the “Configuration” Button in the Dialog. In my case the entry for the extension *.svc was missing. I tried to add the *.svc extension by clicking on the “Add” Button and filling the Dialog:

Executable: C:\WINDOWS\Microsoft.Net\Framework\v2.0.50727\aspnet_isapi.dll
Limit To: GET,HEAD,POST,DEBUG
Script Engine: checked
Check that file exists: unchecked

But the “Ok” Button keeps disabled, regardless of the entries in the dialog. It seems that somehow the security settings for the IIS Metabase are hosed, so that I could not add entries using this dialog, even if logged on with the local administrator account.

Now I tried to use IIS Metabase Explorer, this tool can be found in the IIS Resource Kit. In the tree view I navigated through “LM” to the “W3SVC” entry. Then I looked for the Scriptmaps entry in the List, double-clicked on it. Checked whether there is an entry for the *.svc extension in the list. If not, add a new entry by clicking on the “<new item>” in the list Insert this string in to the list “svc,C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG”

I repeated this procedure for the ROOT entry in the tree view, which can be reached by navigating through “W3SVC” -> “1” -> “ROOT”. After closing the IIS Metabase Explorer I restarted IIS by calling “iisreset” from the command prompt, and the the WCF services hosted in IIS were processed as expected.

Hope this is helpful to someone else.

Regards

Martin Vollmer

Comments

  • Anonymous
    September 11, 2006
    Thanks for the heads up :)

    Welcome to the blogosphere!

    steven

  • Anonymous
    October 09, 2006
    Great post.  For me the part of your post that worked was adding the handler tag to the Web.config file, which I was able to fill in thanks to your excellent detail.

  • Anonymous
    October 25, 2006
    Ahh.. and this is how I managed to finally get some of the excellent WCF examples from the latest Windows SDK (http://www.microsoft.com/downloads/details.aspx?FamilyId=28FAD42D-983E-4A57-B5A6-BF058766A9FF&displaylang=en) running... Cheers!

  • Adam Hems
  • Anonymous
    April 01, 2007
    Thanks Martin! The Web.config tags is what worked for me also. WCF is great but when you first implement, expect three steps of research for each step you take forward when implementing a service. Thanks for posting this is such great detail.

  • Anonymous
    November 21, 2007
    The comment has been removed

  • Anonymous
    October 12, 2008
    PingBack from http://chris.59north.com/post/Silverlight-enabled-WCF-Service-and-EPiServer.aspx

  • Anonymous
    May 26, 2011
    The comment has been removed

  • Anonymous
    May 26, 2011
    神は少なくとも今日... ŭ 保存私マアーン:…. 2 つの親指を.ところである場所のようなボタン?: P