小程序部署环境(iis)

一、服务器

二、

N、疑难解答

1 不能在此路径中使用此配置节。如果在父级别上锁定了该节,便会出现 这种情况。锁定是默认设置的(overrideModeDefault="Deny"),或者是通过包含 overrideMode="Deny" 或旧有的 allowOverride="false" 的位置标记明确设置的。

HTTP 错误 500.19 - Internal Server Error
无法访问请求的页面,因为该页的相关配置数据无效。
详细错误信息:
模块     IIS Web Core
通知     BeginRequest
处理程序       尚未确定
错误代码       0x80070021
配置错误       不能在此路径中使用此配置节。如果在父级别上锁定了该节,便会出现    这种情况。锁定是默认设置的(overrideModeDefault="Deny"),或者是通过包含 overrideMode="Deny" 或旧有的 allowOverride="false" 的位置标记明确设置的。
配置文件       \xx\web.config

配置源:
66:     <modules runAllManagedModulesForAllRequests="true" />
67:     <handlers>
68:       <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />

解决方案:控制面板—>添加Asp.Net相关项

2 Web.config 文件的 <compilation> 元素中的“targetFramework”特性仅用于目标 .NET Framework 版本 4.0 或更高版本(例如“<compilation targetFramework="4.0">”)。“targetFramework”特性当前引用的版本高于已安装的 .NET Framework 版本。请指定 .NET Framework 的有效目标版本,或安装所需的 .NET Framework 版本

3 HTTP Error 404.3 - Not Found

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
Image
2) Enter "cmd" and click OK

Image(1)

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

Image(2)

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

Image(3)

5) WCF will now be installed:

Image(4)

Also see:

http://blogs.msdn.com/davidwaddleton/archive/2007/11/02/wcf-and-404-3-errors.aspx

4 未能从程序集“System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”中加载类型“

 

由IIS管理員找到站台的「模組」項目: 

 

開啟「模組」可發現ServiceModel及ServiceModel-4.0,第一筆為3.0版,第二筆為4.0版。 

 

將ServiceModel(3.0版)移除,天下太平~ 

 

 

【後記】

本次禍首:IIS不認得SVC,手動執行ServiceModelReg.exe才惹出麻煩,在Windows 8/IIS8,要設定WCF請愛用「開啟及關閉Windows功能」。 

 
注:重新修改配置后,需要删除网站,重新添加!
posted @ 2017-09-27 14:16  sunlyk  阅读(1972)  评论(0编辑  收藏  举报