孔布雷斯路线(combres.axd)不起作用
我已关注文章 http://www.codeproject.com/KB/aspnet/combres2 .aspx。
当我运行我的网站时,我无法让combres.axd 工作?我知道combres 正在运行,因为我的xml 中的错误文件会导致错误。我正在 vista 上运行 ASP.NET 4.0 Web 表单网站。
我的 Combres XML 设置是。
resourceSets url="~/combres.axd" defaultDuration="30" defaultVersion="auto" defaultDebugEnabled="auto"
我已检查 web.config 中的所有正确值。引用已从合并目录添加,全局 ASX 文件具有以下内容。
protected void Application_Start(object sender, EventArgs e)
{
RouteTable.Routes.AddCombresRoute("Combres");
}
我还检查了 html 源中创建的值。
href="/combres.axd/siteCss/309885723"
src="/combres.axd/siteJs/408582048"
我没有收到错误或任何可以帮助我找出它不起作用的原因或我可能错过的内容的信息。任何建议都会很棒。
I have followed the article http://www.codeproject.com/KB/aspnet/combres2.aspx.
When I run my site I cannot get the combres.axd to work ? I know that the combres is running since an incorrect file in my xml will cause an error. I am running an ASP.NET 4.0 web forms site on vista.
My Combres XML settings are.
resourceSets url="~/combres.axd" defaultDuration="30" defaultVersion="auto" defaultDebugEnabled="auto"
I have checked the web.config for all correct values. The reference has been added from the merge directory and the global ASX file has the following.
protected void Application_Start(object sender, EventArgs e)
{
RouteTable.Routes.AddCombresRoute("Combres");
}
I also checked the value is created in the html source.
href="/combres.axd/siteCss/309885723"
src="/combres.axd/siteJs/408582048"
I do not get an error or anything to help me track down the reason it will not work or what I may have missed. Any suggestions would be great.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

发布评论
评论(6)
首先,我建议将 log4net 连接到 web.config 中的 Combres 记录器(不要忘记为 log4net 设置配置部分),
<log4net>
<logger name="Combres">
<level value="ALL"/>
<appender-ref ref="LogCombres" />
</logger>
<appender name="LogCombres" type="log4net.Appender.RollingFileAppender">
<file value="Combres.log.txt"/>
<appendToFile value="true"/>
<maximumFileSize value="5000KB"/>
<maxSizeRollBackups value="2"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%d [%t] %-5p %c - %m%n"/>
</layout>
</appender>
</log4net>
并在你的 global.asax 中启动配置,
log4net.Config.XmlConfigurator.Configure()
你应该有一个关于所发生情况的详细日志。如果没有出现问题,请立即返回一些日志输出
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
当我第一次尝试让它工作时遇到了同样的问题。
确保在调用之前添加 Combres 路由以忽略路由 {resource}.axd。
正确:
错误:
I had the same problem when trying to get it to work for the first time.
Make sure that the Combres route is added before the call to ignore the route {resource}.axd.
Correct:
Incorrect: