一个MVC3的网站,本地调试没有问题,把网站放到IIS后就提示
"NetworkError: 401 Unauthorized - http://localhost/IT"
这是什么原因,我觉得是不是我写的程序有问题,但什么原因能导致IIS报这样的错?
下面是iis日志
#Software: Microsoft Internet Information Services 7.5
#Version: 1.0
#Date: 2011-12-14 01:34:55
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken
2011-12-14 01:34:55 ::1 GET / - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 200 0 0 814
2011-12-14 01:34:55 ::1 GET /Content/images/weii/lo_txt_id.gif - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 200 0 0 70
2011-12-14 01:34:55 ::1 GET /Content/css/base.css - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 200 0 0 150
2011-12-14 01:34:55 ::1 GET /Scripts/jquery.validate.unobtrusive.min.js - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 200 0 0 147
2011-12-14 01:34:55 ::1 GET /Content/css/common.css - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 200 0 0 149
2011-12-14 01:34:55 ::1 GET /Scripts/Common.js - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 200 0 0 148
2011-12-14 01:34:55 ::1 GET /Scripts/jquery-1.5.1.min.js - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 200 0 0 151
2011-12-14 01:34:55 ::1 GET /Content/images/weii/lo_txt_pw.gif - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 200 0 0 87
2011-12-14 01:34:55 ::1 GET /Content/images/weii/logo.gif - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 200 0 0 68
2011-12-14 01:34:55 ::1 GET /Scripts/jquery.validate.min.js - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 200 0 0 118
2011-12-14 01:34:55 ::1 GET /Scripts/modernizr-1.7.min.js - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 200 0 0 119
2011-12-14 01:34:55 ::1 GET /Content/images/weii/f_copy.gif - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 200 0 0 118
2011-12-14 01:34:55 ::1 GET /Content/images/weii/f_log.gif - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 200 0 0 118
2011-12-14 01:34:56 ::1 GET /Content/images/weii/lo_btn.gif - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 200 0 0 18
2011-12-14 01:34:56 ::1 GET /Content/images/common/layout/m_lo_bg.gif - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 200 0 0 53
2011-12-14 01:34:56 ::1 GET /favicon.ico - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 404 0 0 21
2011-12-14 01:35:07 ::1 POST / - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 302 0 0 3148
2011-12-14 01:35:07 ::1 GET /IT - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 401 0 0 45
2011-12-14 01:35:07 ::1 GET /favicon.ico - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 404 0 0 1
我的环境是vs2010,.net 4 ,ibatis.net,在vs2010本地调试环境下没有问题。是不是我mvc routes有问题?
跟身份验证有关系。
能不能明白一点,如何解决之类的?亲