Question

I am trying to deploy a wcf webhttp service onto IIS. I am Running Windows 7, IIS 7.5, VS2010.

The Steps - Created a project WCF Rest Service Application. - Published the project to localhost - Ensured that the applicationpool was .net 4.0

However, when trying to access the service published at (Default Web Site/HelloRest ) via http://localhost/HelloRest

It gives an error –

Error Summary HTTP Error 500.19 - Internal Server Error This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".

In the config source modules runAllManagedModulesForAllRequests="true" is highlighted

Is there anything I am missing? When I execute from vs the service works just fine. In globals.asax I have -

RouteTable.Routes.Add(new ServiceRoute("PrintHelloWorld", new WebServiceHostFactory(), typeof(HelloRestService)));

When executed from vs2010 http://localhost:59404/PrintHelloWorld/ returns hello world. However, once published

http://localhost/HelloRest/PrintHelloWorld returns the same error as well.

EDIT Figured out the solution. - I had installed IIS after installing the .net framework. In commandline execute the asp.net registration tool - Go to the directory in Windows\Microsoft.NET\Framework\v4.0.30319 type aspnet_regiis.exe -ir

Now it starts to work.

No correct solution

OTHER TIPS

I am not a expert in .Net... But did you try these suggestions? http://forums.asp.net/t/1220987.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top