Windows Authentication

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Windows Authentication

Guest-968

Hi Brett,

I am using the latest version of NeatUpload in my application. Everything works fine as long as I have anonymous authentication set on the virtual directory of web application. When I turn on the windows authentication and disable anonymous authentication at the root directory(Not NeatUpload folder) in IIS, the multifile.Files count is returning 0. As a result the upload alone is not functioning, rest everything including the multi file selection, progress bar are working.Its a .NET 2.0 web app, so anonymous login was ASPNET; thinking its a security issue I added read/write access to both the NeatUpload folder and the NeatUpload_Temp folder for MACHINE\ASPNET and MACHINE\IUSR_MACHINE accounts. Still I am not etting the upload to work when web app is in windows authentication.Also tried configuring the temp folder explicitly, still no luck.Pls help, below is the web.config file of web app:-

<?xml version="1.0"?>
<configuration>
 <configSections>
  <section name="neatUpload" allowLocation="true" type="Brettle.Web.NeatUpload.ConfigSectionHandler, Brettle.Web.NeatUpload"/>
 </configSections>
 <neatUpload xmlns="http://www.brettle.com/neatupload/config/2008" useHttpModule="false" maxRequestLength="2097151" maxNormalRequestLength="4096">
  <providers>
   <add name="special" type="Brettle.Web.NeatUpload.FilesystemUploadStorageProvider" tempDirectory="C:\Temp" />
  </providers>
 </neatUpload>
 <location path="Upload.aspx">
  <neatUpload useHttpModule="true" defaultStorageProvider="special" xmlns="http://www.brettle.com/neatupload/config/2008"/>
 </location>
 <appSettings/>
 <connectionStrings/>
 <system.web>
  <httpModules>
   <add name="UploadHttpModule" type="Brettle.Web.NeatUpload.UploadHttpModule, Brettle.Web.NeatUpload"/>
  </httpModules>
  <compilation debug="true" strict="false" explicit="false">
   <assemblies>
    <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
   </assemblies>
  </compilation>
  <pages>
   <namespaces>
    <clear/>
    <add namespace="System"/>
    <add namespace="System.Collections"/>
    <add namespace="System.Collections.Specialized"/>
    <add namespace="System.Configuration"/>
    <add namespace="System.Text"/>
    <add namespace="System.Text.RegularExpressions"/>
    <add namespace="System.Web"/>
    <add namespace="System.Web.Caching"/>
    <add namespace="System.Web.SessionState"/>
    <add namespace="System.Web.Security"/>
    <add namespace="System.Web.Profile"/>
    <add namespace="System.Web.UI"/>
    <add namespace="System.Web.UI.WebControls"/>
    <add namespace="System.Web.UI.WebControls.WebParts"/>
    <add namespace="System.Web.UI.HtmlControls"/>
   </namespaces>
  </pages>
  <authentication mode="Windows"/>
 </system.web>
</configuration>

Reply | Threaded
Open this post in threaded view
|

Re: Windows Authentication

Guest-968

When I am debugging step by step in VS, the same code works with Windows authentication on root folder.

Reply | Threaded
Open this post in threaded view
|

Re: Windows Authentication

Dean Brettle
Administrator
For Flash-based MultiFile uploads to work, Flash needs to be able to upload to NeatUpload/MultiRequestUploadHandler.ashx.  Flash doesn't know about Windows authentication, so if Windows auth is required to access NeatUpload/MultiRequestUploadHandler.ashx, that would explain why Flash-based MultiFile uploads aren't working.  If you try to access NeatUpload/MultiRequestUploadHandler.ashx from a machine/browser that can't do Window Auth, are you able to?

You might need to put the pages requiring Windows auth in a separate folder so that all parent folders of MultiRequestUploadHandler.ashx allow anon access.  Not sure.

--Dean
Reply | Threaded
Open this post in threaded view
|

Re: Windows Authentication

Guest-968

Hi Dean,

Thanks for the advice and its working after doing the changes you suggested.

Please validate my understanding:-

In any websites with root folder set to windows authentication only, NeatUpload control will not work even when the NeatUpload folder has anonymous access as the NeatUpload folder's parent folder is not having anonymous account access.The work around is to put all the website screens in one folder, enable windows authentication on that and enable windows & anonymous authentication on the root folder. This way we are enabling anonymous access from root folder through NeatUpload folder.

Thanks again for a wonderful product.

Craig

 

Reply | Threaded
Open this post in threaded view
|

Re: Windows Authentication

Dean Brettle
Administrator
I believe that is the case.  There might be some other way to make it work that I'm not aware of.

--Dean
Reply | Threaded
Open this post in threaded view
|

Re: Windows Authentication

Dean Brettle
Administrator
FYI, I seem to have this working locally without needing to put all the windows auth stuff in its own folder.  I just made the top-level dir only allow windows auth and made the NeatUpload subdir allow anonymous auth.  Flash-based MultiFile uploads seem to work fine in that environment.  The only problem I seem to be having is that if I restart the website, I get a login prompt when I attempt to start the upload and the upload doesn't actually occur.  Restarting the browser makes that problem go away.  This is all with IE8+IIS7 on a stand-alone Vista box.

--Dean