Issue with progress.aspx and SessionBasedUploadStateStoreProvider

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

Issue with progress.aspx and SessionBasedUploadStateStoreProvider

alan
I am not sure if this is because I am trying to do this in a Sharepoint 2007 setting.. but I am having some issues here. Let me post my web.config setup for NeatUpload first. I have the httpModule installed at the top of the httpmodules section and the session state is setup as follows: Now we have a multi farm setup... with a load balancer that supports sticky sessions. If I use InProcUploadStateStoreProvider then the progress bar at least shows up... I am not sure if it is acurate yet since I am testing locally. But when I use SessionBasedUploadStateStoreProvider... All I keep getting are errors on the progress.aspx page. The error the page shows is: ------------------------------------------------------------------------------- The remote server returned an error: (503) Server Unavailable. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Net.WebException: The remote server returned an error: (503) Server Unavailable. ------------------------------------------------------------------------------- The url it tries to go to for progress.aspx is: /NeatUpload/Progress.aspx?barID=ctl00_PlaceHolderMain_DetailMOT_progressBarId&postBackID=CAF772FB6590DC339613FF5F747B5D880&canScript=true&canCancel=true Now like I said if use the InProc solution it at least loads. Any ideas?
Reply | Threaded
Open this post in threaded view
|

Re: Issue with progress.aspx and SessionBasedUploadStateStoreProvider

alan

Posting again to try and get formatting right for easy reading.. and fixed web.config section so it can show on page.

 

I am not sure if this is because I am trying to do this in a Sharepoint 2007 setting.. but I am having some issues here.

Let me post my web.config setup for NeatUpload first.

[neatUpload
        useHttpModule="true"
        maxNormalRequestLength="4096"
        maxRequestLength="2097151"
        defaultStorageProvider="FilesystemUploadStorageProvider"
        defaultStateStoreProvider="InProcUploadStateStoreProvider"
 decryptionKey=""]
        [providers]
            [add name="FilesystemUploadStorageProvider" tempDirectory="C:\Files\Temp\" type="Brettle.Web.NeatUpload.FilesystemUploadStorageProvider, Brettle.Web.NeatUpload,Version=1.3.3670.34557,Culture=neutral,PublicKeyToken=c95290d92c5893c8"/]
            [add name="InProcUploadStateStoreProvider" type="Brettle.Web.NeatUpload.SessionBasedUploadStateStoreProvider, Brettle.Web.NeatUpload,Version=1.3.3670.34557,Culture=neutral,PublicKeyToken=c95290d92c5893c8"/]
        [/providers]
    [/neatUpload]

 

I have the httpModule installed at the top of the httpmodules section and the session state is setup as follows: Now we have a multi farm setup... with a load balancer that supports sticky sessions.

If I use InProcUploadStateStoreProvider then the progress bar at least shows up... I am not sure if it is acurate yet since I am testing locally. But when I use SessionBasedUploadStateStoreProvider... All I keep getting are errors on the progress.aspx page. The error the page shows is:

-------------------------------------------------------------------------------

The remote server returned an error: (503) Server Unavailable.

Description: An unhandled exception occurred during the execution of the current web request.

Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Net.WebException: The remote server returned an error: (503) Server Unavailable.

-------------------------------------------------------------------------------

The url it tries to go to for progress.aspx is: /NeatUpload/Progress.aspx?barID=ctl00_PlaceHolderMain_DetailMOT_progressBarId&postBackID=CAF772FB6590DC339613FF5F747B5D880&canScript=true&canCancel=true

Now like I said if use the InProc solution it at least loads.

Any ideas?

Reply | Threaded
Open this post in threaded view
|

Re: Issue with progress.aspx and SessionBasedUploadStateStoreProvider

Dean Brettle
Administrator
What version of NeatUpload are you using?  Also, please post the stack trace. 

Since your load balancer supports sticky sessions, the InProcUploadStateStoreProvider will probably work.  If you want to use the SessionBaseUploadStateStoreProvider, decryptionKey should not be set to ''.  It should either not be set at all (to get an auto-generated key on each server), or it should be set to a fixed 32-digit hex string.

However, none of that is relevant to your error.  It looks like you might need to set the handlerUrl attribute of the <add> element that adds the SessionBasedUploadStateStoreProvider so that it refers to the fully qualified URL of the NeatUpload/UploadStateStoreHandler.ashx page as seen from the server.  In some envs, servers can't access themselves using the hostname that internet clients use, and that can cause the kind of error you are seeing. The handlerUrl attr is designed to address that.

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

Re: Issue with progress.aspx and SessionBasedUploadStateStoreProvider

alan

I still seem to be having some issues.. I have tried the following for handleurl:
~/NeatUpload/UploadStateStoreHandler.ashx
/NeatUpload/UploadStateStoreHandler.ashx

And this one with http:// in front:
hostname/NeatUpload/UploadStateStoreHandler.ashx

Here is the stack trace:

[WebException: The remote server returned an error: (503) Server Unavailable.]
            System.Net.WebClient.UploadValues(Uri address, String method, NameValueCollection data) +2949747
            Brettle.Web.NeatUpload.SimpleWebRemoting.MakeRemoteCall(Uri uri, HttpCookieCollection httpCookies, Byte[] encryptionKey, Byte[] validationKey, String encryptionAlgorithm, String validationAlgorithm, Object[] methodCall) +1335
            Brettle.Web.NeatUpload.SimpleWebRemoting.MakeRemoteCall(Uri uri, Object[] methodCall) +123
            Brettle.Web.NeatUpload.SessionBasedUploadStateStoreProvider.Load(String postBackID) +129
            Brettle.Web.NeatUpload.UploadStateStore.OpenReadOnly(String postBackID) +26
            Brettle.Web.NeatUpload.UploadHttpModule.Brettle.Web.NeatUpload.IUploadModule.BindProgressState(String postBackID, String controlUniqueID, IUploadProgressState progressState) +33
            Brettle.Web.NeatUpload.UploadModule.BindProgressState(String postBackID, String controlUniqueID, IUploadProgressState progressState) +309
            Brettle.Web.NeatUpload.ProgressPage.SetupContext() +147
            Brettle.Web.NeatUpload.ProgressPage.OnLoad(EventArgs e) +120
            System.Web.UI.Control.LoadRecursive() +66
            System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2604
            

 

I was able to get Progress.aspx to load by using the actual location on the drive:

C:\Inetpub\wwwroot\site\NeatUpload\UploadStateStoreHandler.ashx

But the progress does not update.

Reply | Threaded
Open this post in threaded view
|

Re: Issue with progress.aspx and SessionBasedUploadStateStoreProvider

Dean Brettle
Administrator
The server probably can't access itself using the same hostname as the client uses.  Try running a browser on the server and using it to access your app.  What URL do you need to use to make that work?  Whatever hostname you use inthat url, use that in the handlerUrl.

--Dean