IIS Web怪问题: Access is denied due to invalid credentials.
上午还好好可以访问的ASP.NET站点,下午做过一次更新,再访问时,就总是弹出要输入服务器用户名密码对话框(如下图)
如果输入正确,确认三次后,页面报下面的错误:
如果不输用户名密码,直接Cancel,则报下面的错误:
记得以前也发生过两次,有一次是重起机器就好了,所以首先想到的就是重起服务器,但是这次重起后竟然还是不行。于是花近两个小时上网查资料,自己也不停尝试改IIS的配置,怀疑有缓存或Log满了之类的原因,但是都不起作用,而且IIS下只有这个站点不能访问,其它站点都没问题,所以肯定不是Server或IIS本身的问题了,尝试了好半天后才想到可能和本次更新有关(真是后知后觉啊),然后隐隐约约记得好像有一次是Skin文件中有问题导致过类型的错误,赶紧打开Skin文件,把最近加的一段Skin代码拿掉,果然就好了。Oh, My God. 然后再仔细一下,和以前唯一不同的地方是在Skin中用<!---->标记加了一句注释。拿掉注释就没问题了。
<asp:ImageButton SkinID="ImageButtonEditPurple" runat="server" ImageUrl="Images/edit_purple.gif" CssClass="image_button"/>
<asp:ImageButton SkinID="ImageButtonCheckPurple" runat="server" ImageUrl="Images/check_purple.gif" CssClass="image_button"/>
真是气人啊,这种错误查起来还真是不容易。
附1:ASP.NET中的注释符号:
The single quote character (') introduces a comment line in VB.NET code. It can be used anywhere on a source line. The end of the physical line ends the comment.
Rem
The keyword Rem also introduces a comment in VB.NET code. It can be used anywhere on a source line. The end of the physical line ends the comment.
/* and */
The characters /* and */ open and close respectively a multi-line comment block--the so called regular comment--in C# code. Regular comments can span over a section of a line, a single line, or multiple lines.
//
The double slash characters (//) introduce a one-line comment in C# code and can be placed anywhere on a source line. The one-line comment extends to the end of the line. Equivalent to ' and Rem in VB.NET.
///
The comments introduced by tripple slash characters (///) are a C#-specific feature. By means of XML markup you can document your code (e.g. is used for describing parameters). If you run the compiler with the /doc option, it automatically generates an XML documentation file.
<!-- and -->
The characters <!-- and --> are standard HTML (adopted from SGML) comment delimiters. Note, that the comment text is sent to the browser and thus visible outside (source code).
<%-- and --%>
Server-Side Comments (<%-- --%>) enable ASP.NET page developers to prevent server code (including server controls) and static content from executing/rendering. They assume a similar role to the standard HTML comments with the smashing difference that the text of the comment is not sent to the browser.
附2:别人因其它原因遇到类似问题的解决方案:
保存并清除日志
打开注册表编辑器,将
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\CrashOnAuditFail的键值设置成1
重启服务器
还有可能是Kerberos认证引起的,解决办法是
如果使用Kerberos认证,在命令提示符下运行SetSPN -A HTTP/主机头 服务器主机名
如果不使用,在命令提示符下运行cscript adsutil.vbs set w3svc/NTAuthenticationProviders "NTLM"
IIS Web怪问题: Access is denied due to invalid credentials.相关推荐
- 链接KAFKA异常:Authentication failed during authentication due to invalid credentials with SASL mechanism
使用带kerberos 认证的Kafka客户端链接kafka 创建topic 出现如下异常:Authentication failed during authentication due to inv ...
- 【Kafka】failed due to invalid credentials with broker older than 1.1.0
1.背景 参考:[Kafka]Kafka 配置 SASL_SSL jks鉴权验证方式 这篇文章,这个我在本机测试通过了,然后在服务器的docker容器中也搭建了一套. 环境如下 192.168.1.1 ...
- 【Kafka】kafka This may indicate that authentication failed due to invalid credentials
1.概述 首先在搞这个问题的时候 [Kafka]Kafka inter.broker.listener.name must be a listener name defined in advertis ...
- Tomcat【环境搭建 02】Web端403 Access Denied You are not authorized to view this page解决方法(Tomcat 10.2.12 版本)
1. 问题说明 启动Tomcat之后,我们常常是要打开Web端进行验证,其实Web端的功还有很多,但是有一些管理页面权限不足: 我们点击 Manager Status 或 Manager App 链接 ...
- Access is denied
昨天有学习ASP.NET MVC的publish和IIS发行网站<简单的ASP.NET MVC发布>http://www.cnblogs.com/insus/p/4466200.html ...
- 各类web服务器 http access log获取用户和代理ip
IIS.apache.nginx日志中获取访客真实IP的解决方案 http://bbs.jiasule.com/thread-3957-1-1.html 一. IIS Web服务器解决方 ...
- IIS Web 服务器的权限设置
IIS Web 服务器的权限设置有两个地方,一个是 NTFS 文件系统本身的权限设置,另一个是 IIS 下 网站->默认网站->右击属性->虚拟目录 面板上.这两个地方是密切相关的. ...
- 网络安全之小技巧保护(IIS)Web服务器
<script type="text/javascript"></script> <script type="text/javascript ...
- WEB应用程序及IIS WEB 服务器介绍
I. 了解 Web 应用程序 1. 概述 Web 应用程序是一个包含多个页的 Web 站点,这些页可能是静态的 html 网页,也可能是动态的网页(如: ASP.NET . ...
最新文章
- Python笔记:字典的fromkeys方法创建的初始value同内存地址问题
- java异常——捕获异常+再次抛出异常与异常链
- JavaScript-获得和设置表单的值
- SharePoint咨询师之路:设计之前的那些事四:负载均衡 - web服务器
- java createcriteria_Hibernate createCriteria查询详解
- OpenShift 4 之通过Dockerfile部署容器应用
- Linux内核学习路线 有入门到深入
- PMP 第六版 p25 矩阵图 方便记忆 口诀
- CAD中怎么配置灭火器?
- 记录一道有意思的题目:ArrayList的add(int index, E e)时间复杂度小于O(n)吗?
- 避免360浏览器极速模式自动填充表单
- Netty实战:Springboot+Netty+protobuf开发高性能服务器 (附源码下载)
- FIL筑底完成,现在布局FIL不容忽视
- python闯关2-罗马数字编码
- 武汉创业者声讨网易:占用我们LOGO 还大张旗鼓做起销售
- 将列表(含字典)数据写入Excel
- linux开机自启动程序设置方法
- 抖音小程序调起支付宝支付php微擎代码和HTML代码
- 美白银和伦敦银中独特的K线形态
- java计算机毕业设计数码商品馆网站源程序+mysql+系统+lw文档+远程调试
热门文章
- java mapper.readtree_java - 杰克逊的readValue和readTree:何时使用哪个? - 堆栈内存溢出...
- 那些汽车搭载鸿蒙,首台搭载鸿蒙OS的汽车要来了?
- 数学之美:欣赏超越数e
- 大数据学习笔记44:Hive架构
- 【codevs2912】反素数,好好学习天天向上
- 2017.9.11 聪明的燕姿 失败总结
- 计算机主机硬件详细介绍,计算机系统的硬件和系统软件详细介绍
- linux netfilter 分析,Linux Kernel Netfilter Helper 分析
- php mysql bool_关于mysql api中my_bool的取值范围的问题
- server xcode 云服务器_SRT推流测试及服务器搭建