W3C验证不工作的RazorView [英] W3C Validation Not working for RazorView

查看:112
本文介绍了W3C验证不工作的RazorView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用MVC4项目,做服务器端URL重写在 RouteConfig 和追加的.html 末每一页的URL的。

I am using MVC4 project and doing URL rewrite on Server side in RouteConfig and appending .html at the end of url of every page..

www.mysite.com/home.html

我有几页,这些网页与网页(每想到在浏览器中找到工作)联系。

I have couple of pages and those pages are linked with home page (every think is working find in browser).

但是,当我使用验证W3C的链接检查,我得到断开链接的错误消息。

But when I validate using W3C link checker, I get broken link error message.

我真的不知道还有什么能问题。还有一件事,如果我取代的.html 的.aspx 或任何其他分机它是由W3C验证。我不知道是什么问题。

I really don't know what can be issue. One more thing if I replace .html with .aspx or any other extension it is validated by W3C. I don't know what is issue.

我的code是:

 routes.MapRoute(
                name: "features",
                url: "features.html",
                defaults: new { controller = "Home", action = "features", page =    UrlParameter.Optional }
            ); 

的Web.config

<add name="HtmlFileHandler" path="*.html" verb="GET" 
     type="System.Web.Handlers.TransferRequestHandler" 
     preCondition="integratedMode,runtimeVersionv4.0" />

任何帮助,高度AP preciated

Any help is highly appreciated

推荐答案

好吧,我解决了它的一些东西是这样的。

Ok I solved it some what like this.

我换成

<add name="HtmlFileHandler" 
     path="*.html" 
     verb="GET"
     type="System.Web.Handlers.TransferRequestHandler"
     preCondition="integratedMode,runtimeVersionv4.0" />

在webconfig

in webconfig with

<add name="HtmlFileHandler" 
     path="*.html" 
     verb="*" 
     type="System.Web.UI.PageHandlerFactory" />

和它的作品......我的网页是由W3C现在验证。 :)

and it works ... my page is validated by W3C now. :)

这篇关于W3C验证不工作的RazorView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆