简体   繁体   English

Microsoft VBScript运行时错误“800a0046”权限被拒绝

[英]Microsoft VBScript runtime error '800a0046' Permission denied

I get the following error: 我收到以下错误:

Microsoft VBScript runtime error '800a0046' Permission denied Microsoft VBScript运行时错误“800a0046”权限被拒绝

When running a classic asp application. 运行经典的asp应用程序时。

The error is here: (in the CreateTextFile line) 错误在这里:(在CreateTextFile行中)

Dim myFSO
set myFSO = Server.CreateObject("Scripting.FileSystemObject")
myFSO.CreateTextFile(fName)

I know I can get around this problem by giving "Full control" to the "Everyone" user. 我知道我可以通过向“Everyone”用户提供“完全控制”来解决这个问题。 This is a publicly accessible folder on our server, so I worry that this is a security risk? 这是我们服务器上的可公开访问的文件夹,所以我担心这是一个安全风险?

I would prefer to be able to give full permission to someone like "IIS_IUSRS", but this doesn't work. 我希望能够给像“IIS_IUSRS”这样的人完全许可,但这不起作用。 It's as if it's a different user being used for this. 就好像它是一个不同的用户。

Is this a security risk? 这是安全隐患吗? Anyone know what I should be doing? 谁知道我应该做什么?

You should either find the anonymous user of your specific website and give write access to that specific user or set the application pool identity of the website to Local System so that the website would have permission. 您应该找到特定网站的匿名用户并授予该特定用户写入权限,或者将该网站的应用程序池标识设置为本地系统,以便该网站具有权限。

To find your IUSR also known as the anonymous user in IIS7, open your website in IIS in Features View and go to Authentication and edit Anonymous Authentication. 要在IIS7中找到您的IUSR(也称为匿名用户),请在“功能视图”中的IIS中打开您的网站,然后转到“身份验证”并编辑“匿名身份验证”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM