What is aspnet.config
今天认真的看了一下1.1和2.0版本的Aspnet.config,发现非常的不同,也许是asp.net 2.0比1.1的修改非常大。在MSDN上也找不到相关的文档, 好不容易找到一篇文章 What is aspnet.config
内容附后,各位对这个文件有研究的兄弟帮帮忙:
File under: important but hard to find info. Found bits of this in Stefan Schackow excellent book and added some context.
You may know when you are impersonating and you spawn a new thread, the impersonation token will not be copied to this new thread automatically, but the process token will be used. This can lead to subtle security holes, e.g. when your process is running as LOCAL SYSTEM (never do that!!) and is impersonating a least privilege account (e.g. a client) and you spawn a new thread, this new thread will run as LOCAL SYSTEM. This can also happen if you call a STA COM component (e.g. VB6) and a thread switch occurs.
This is the behavior of Windows itself – so this also applies to managed applications. In 2.0 Microsoft decided to change this for managed apps to what you would actually expect - by default the impersonation token is now copied to new threads. This can be modified with the System.Thread.ExecutionContext class. Mike Woodring has an excellent sample which make it easy to examine this.
ASP.NET async modules and pages are also dependent on this behavior. For ASP.NET Microsoft decided to stick with the 1.1 way to not break existing async code that relies on running under the process identity. You can easily verify this by outputting a WindowsIdentity.GetCurrent().Name in an async module or page. This will always show the process identity name regardless of impersonation settings.
You can control how execution flow is handled with a file called aspnet.config which has to reside in the framework configuration directory. This file does not exist by default and you have to create it with the following contents:
< configuration >
< runtime >
< legacyUnhandledExceptionPolicy enabled = " false " />
< SymbolReadingPolicy enabled = " 1 " />
< legacyImpersonationPolicy enabled = " false " />
< alwaysFlowImpersonationPolicy enabled = " true " />
</ runtime >
< configuration >
The important ones here are the two last settings. The first specifies if exceptions originating from background threads "bubble" up to the main thread. The 2nd settings is not documented at all
- python更新数据库脚本两种方法
- 使聊天机器人具有个性
- 遇到502错误,invalid request block size 解决方法
- python中json.loads,dumps,jsonify使用
- sqlalchemy和flask-sqlalchemy几种分页操作
- 一个 tflearn 情感分析小例子
- 前端js,后台python实现RSA非对称加密
- 运行mysql时,提示Table ‘performance_schema.session_variables’ doesn’t exist
- ODL应用开发之MD-SAL中级教程
- Sql参数是一个list的最佳实践
- MyBatis 配置输出日志,不输出SQL问题解决
- lombok让你提高代码整洁度的神器附教程及原理分析
- mvn编译的时候一个破错误,google只有3个结果maven : Failed to install metadata project Could not parse metadata maven-
- 读书|《Mastering Machine Learning with Python in Six Steps》
- JavaScript 教程
- JavaScript 编辑工具
- JavaScript 与HTML
- JavaScript 与Java
- JavaScript 数据结构
- JavaScript 基本数据类型
- JavaScript 特殊数据类型
- JavaScript 运算符
- JavaScript typeof 运算符
- JavaScript 表达式
- JavaScript 类型转换
- JavaScript 基本语法
- JavaScript 注释
- Javascript 基本处理流程
- Javascript 选择结构
- Javascript if 语句
- Javascript if 语句的嵌套
- Javascript switch 语句
- Javascript 循环结构
- Javascript 循环结构实例
- Javascript 跳转语句
- Javascript 控制语句总结
- Javascript 函数介绍
- Javascript 函数的定义
- Javascript 函数调用
- Javascript 几种特殊的函数
- JavaScript 内置函数简介
- Javascript eval() 函数
- Javascript isFinite() 函数
- Javascript isNaN() 函数
- parseInt() 与 parseFloat()
- escape() 与 unescape()
- Javascript 字符串介绍
- Javascript length属性
- javascript 字符串函数
- Javascript 日期对象简介
- Javascript 日期对象用途
- Date 对象属性和方法
- Javascript 数组是什么
- Javascript 创建数组
- Javascript 数组赋值与取值
- Javascript 数组属性和方法
- 麒麟子惯用框架分享(建议收藏)
- 全民打枪!在3D模型上的2D血条如何实现?
- SEO工具脚本,Python百度下拉框关键词采集工具
- 聊聊“异步”
- springboot解决前后端数据跨域问题
- 单细胞数据中到底应该如何处理线粒体基因
- Seurat小提琴图为什么有的只有点儿?
- Layui解决table日期的格式化问题
- Telegraf+Influxdb+Grafana 轻量级监控系统部署
- 国产开源文档管理系统——Wizard
- 力扣 1519——子树中标签相同的节点数
- PythonforResearch | 1_文件操作
- 你应该知道关于Python的这几个技巧!
- Pytest之fixture
- JAVA|Java的Scanner类初级使用