lalla1 发表于 2015-8-13 13:14:47

IIS 发布RESTFUL服务所遇问题解决办法

  错误摘要
  1 HTTP 错误500.19 -Internal Server Error
  无法访问请求的页面,因为该页的相关配置数据无效。
  详细错误信息
  模块 IIS Web Core
通知 BeginRequest
处理程序 尚未确定
错误代码 0x80070021
配置错误 不能在此路径中使用此配置节。如果在父级别上锁定了该节,便会出现这种情况。锁定是默认设置的(overrideModeDefault="Deny"),或者是通过包含 overrideMode="Deny" 或旧有的 allowOverride="false" 的位置标记明确设置的。
配置文件 \\?\C:\program file\i.Timex TAMX\webtamsCht \web.config
请求的 URL http://127.0.0.1:80/
  物理路径 C:\program file\i.Timex TAMX\webtamsCht
登录方法 尚未确定
登录用户 尚未确定
配置源
82:         </modules>
83:         <handlers>
84:             <remove name="WebServiceHandlerFactory-Integrated" />
  出错原因:安装了IIS之后没有注册.NET
  解决办法:安装IIS后注册.NET(这里注册IIS支持.net编译)
  进dos打开C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
  方法: cdC:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
  aspnet_regiis   -i
  2 Server Error in Application "Default Web Site/DotNetNuke_IWeb"
HTTP Error 404.3 - Not Found

  Description: The page you are requesting cannot be served because of the Multipurpose Internet Mail Extensions (MIME) map policy that is configured on the Web server. The page you requested has a file name extension that is not recognized, and is not allowed.
  Error Code: 0x80070032
  Notification: ExecuteRequestHandler
  Module: StaticFileModule
  Requested URL: http://localhost:80/DotNetNuke_IWeb/DesktopModules/IWebCF/CoreService.svc
  Physical Path: C:\Users\Documents\Visual Studio 2005\Projects\IWeb\Website\DesktopModules\IWebCF\CoreService.svc
  Logon User: Anonymous
  Logon Method: Anonymous
  Handler: StaticFile
  Most likely causes:

[*]It is possible that a handler mapping is missing. By default, the static file handler processes all content.
[*]The feature you are trying to use may not be installed.
[*]The appropriate MIME map is not enabled for the Web site or application. (Warning: Do not create a MIME map for content that users should not download, such as .ASPX pages or .config files.)
To resolve this(使得IIS支持WCF):

  1) Select "run" from the Start menu

2) Enter "cmd" and click OK

  3) enter "cd c:\windows\Microsoft.Net\Framework\v3.0\Windows Communication Foundation\" and press Enter.

  4) Enter "ServiceModelReg -i" and press Enter.

  5) WCF will now be installed:

  Also see:
  http://blogs.msdn.com/davidwaddleton/archive/2007/11/02/wcf-and-404-3-errors.aspx  
  3 使用“UriTemplate”的终结点无法用于“System.ServiceModel.Description.WebScriptEnablingBehavior”。

  于是检查web.config<behaviors>
<endpointBehaviors>
<behavior name="V6.WebApp.wcf.ServiceAspNetAjaxBehavior">
<enableWebScript/>   
</behavior>
</endpointBehaviors>
</behaviors>

  把 <enableWebScript/>换成<webHttp/>,解决!
页: [1]
查看完整版本: IIS 发布RESTFUL服务所遇问题解决办法