SlickUpload
Welcome Guest Search | Active Topics | Log In | Register

Error on Azure Options
alandmrc
#1 Posted : Thursday, October 06, 2011 6:16:22 PM
Rank: Newbie

Groups: Registered

Joined: 10/3/2011
Posts: 8

I've had great success using SlickUpload on my development and qa sites. However, when I move it up to an Azure hosted environment, the exception below gets thrown after a file is selected and the upload is attempted. Any ideas on what's going on here and how to resolve it? We're storing SessionState in an Azure hosted SQL Server database.

Thanks,
Alan

Exception information:
    Exception type: WebException
    Exception message: The remote server returned an error: (404) Not Found.
   at System.Net.HttpWebRequest.GetResponse()
   at Krystalware.SlickUpload.Web.SessionStorage.SessionStateSessionStorageProvider.Ⴗ(String Ⴓ, Object Ⴐ, HttpCookieCollection Ⴗ)
   at Krystalware.SlickUpload.Web.SessionStorage.SessionStateSessionStorageProvider.Ⴓ(String Ⴓ, Object Ⴐ)
   at Krystalware.SlickUpload.Web.SessionStorage.SessionStateSessionStorageProvider.GetSession(String uploadSessionId)
   at Krystalware.SlickUpload.Web.SessionStorage.AdaptiveSessionStorageProvider.GetSession(String uploadSessionId)
   at Krystalware.SlickUpload.Web.SlickUploadModule.Ⴅ(Object Ⴓ, EventArgs Ⴐ)
   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

 

alandmrc
#2 Posted : Thursday, October 06, 2011 7:35:51 PM
Rank: Newbie

Groups: Registered

Joined: 10/3/2011
Posts: 8
Figured it out, although I'm curious if you might have a workaround for this scenario. It appears that when uploading, SlickUpload posts back to the url where the request was originally received. Since this is coming from the web server back to itself, the url needs to resolve properly on that server. So the resolution was to update the server host file so that the url would be properly resolved.

This becomes a bit of a deployment wart since the IPs are generated dynamically when the Azure web is created in the Staging environment. It's not difficult, just an extra manual step that needs to take place. Any hooks available that would allow a little finer control on how SU posts back to the server?

Thanks!
Axosoft
#3 Posted : Friday, October 07, 2011 10:52:35 AM
Rank: Administration


Groups: Administrators

Joined: 7/7/2005
Posts: 1,586
Location: Scottsdale, AZ

This is part of the SlickUpload SessionStateSessionStorageProvider standard implementation. There is one limitation to session state that most people aren't aware of -- only one request can access session state at a time. All other requests will block until the first request is done. This makes sense because you don't really want requests stepping on eachother's session, but it creates a problem for us in SlickUpload. The upload is a long running request. If it were to grab the session state lock, progress requests couldn't access the session to get the information back.

The way we have solved this is that the upload request doesn't use session state, but instead accesses session state by calling the SlickUpload.axd with parameters that tell it to access the session state. This way, the session state access requests are short lived and don't block anything.

By default, SlickUpload uses a reference to the same URL it was initially called on, but there is a (currently undocumented) way to override that. Add the handlerUrl attribute to the sessionStorageProvider config and point it to SlickUpload.axd. Something like:

    handlerUrl="http://192.168.1.244/SlickUpload.axd"

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.