首页 新闻 赞助 找找看

本地调试没有问题,放到IIS后提示401 Unauthorized

0
悬赏园豆:5 [已关闭问题] 关闭于 2011-12-16 13:11

一个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有问题?

sword88的主页 sword88 | 初学一级 | 园豆:195
提问于:2011-12-14 09:25
< >
分享
所有回答(2)
0

MVC项目在IIS6上部署的几种思路,这上面说的N种方法,应该能帮到你。

LCM | 园豆:6876 (大侠五级) | 2011-12-14 09:30
0

跟身份验证有关系。

悟行 | 园豆:12559 (专家六级) | 2011-12-14 10:32

能不能明白一点,如何解决之类的?亲

支持(0) 反对(0) sword88 | 园豆:195 (初学一级) | 2011-12-14 11:03
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册