开发者

IIS error in deploying asp.net mvc2 [closed]

开发者 https://www.devze.com 2023-01-30 14:11 出处:网络
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time,or an extraordinarily narrow situation that is not generally applic
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 11 years ago.

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 aft开发者_JAVA技巧er 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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消