Role based security problem

Jan 28, 2009 at 1:03 PM
Hi.

Firstly, awesome control, thanks.

I have a problem uploading files when the control/page is in a subfolder restricted by role based security.

Here's the config part

<location path="RegisteredUser">
        <system.web>
            <authorization>
                <allow roles="RegisteredUser"/>
                <deny users="*"/>
            </authorization>
        </system.web>
    </location>

My page lies in this folder, which only registered users may view.  (after they've logged in obviously..)
The page displays as it should, however when uploading a file it doesnt work.

I've created a subfolder under RegisteredUser, named folder1.

Here's the page's code.

<fjx:FileUploader ID="FileUploader1" runat="server">
        <Adapters>
            <fjx:FileSaverAdapter FolderName="folder1"  />
            <fjx:ThumbGeneratorAdapter FolderName="folder1"  Suffix="_thumb" MaximumHeight="200"
                MaximumWidth="200" />
        </Adapters>
    </fjx:FileUploader>

I tried doing the same under an unprotected folder, and it works.

I even tried to point the FolderName to the unrestricted folder from within the restricted page without success.

Sample:

<fjx:FileUploader ID="FileUploader1" runat="server">
        <Adapters>
            <fjx:FileSaverAdapter FolderName="~\Anonymous\folder1"  />
            <fjx:ThumbGeneratorAdapter FolderName="~\Anonymous\folder1"  Suffix="_thumb" MaximumHeight="200"
                MaximumWidth="200" />
        </Adapters>
    </fjx:FileUploader>

Any help greatly appreciated.

Coordinator
Jan 28, 2009 at 4:31 PM
Have you done this http://flajaxian.com/flajaxian.com/FileUploader2.0Help.html#HowToOvercomeFlashBug ?
Jan 29, 2009 at 7:03 AM
I tried but get the following error

Error    2    Cannot assign to 'BeginRequest' because it is a 'method group'    Management\Global.asax    40    9    C:\...\SMSManagement\

Jan 29, 2009 at 7:17 AM
I used Internet Explorer and it worked! so it has to be firefox specific. Perhaps it is indeed the flash bug you mentioned. Now i just need to get the BeginRequest working.
Jan 29, 2009 at 7:19 AM
Hi,

I got it to work.

I only needed to add

void Application_BeginRequest(object sender, EventArgs e)
    {
        com.flajaxian.FileUploader.RegisterAspCookies();
    }

to my global.asax.

Awesome control, thanks!