简体   繁体   中英

Files on IIS server in ASP.NET throwing a HTTP 401 Access Denied Error

Uploading new files to an IIS web server and unzipping them into the correct directory yields 401 errors when I try to access them. When I look at the files in the directories, they are labelled in green.

At first I tried setting permissions in IIS and in Windows, but no avail. Often, I will see security issues with the user IIS_IUSRS not having the correct security access to files, and so the web server can't serve them.

I read somewhere that you can right-click the green files and go to properties, and click the unblock button near the bottom of the window, because files uploaded from another computer are not trusted until you do so. Despite this working in the past, this time it didn't.

It turns out that this is easily fixed. The green labelled files are in fact encrypted. All you need to do to fix this issue is to right-click, go to properties, then click Advanced. Then uncheck the box that says "Encrypt Contents to Secure Data" box and click ok. Rinse and repeat for all affected files and it works great.

Clues found at this SuperUser question in SonicVader's answer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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