• Web.config配置文件详解3


    <!--禁用所有缓存-->
    <requestCaching disableAllCaching="true"></requestCaching>
    <!--指定代理地址,并对本地访问和 contoso.com 跳过代理。-->
    <defaultProxy>
    <proxy usesystemdefault="True" proxyaddress="http://192.168.1.10:3128" bypassonlocal= "True"/>
    <bypasslist>
    <add address="[a-z]+".contoso".com" />
    </bypasslist>
    </defaultProxy>
    </system.net>
    <!--该节替换在 httpHandlers 和 httpModules 节中添加的与 AJAX 相关的 HTTP 处理程序和模块。该节使 IIS 7.0 在集成模式下运行时可使用这些处理程序和模块。在iis7.0 下运行 ASP.NET AJAX 需要 system.webServer
    节。对早期版本的 IIS 来说则不需要此节。
    -->

    <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules>
    <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.Scri ptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856 AD364E35"/>
    </modules>
    <handlers>
    <remove name="WebServiceHandlerFactory-Integrated"/>
    <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondit ion="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Exte nsions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="Script Resource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Ve rsion=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    </handlers>
    </system.webServer>
    <!--ASP.NET AJAX 中配置 ASP.NET 服务-->
    <system.web.extensions>
    <!--配置 JSON 序列化-->
    <scripting>
    <webServices>
    <jsonSerialization maxJsonLength="5000"/>
    </webServices>
    </scripting>
    </system.web.extensions>
    <!--对WCF的相关配置-->
    <system.serviceModel>
    <services>
    <service name="WCFStudent.WCFStudentText" behaviorConfiguration="ServiceBehavior">
    <!-- Service Endpoints -->
    <endpoint address="" binding="wsHttpBinding" contract="WCFStudent.IStuServiceContract">
    <!-- 部署时,应删除或替换下列标识元素,以反映在其下运行部署服务的标识。删除之后,WCF 将自动推导相应 标识。-->
    <identity>
    <dns value="localhost"/>
    </identity>
    </endpoint>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
    </service>
    </services>
    <behaviors>
    <serviceBehaviors>
    <behavior name="ServiceBehavior">
    <!-- 为避免泄漏元数据信息,请在部署前将以下值设置为 false 并删除上面的元数据终结点 -->
    <serviceMetadata httpGetEnabled="true"/>
    <!-- 要接收故障异常详细信息以进行调试,请将以下值设置为 true。在部署前设置为 false 以避免泄漏异常信息-->
    <serviceDebug includeExceptionDetailInFaults="false"/>
    </behavior>
    </serviceBehaviors>
    </behaviors>
    </system.serviceModel>
    <!--URL重定向-->
    <rewriter>
    <rewrite url="~/user/u(.+).aspx" to="~/user/index.aspx?r=$1"/>
    <rewrite url="~/ask/q(.+).aspx" to="~/home/ask/content.aspx?id=$1"/>
    <rewrite url="~/blog/b(.+).aspx" to="~/home/blog/article.aspx?r=$1"/>
    <rewrite url="~/news/n(.+).aspx" to="~/home/news/content.aspx?nid=$1"/>
    <rewrite url="~/default.aspx" to="~/home/ram/net.aspx"/>
    </rewriter>
    </configuration>

  • 相关阅读:
    【转】千万级并发实现的秘密:内核不是解决方案,而是问题所在!
    漫话NUMA
    【转】为什么要内存对齐 Data alignment: Straighten up and fly right
    【转】内存地址对齐运算
    DPDK收发包处理流程-----(一)网卡初始化
    Nginx WebSocket proxying example
    nginx example
    kerberos-ldap linux账户集中管理认证
    利用i节点删除乱码文件
    linux sar命令详解
  • 原文地址:https://www.cnblogs.com/xiexingen/p/2850139.html
Copyright © 2020-2023  润新知