<!--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>