I have my webUpload control set up in a webForm. It works to the extend that it uploads a file and saves it in my 'Uploads' directory. But the problem is that I need the session available from HttpContext.Current.Session to be able do what I want with the file. It is evaluating as null and I don't understand why.
Hello chadc,
I have opened a support ticket on your behalf. This is the case number CAS-84803-P697X8. We will continue our communication regarding this through the support ticket. Thank you for using our community.
Sincerely,
Georgi Sashev
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support
Hi Georgi,
Has this issue been resolved yet? I am running into the same issue with needing to access the HttpContext.Current.Session as well.
This fix does not work for me. With out the line of code suggested, I get an error thrown(which is expected from what this post states). With the fix in place, I get a blank value. (I am coding in VB)
I have added this to the page_load
Dim Session = Me.Page.Session
Please let me know if there is something I am missing on the work around.
We are using
string sessionValue = Session["SomeData"].ToString();
this works fine for us.
FYI: The page_load event never fires during any webuploader event handlers.
Lenny
This is what I get.
Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration.
I have no problem with Sessioin variables in other parts of the page, only in the webupload uploadfinishing call.
Thanks for your help.
Is there anyone from infragistsics that could give me more information on the workaround?
Thank you,
Hi dgilbert17,
As I see you have applied this workaround: 3) As I said one workaround is to play with your session in page_load. For instance to set var session = this.Page.Session in your Page_Load event handler.
Can you send us some little sample it can contain your web.config and the aspx page(with the code behind) so we can try to reproduce this and to fix it.
Thanks,
Miro Hristov
Hi, I still have the error when using the upload component in a StateServer environment. It doesn't happen when using InProc SessionState. Any solution ?
Hi,
This sample will work for all the three released versions - 11.1, 11.2 and 12.1
Thanks,Miro Hristov
This is for version 11.1, not 12.1
Please check the attached sample. I have added a simple webpage where I use session to store how many times files are uploaded.
DGilbert17, please can you send us full sample? You can send us in VB or C# as you prefer
Protected
Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)Handles Me.Load
End Sub
Private
WebUpload1.UploadFinishing
.wdgloans.Behaviors.Selection.SelectedRows
MsgBox(Session(
"Activeloan"))
The msgbox shows Blank for the session variable