fso 拒绝访问,IIS7被拒绝的权限 - ASP文件写入

博客讲述了在IIS7上,一个ASP页面尝试访问在线_data.xls文件时遇到权限被拒绝的问题。解决方案是为应用程序池(如DefaultAppPool)的模拟身份授予读写权限到ASP页面所在的物理文件夹。具体步骤包括在计算机管理中找到应用池,设置其进程模型的身份,并在文件夹权限中添加相应的用户。
摘要由CSDN通过智能技术生成

Unfortunately I don't have a whole lot of information on this.

I have a customer who has moved their site from an ancient system to IIS7 on Windows 2008 Server. Info about the error is below:

Error:

E:\wwwroot\sp\xxx\online_data.xls

Microsoft VBScript runtime error '800a0046'

Permission denied

/xxx/oat/exceldata.asp, line 52

Code:

49 response.write(server.mappath("online_data.xls"))

50

51 set fso = createobject("scripting.filesystemobject")

52 Set act = fso.CreateTextFile(server.mappath("online_data.xls"), true)

The only suggestion so far is to:

grant the application pool

(DefaultAppPool / Classic AppPool)’s

impersonated identity read and write

permission to the physical folder

which the asp page reside

Will look at this when I get access, but other suggestions would be appreciated.

解决方案

The provided answer is correct, but I needed a little more detail on how to accomplish it. To make it really easy, follow the steps below. I was setting up an asp page counter on a sandbox system in our intranet.

Open Computer Management.

Drill down to the IIS server

Management

In the Connections pane, click on

Application Pools

In the Application Pools pane,

right-click on DefaultAppPool and

choose Advanced Settings. Look in

the Process Model section.

By default, the Identity property is

set to ApplicationPoolIdentity.

This is a built-in account.

If it's set to the default, then you

can use the built-in user

machinename\IUSR for your

permissions settings. I had to

specify the machine name because

this is a virtualized server, YMMV.

If it's not set to the default, use

that username for your permissions

settings.

Cancel out of the dialog and return

to Windows Explorer, to the folder

where you need to add permission.

Right-click to get Permission

settings.

Set up machinename\IUSR or the

non-default username you determined

in steps 6/7 above. Grant

permissions as needed.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值