Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
757 views
in Technique[技术] by (71.8m points)

iis 7 - IIS7 Permission Denied - ASP File Write

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:wwwrootspxxxonline_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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

  1. Open Computer Management.
  2. Drill down to the IIS server Management
  3. In the Connections pane, click on Application Pools
  4. In the Application Pools pane, right-click on DefaultAppPool and choose Advanced Settings. Look in the Process Model section.
  5. By default, the Identity property is set to ApplicationPoolIdentity. This is a built-in account.
  6. If it's set to the default, then you can use the built-in user machinenameIUSR for your permissions settings. I had to specify the machine name because this is a virtualized server, YMMV.
  7. If it's not set to the default, use that username for your permissions settings.
  8. Cancel out of the dialog and return to Windows Explorer, to the folder where you need to add permission.
  9. Right-click to get Permission settings.
  10. Set up machinenameIUSR or the non-default username you determined in steps 6/7 above. Grant permissions as needed.

This helped: http://learn.iis.net/page.aspx/140/understanding-built-in-user-and-group-accounts-in-iis-7/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...