下面是web.config IIS添加了html 没勾选那个检查选项伪静态访问正常 真的html 却由.net 返回404错误
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
</configSections> <RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/(.*).html</LookFor>
<SendTo>~/$1.aspx</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
<appSettings>
<add key="ReminderTime" value="20"/>
<add key="SendType" value="0"/>
</appSettings>
<connectionStrings>
<add name="connectionString" connectionString="1d31976252640dbcbfedc0a4c71a3c4ded98180dfcafd39739873c29a10e767d520e3b36e1ea36543ab4f182d6ae2b9d9b038f25f8da739154bf43fd3059be26f4612698f6962e268a02a4260b4135a917f2b7d11cd5c2ee" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<compilation debug="true">
<assemblies>
<add assembly="System.Configuration.Install, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
<authentication mode="Windows"/>
<globalization requestEncoding="gb2312" responseEncoding="gb2312"/>
<pages validateRequest="false"/>
<sessionState timeout="6000"></sessionState>
<customErrors mode="Off" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
<httpHandlers>
<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
<add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
</httpHandlers> </system.web>
</configuration>
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
</configSections> <RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/(.*).html</LookFor>
<SendTo>~/$1.aspx</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
<appSettings>
<add key="ReminderTime" value="20"/>
<add key="SendType" value="0"/>
</appSettings>
<connectionStrings>
<add name="connectionString" connectionString="1d31976252640dbcbfedc0a4c71a3c4ded98180dfcafd39739873c29a10e767d520e3b36e1ea36543ab4f182d6ae2b9d9b038f25f8da739154bf43fd3059be26f4612698f6962e268a02a4260b4135a917f2b7d11cd5c2ee" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<compilation debug="true">
<assemblies>
<add assembly="System.Configuration.Install, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
<authentication mode="Windows"/>
<globalization requestEncoding="gb2312" responseEncoding="gb2312"/>
<pages validateRequest="false"/>
<sessionState timeout="6000"></sessionState>
<customErrors mode="Off" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
<httpHandlers>
<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
<add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
</httpHandlers> </system.web>
</configuration>
解决方案 »
- 将内存中的双浮点数,int转为double型
- 用webrowser显示word、ppt在另一个窗体中不能显示
- 水晶报表打印版面设置的问题,内有详细描述。
- 有没有人用_中文的枚举类型
- 无语了,谁来救救我,MDI窗体主菜单合并的问题
- TreeView 子菜单问题?
- 懂函数指针的进来帮忙 .............. 注意 不是委托和事件 是函数指针
- dos生成的txt文件能在web下删除吗?
- 如何枚举 winform 中所有的组件?
- 在vc中ShellExecute可以调用可执行文件,请问在c#中用什么
- 求助,关于C#中时间控件monthcalendar的问题
- 绘图问题e.Graphics.DrawLine()方法不能理解;
<SendTo>~/不要伪静态的真实html文件.html</SendTo>
{
不重写
}
else
{
重写
}