IIS: Anonymous and WIndows Authentication

IIS: Anonymous and WIndows Authentication

醉生梦死 发布于 2021-11-27 字数 717 浏览 623 回复 1 原文

Scenario

For a multiple file uploader I am implementing, I need to have a handler within a windows authenticated site that uses anonymous access.

As detailed here, this is because Flash cannot use windows authentication. The aforementioned post states that the only way to accomplish this is to create a completely separate site. However, this seems like a big hassle just for an uploader.

Is there a way to work around this limitation of IIS?

Notes

I am using asp.net 3.0 and IIS6 on a Windows 2003 Server with Service Pack 2.

如果你对这篇文章有疑问,欢迎到本站 社区 发帖提问或使用手Q扫描下方二维码加群参与讨论,获取更多帮助。

扫码加入群聊

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

活雷疯 2022-06-07 1 楼

You can create a virtual directory as a sub-directory to the main site.

  1. Create a folder somewhere on the machine. Make sure the IUSR account has read/write access to this folder.

  2. Create a virtual directory in your website through IIS. Point it to the folder you created above.

  3. Allow anonymous access on the virtual directory, and clear windows authentication.

You should be good to go. Please note that, with anonymous access, anyone will be able to read/write to this folder, even without using your Flash application.

The way I've done this in the past was to store the documents in a database, and require a session token to be passed from the Flash application before returning the file from the database. You can apply a similar approach to a file share (make a upload.aspx that will check the auth then grab the file from a folder that is not accessible from the web).