紧急求助:ASP.NET访问权限的问题?

shyslysky 2003-12-16 11:11:01
错误显示如下(我已经把所设计的文件夹都加上了ASP.NET的访问权限):
Server Error in '/xin' Application.
--------------------------------------------------------------------------------

Access is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access is denied.

The ASP.NET process is not authorized to access the requested resource. For security reasons the default ASP.NET process identity is '{machinename}\ASPNET', which has limited privileges. Consider granting access rights to the resource to the ASP.NET process identity.

To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the "{machinename}\ASPNET" user. Highlight the ASP.NET account, and check the Write box in the Allow column.

Source Error:


Line 85:
Line 86: If IsNothing(Application(Constant.Application_ExcelApplicaiton)) Then
Line 87: Dim aExcelApplication As New Excel.Application()
Line 88: Application(Constant.Application_ExcelApplicaiton) = aExcelApplication
Line 89: End If


Source File: c:\inetpub\wwwroot\Xin\Global.asax.vb Line: 87

Stack Trace:


[UnauthorizedAccessException: Access is denied.]
Xin.Global.Session_Start(Object sender, EventArgs e) in c:\inetpub\wwwroot\Xin\Global.asax.vb:87
System.Web.SessionState.SessionStateModule.CompleteAcquireState() +525
System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +692
System.Web.AsyncEventExecutionStep.Execute() +66
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +173




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET Version:1.0.3705.0
...全文
117 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
wacle 2003-12-26
  • 打赏
  • 举报
回复
可能是你的dcomcnfg里面没有配置正确,检查有没有添加交互
shyslysky 2003-12-26
  • 打赏
  • 举报
回复
还是没有解决,郁闷!
没有人能帮我吗?
wyfwyf2000 2003-12-26
  • 打赏
  • 举报
回复
把ASP.NET添加到系统组Administrators里,然后重起,肯定行
softdoctor 2003-12-26
  • 打赏
  • 举报
回复
你用的是 dot net 2002吧,是有这个问题。
你应该将windows 的temp目录的权限设置一下,就可以了
codinghello 2003-12-26
  • 打赏
  • 举报
回复
用模拟权限试一下
你研究一下http://www.netomatix.com/ImpersonateUser.aspx
shyslysky 2003-12-16
  • 打赏
  • 举报
回复
高手求急啊!
shyslysky 2003-12-16
  • 打赏
  • 举报
回复
改了,可是没反应!
zwztu 2003-12-16
  • 打赏
  • 举报
回复
权限问题 在C:\WINNT\Microsoft.NET\Framework\v1.0.3705\CONFIG目录下更改machine.config文件中的<processModel 节
将userName="machine" 改成userName="SYSTEM"
shyslysky 2003-12-16
  • 打赏
  • 举报
回复
我加了,不管用,还涉及到访问EXCEL的问题,我也通过运行Dcomcnfg配置了!~~`
不知道怎么回事?
哪位高手帮帮我啊!~``
airon2002 2003-12-16
  • 打赏
  • 举报
回复
你是 ntfs 分区吧,在文件夹下调一下权限不管用吗?

我试过,有用的呀,我的 aspx程序生成 .xml文件都可以呀
huangwangman 2003-12-16
  • 打赏
  • 举报
回复
up
shyslysky 2003-12-16
  • 打赏
  • 举报
回复
重起了几次拉!
郁闷啊
huazaiboy 2003-12-16
  • 打赏
  • 举报
回复
改完需要重启

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧