由于网站需要在半夜自动生成静态页面,所以就用Thread实现定时生成~在本地可以正常生成,但是在服务器上确报System.UnauthorizedAccessException: Access to the path 'D:\index.html' is denied错误~
百度上说是由于权限问题,但是生成的方法如果是通过按钮点击事件触发在服务器上是可以正常生成的~为什么使用线程会没有权限?
百度上说是由于权限问题,但是生成的方法如果是通过按钮点击事件触发在服务器上是可以正常生成的~为什么使用线程会没有权限?
解决方案 »
- 总报错
- TreeView选定节点样式问题,求解~~
- 我想在TextBox中输入类似于12345.05这样的数
- 高手知道html -------跳出新页面实用功能?
- 网页编码,究竟应当如何设置?
- 数据库和xml的问题
- jmail发送出错,看不懂是什么错File or assembly name Interop.jmail, or one of its dependencies, was not found
- 大家做站点计数器通常是写在数据库里还是写在Application里?
- utf-8 与 GBK之间转换问题
- 关于SQL Server存储过程返回输出参数的问题。
- TreeView对父系的移除
- asp.net的global文件问题 急 还望大家告诉..
还有不要用Thread,要用Windows服务
System.Security.Principal.WindowsIdentity obj = System.Security.Principal.WindowsIdentity.GetCurrent();
System.Security.Principal.WindowsIdentity wi = (System.Security.Principal.WindowsIdentity)obj;
System.Security.Principal.WindowsIdentity.Impersonate(wi.Token); //模拟用户身份权限