Groups | Blog | Home
all groups > asp.net security > july 2007 >

asp.net security : Forms authentication, downloading files and Web Dialogs


Iain
7/24/2007 9:10:00 AM
My applications allows files to be uploaded and downloaded.

I don't want to give direct access, instead to stream them out of an aspx
handler.

The files can have any extension.

The asp.net application (V2) has forms authentication.

What happens is that I launch a web dialog with a list of interesting files
in, each of which has a link (<asp:hyperlink>) which points to my handler and
some querystring properties which identify the file.

The problem is that the login page gets called up - specifically a new
browser window is opened. The user IS logged in so I don't see why the are
asked to log in again - unless it is that a new window has been opened.

If I move the link to the main browser window then the process works fine,
so clearly this is something to do with the web dialog.

Anyone shed any light on this?

Thanks

Iain
7/24/2007 10:08:04 AM
[quoted text, click to view]
Some more research (and help from an offline expert) has shown that it is
another "because it's in a dialog problem".

The trick to making this work is to create a small (0 width and height)
iframe and make that the target of the link.

AddThis Social Bookmark Button