401.2使用匿名身份验证时出现IIS错误

时间:2015-11-01 18:47:02

标签: iis

我已将Windows 10家庭PC设置为Web服务器以进行一些开发工作。我需要使用匿名身份验证,但我遇到401.2错误的问题。

401.2 Error

IIS日志告诉我:

2015-11-01 18:29:12 192.168.1.14 GET /temp/index.html - 80 - 192.168.1.14 Mozilla / 5.0 +(Windows + NT + 10.0; + WOW64)+ AppleWebKit / 537.36 +(KHTML,+ like + Gecko)+ Chrome / 46.0.2490.80 + Safari / 537.36 - 401 2 5 0“

这是一个简单的index.html页面,只包含“Hello World!

我在这里阅读了MS故障排除文章,但它没有帮助支持.microsoft.com / en-us / kb / 907273

我已在文件夹和AppPool设置上发布了IIS设置,文件夹设置,访问控制列表:

Link to settings

由于

杰夫

2 个答案:

答案 0 :(得分:0)

我遇到了同样的问题并且挣扎了好几天。最后发现,获得<script> function initMap() { var username = "<%= session.getAttribute("Member").toString() %>"; var flightPlanCoordinates = []; $(document).ready(function(){ $.ajax({ url: "http://127.0.0.1:8082/letstravel/location/"+username, dataType: "json", success: function(data) { for(var i in data){ flightPlanCoordinates.push({ lat: data[i].latitude, lng: data[i].longitude }); } } }); }); var map = new google.maps.Map(document.getElementById('map'), { zoom: 3, center: {lat: 0, lng: -180}, mapTypeId: google.maps.MapTypeId.TERRAIN }); var flightPath = new google.maps.Polyline({ path: flightPlanCoordinates, geodesic: true, strokeColor: '#FF0000', strokeOpacity: 1.0, strokeWeight: 2 }); flightPath.setMap(map); } </script> 错误的原因之一是因为未安装身份验证模块。

确保在IIS中安装了所需的身份验证模块(即匿名身份验证)。

验证转到IIS管理器 - &gt;选择root - &gt;选择身份验证。

enter image description here

enter image description here

如果它没有显示您的身份验证类型,请转到控制面板 - &gt;添加/删除程序或转到运行 - &gt;输入“appwiz.cpl” - &gt;输入以打开添加删除程序向导。

enter image description here

转到401.2 - &gt; IIS - &gt;认证

enter image description here

  

注意:如果您只想在Visual Studio中修复此错误以进行开发,则无需安装这些模块。如果您正在使用IIS express,只需按“F4”转到项目属性,然后从那里更改身份验证类型。

答案 1 :(得分:0)

所以我放弃了试图解决这个问题。我最终卸载了所有IIS功能并从头开始重新安装。重新安装后匿名身份验证现在可以正常工作!! :-)如果关闭并再次打开它不起作用然后尝试卸载并重新安装! IT支持最好!!