开发者

500 Internal Server Error with W3C validator

Our website is rendered OK. But when it is validated by W3C validatior (http://validator.w3.org/check?uri=http://itsolutions.vn), there is an error (500 Internal Server E开发者_开发知识库rror) but I don't know why. This causes search engines cannot index our pages.

Could you please help me find out what is the problem?


Your server detects an error in the following file/line:

[NullReferenceException: Object reference not set to an instance of an object.] MvcInternationalization.Controllers.BaseController.ExecuteCore() in F:\Projects\MultilingualCMS\Web solution\MvcInternationalization\MvcInternationalization\Controllers\BaseController.cs:60

I don't know what in this file but your server only responds with a 500 error when you don't set your User-Agent and Accept-Language header in the HTTP request. It's possible that the validator doesn't do this and therefore get the 500 error.

EDIT: The file path looks like you do some kind of internationalization. Maybe you should put a try construct around the language detection and set a default language in the catch handler.

try{
   // try to find out user language
} catch(Exception e) {
   // set default language
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜