FineUI 官方论坛

标题: .net4.5和IIS8中Web.config如何设置 [打印本页]

作者: Willzhong    时间: 2012-10-17 03:15
标题: .net4.5和IIS8中Web.config如何设置
按照说明设置提示httpHandlers有错误.net4.5和IIS8中Web.config如何设置?
作者: 阿真    时间: 2013-8-6 17:12
同求啊,VS2012怎么配置都不行。
作者: jakey188    时间: 2013-8-8 11:29
估摸着不支持4.5
作者: sanshi    时间: 2013-8-8 11:44
下载 4.0的空项目:http://fineui.com/bbs/forum.php?mod=viewthread&tid=2123
作者: 早知今日何必当    时间: 2013-8-11 22:26
本帖最后由 早知今日何必当 于 2013-8-11 22:30 编辑

先把<system.web>中的
<httpModules>
      <add name="FineUIScriptModule" type="FineUI.ScriptModule, FineUI"/>
    </httpModules>
    <httpHandlers>
      <add verb="GET" path="res.axd" type="FineUI.ResourceHandler, FineUI" validate="false"/>
    </httpHandlers>
删了,再在<configuration>中加上
  <system.webServer>
    <modules>
      <add name="FineUIScriptModule" type="FineUI.ScriptModule, FineUI"/>
    </modules>
    <handlers>
      <add name="FineUIResourceHandler" verb="GET" path="res.axd" type="FineUI.ResourceHandler, FineUI" />这里没有validata="false")
    </handlers>
    <httpErrors errorMode="Detailed"/>
    <asp scriptErrorSentToBrowser="true"/>
  </system.webServer>


我的VB项目全部配置文件如下,可正常运行:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <configSections>
        <section name="FineUI" type="FineUI.ConfigSection, FineUI" requirePermission="false"/>
        <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
            <section name="WebApplication.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
        </sectionGroup>
    </configSections>
    <!-- 可用的配置项(这里列的都是默认值): Language="zh_CN" AjaxTimeout="60" EnableAjax="true" Theme="blue" FormMessageTarget="qtip" FormOffsetRight="20" FormLabelWidth="100" FormLabelSeparator=":" IconBasePath="~/icon" EnableAjaxLoading="true" AjaxLoadingType="default" CustomTheme="" CustomThemeBasePath="~/theme" -->
    <FineUI EnableBigFont="true" DebugMode="false" />
    <appSettings/>
    <connectionStrings/>
    <system.web>
        <!--IIS 6
        <httpModules>
          <add name="FineUIScriptModule" type="FineUI.ScriptModule, FineUI"/>
        </httpModules>
        <httpHandlers>
          <add verb="GET" path="res.axd" type="FineUI.ResourceHandler, FineUI" validate="false"/>
        </httpHandlers>
        -->
        <!--
            Visual Basic 选项:
            设置 strict="true" 可禁止所有可能导致
            数据丢失的数据类型转换。
            设置 explicit="true" 可强制声明所有变量。
        -->
        <compilation debug="true" strict="false" explicit="true">
        </compilation>
    <!--
      通过 <authentication> 节,可配置
      ASP.NET 用于识别进入用户的
      安全身份验证模式。
    -->
    <authentication mode="Windows" />
    <!--
       通过 <customErrors> 节,可以配置
       在执行请求的过程中出现未处理的错误时要执行
       的操作。具体而言,
       开发人员通过该节可配置要显示的 html 错误页,
       以代替错误堆栈跟踪。
       <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
         <error statusCode="403" redirect="NoAccess.htm" />
         <error statusCode="404" redirect="FileNotFound.htm" />
       </customErrors>
    -->
        <pages>
          <controls>
            <add assembly="FineUI" namespace="FineUI" tagPrefix="x"/>
          </controls>
          <namespaces>
            <clear />
            <add namespace="System" />
            <add namespace="System.Collections" />
            <add namespace="System.Collections.Generic" />
            <add namespace="System.Collections.Specialized" />
            <add namespace="System.Configuration" />
            <add namespace="System.Text" />
            <add namespace="System.Text.RegularExpressions" />
            <add namespace="System.Web" />
            <add namespace="System.Web.Caching" />
            <add namespace="System.Web.SessionState" />
            <add namespace="System.Web.Security" />
            <add namespace="System.Web.Profile" />
            <add namespace="System.Web.UI" />
            <add namespace="System.Web.UI.WebControls" />
            <add namespace="System.Web.UI.WebControls.WebParts" />
            <add namespace="System.Web.UI.HtmlControls" />
          </namespaces>
        </pages>
    </system.web>
    <system.webServer>
      <modules>
        <add name="FineUIScriptModule" type="FineUI.ScriptModule, FineUI"/>
      </modules>
      <handlers>
        <add name="FineUIResourceHandler" verb="GET" path="res.axd" type="FineUI.ResourceHandler, FineUI"/> <!--validate="false"/>-->
    </handlers>
      <httpErrors errorMode="Detailed"/>
      <asp scriptErrorSentToBrowser="true"/>
    </system.webServer>
</configuration>

我用的VS2012,如果不想改这个,把
[attach]2901[/attach]
这里的集成改成经典得了。







欢迎光临 FineUI 官方论坛 (https://fineui.com/bbs/) Powered by Discuz! X3.4