ASP: VS2015 + IIS Express 10 学习笔记
首先搞清楚 ASP 与 ASP.NET 的区别(.asp与.aspx).
https://msdn.microsoft.com/en-us/library/ms973813.aspx
环境配置:
http://www.cnblogs.com/qrlozte/p/5093422.html
关于IIS Express配置文件的解读上网搜一下就有结果.
Q1:
为什么.asp文件可以运行, 却无法打断点?
A:
http://www.cnblogs.com/qrlozte/p/5131391.html
Q2:
我希望调试的时候我的网站监听局域网上的请求, 而不只是 localhost
A:
首先, 参考 http://www.cnblogs.com/qrlozte/p/5093422.html 进行配置.
其次, 进入Web项目的属性页, 启动选项, 启动URL 设置为你配置的地址. 在你想调试的代码处打上断点, 浏览器浏览到相应页面, 即可成功调试
Ref:
http://blog.csdn.net/hyperhawk/article/details/7359093
Q3:
如何把 IIS Express设为调试时默认WEB服务器?
A:
工具 -> 选项 -> 项目和解决方案 -> Web项目 -> 选择服务器即可
Ref:
http://www.cnblogs.com/haogj/archive/2011/01/08/1930525.html
Q4:
我按照 Q2 的方法把网站配置到192.168.1.101. 并且我通过 Web 项目的属性页 -> 启动选项 -> 选择了 "使用当前页". 调试的时候 VS 默认启动到 localhost 而不是 192.168.1.101. 我想修改 "服务器" 选项, 但一直是灰色的, 不能修改. 怎么办?
A:
这是 VS2013 的一个 BUG (参考: https://connect.microsoft.com/VisualStudio/feedback/details/793989)
已经修复. 通过 工具 -> 扩展和更新. 安装更新包即可.
Ref:
https://msdn.microsoft.com/en-us/library/ms178108.aspx
https://msdn.microsoft.com/en-us/library/58wxa9w5(v=vs.120).aspx
Q5:
报错:
HTTP Error 500.19 - Internal Server Error
Detailed Error Information:
| Module | WindowsAuthenticationModule |
|---|---|
| Notification | AuthenticateRequest |
| Handler | PageHandlerFactory-Integrated-4.0 |
| Error Code | 0x80070021 |
| Config Error | This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false". |
| Config File | \\?\E:\ASPDemo\web.config |
Config Source:
17: <anonymousAuthentication enabled="false" />
18: <windowsAuthentication enabled="false" />
19: </authentication>
More Information:
This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.
A:
就如错误信息描述的一样, 是 Web.config和applicationhost.config冲突.
去Web应用目录找到Web.config, 再去IIS目录\AppServer(或者C:\Users\xxx\Documents\IISExpress\config)找到applicationhost.config
可以看到, 正如提示中描述的一样
Web.config里有一行
<windowsAuthentication enabled="false" />
而applicationhost.config中的
<sectionGroup name="authentication">
包含子项
<section name="windowsAuthentication" overrideModeDefault="Deny" />
并且
<security><authentication>
包含子项
<windowsAuthentication enabled="false">
<providers>
<add value="Negotiate" />
<add value="NTLM" />
</providers>
</windowsAuthentication>
可见这两个子项的不一致(并且选项overrideModeDefault="Deny")是导致冲突的原因. 改为相同的内容或者overrideModeDefault改为"Allow"即可.
Q6: 报错
HTTP Error 401.2 - Unauthorized
You are not authorized to view this page due to invalid authentication headers.
Most likely causes:
- No authentication protocol (including anonymous) is selected in IIS.
- Only integrated authentication is enabled, and a client browser was used that does not support integrated authentication.
- Integrated authentication is enabled and the request was sent through a proxy that changed the authentication headers before they reach the Web server.
- The Web server is not configured for anonymous access and a required authorization header was not received.
- The "configuration/system.webServer/authorization" configuration section may be explicitly denying the user access.
Things you can try:
- Verify the authentication setting for the resource and then try requesting the resource using that authentication method.
- Verify that the client browser supports Integrated authentication.
- Verify that the request is not going through a proxy when Integrated authentication is used.
- Verify that the user is not explicitly denied access in the "configuration/system.webServer/authorization" configuration section.
- Check the failed request tracing logs for additional information about this error. For more information, click here.
A:
正如提示所描述的一样, Web server没有选择用户身份验证的方式.
检查applicationhost.config
<system.webServer><security><authentication>
你可以看到所有的子项enabled都设置为"false". 将其中一个子项设置为"true"即可.
ASP: VS2015 + IIS Express 10 学习笔记的更多相关文章
- ASP.NET MVC Web API 学习笔记---第一个Web API程序
http://www.cnblogs.com/qingyuan/archive/2012/10/12/2720824.html GetListAll /api/Contact GetListBySex ...
- ASP.NET Core Web开发学习笔记-1介绍篇
ASP.NET Core Web开发学习笔记-1介绍篇 给大家说声报歉,从2012年个人情感破裂的那一天,本人的51CTO,CnBlogs,Csdn,QQ,Weboo就再也没有更新过.踏实的生活(曾辞 ...
- 一起学ASP.NET Core 2.0学习笔记(二): ef core2.0 及mysql provider 、Fluent API相关配置及迁移
不得不说微软的技术迭代还是很快的,上了微软的船就得跟着她走下去,前文一起学ASP.NET Core 2.0学习笔记(一): CentOS下 .net core2 sdk nginx.superviso ...
- ASP.NET Core快速入门--学习笔记系列文章索引目录
课程链接:http://video.jessetalk.cn/course/explore 良心课程,大家一起来学习哈! 抓住国庆假期的尾巴完成了此系列课程的学习笔记输出! ASP.NET Core快 ...
- ASP.NET Core MVC 网站学习笔记
ASP.NET Core MVC 网站学习笔记 魏刘宏 2020 年 2 月 17 日 最近因为” 新冠” 疫情在家办公,学习了 ASP.NET Core MVC 网站的一些知识,记录如下. 一.新建 ...
- Visual Studio 2015 + IIS Express 10.0 调试 ASP.NET 项目
参考资料: https://msdn.microsoft.com/zh-cn/library/58wxa9w5(v=vs.120).aspx 首先搭建环境, 也就是用 IIS Express 配置一个 ...
- ASP.Net MVC开发基础学习笔记(1):走向MVC模式
一.ASP.Net的两种开发模式 1.1 ASP.Net WebForm的开发模式 (1)处理流程 在传统的WebForm模式下,我们请求一个例如http://www.aspnetmvc.com/bl ...
- Asp.net MVC4高级编程学习笔记-视图学习第一课20171009
首先解释下:本文只是对Asp.net MVC4高级编程这本书学习记录的学习笔记,书本内容感觉挺简单的,但学习容易忘记,因此在边看的同时边作下了笔记,可能其它朋友看的话没有情境和逻辑顺序还请谅解! 一. ...
- ASP.NET Core快速入门学习笔记(第1章:介绍与引入)
课程链接:http://video.jessetalk.cn/course/explore 良心课程,大家一起来学习哈! 任务1:课程介绍 任务2:环境安装 下载地址:https://dotnet.m ...
随机推荐
- MAC环境下 nodejs 4.5.0 卸载
MAC 环境下,我之前的删除 node 环境如果是用brew 安装的 node.js 4.4 之前的版本.可以网上参考其他方法,我之前的帖子也有之前的删除方法.参考帖子: http://www.cnb ...
- maven常用插件总结
maven本质上是一个插件框架,几乎所有的功能都是通过各种各样的插件来实现的.maven默认会依据项目类型自动把构建时的各阶段(Lifecycle和phase)自动绑定(Lifecycle Mappi ...
- Apache Storm技术实战之1 -- WordCountTopology
欢迎转载,转载请注意出处,徽沪一郎. “源码走读系列”从代码层面分析了storm的具体实现,接下来通过具体的实例来说明storm的使用.因为目前storm已经正式迁移到Apache,文章系列也由twi ...
- DOS实用命令/工具
winver 检查Windows版本wmimgmt.msc 打开windows管理体系结构wupdmgr windows更新程序wscript windows脚本宿主设置write 写字板w ...
- SQL查询(一)
查询基础练习 练习一: <学生信息表>:students(学号,姓名,性别,出生年,省份,入学年份,班级) <学生选修信息表>:stucourses(学号,课程号,课程名称,分 ...
- VirtualBox网络配置
VirtualBox中有4中网络连接方式: NAT Bridged Adapter Internal Host-only Adapter VMWare中有三种,其实他跟VMWare 的网络连接方式都是 ...
- java面试问道的
1.java可重入锁 2.Hashmap原理.说说hashMap是怎样实现的(这个之前看过,顺利回答上.还回答了多线程的问题出现的原因,面试官表示很惊讶的样.用hashmap实现hashset 3.
- vector 初始化所有方法
简介:vector可用于代替C中的数组,或者MFC中的CArray,从许多说明文档或者网上评论,一般一致认为应该多用vector,因为它的效率更高,而且具备很好的异常安全性.而且vector是STL推 ...
- nrf51822裸机教程-硬件timer
该讲介绍51822的Timer/Counter模块工作在timer模式下(定时器模式,还可以工作为计数器模式) 如何操作 51822的Timer/Counter结构如下图所示 Timer模块从PCLK ...
- 详解linux系统的启动过程及系统初始化
一.linux系统的启动流程 关于linux系统的启动流程我们可以按步进行划分为如下: POST加电自检 -->BIOS(Boot Sequence)-->加载对应引导上的MBR(boot ...