Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 307135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:31:51+00:00 2026-05-12T07:31:51+00:00

I have an ASP.NET MVC view that uses jquery.Uploadify to post files to one

  • 0

I have an ASP.NET MVC view that uses jquery.Uploadify to post files to one of my controllers for use in my application and one of the side effects I noticed with Uploadify is that when the Flash file Uploadify uses to submit files to the server posts to my controller it gets its own SessionID from ASP.NET. This would be fine, of course, if my Upload controller didn’t use the Session to store a list of files that have been uploaded by the current user for future manipulation by my application… So given this issue, after I upload files with my View, the current user’s session does not contain any of the files that were just posted.

Any suggestions on how to achieve what I want without relying on Sessions (and, preferably, without a database)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T07:31:51+00:00Added an answer on May 12, 2026 at 7:31 am

    This is the solution I came up with. I haven’t done much testing, but it seems to be an acceptable alternative to Session in my current scenario. I will use the Global.asax’s Session_End/Session_Start to ensure rows are created and removed as needed.

    public class UserTable : Dictionary<string, Dictionary<string, object>>
    {
        public new object this[string key]
        {
            get
            {
                object value = null;
                if (HttpContext.Current != null)
                {
                    var sessionId = HttpContext.Current.Session.SessionID;
                    if (ContainsKey(sessionId) && base[sessionId].ContainsKey(key))
                        value = base[sessionId][key];
                }
                else
                    throw new Exception("No HttpContext present.");
                return value;
            }
            set
            {
                if (HttpContext.Current != null)
                {
                    var sessionId = HttpContext.Current.Session.SessionID;
                    if (!ContainsKey(sessionId))
                        Add(sessionId, new Dictionary<string, object>());
                    if (!base[sessionId].ContainsKey(key))
                        base[sessionId].Add(key, value);
                    else
                        base[sessionId][key] = value;
                }
                else
                    throw new Exception("No HttpContext present.");
            }
        }
    
        public object this[string sessionId, string key]
        {
            get
            {
                object value = null;
                if (ContainsKey(sessionId) && base[sessionId].ContainsKey(key))
                    value = base[sessionId][key];
                return value;
            }
            set
            {
                if (!ContainsKey(sessionId))
                    Add(sessionId, new Dictionary<string, object>());
                if (!base[sessionId].ContainsKey(key))
                    base[sessionId].Add(key, value);
                else
                    base[sessionId][key] = value;
            }
        }
    
        public void Add(string sessionId)
        {
            Add(sessionId, new Dictionary<string, object>());
        }
    
        public void Add()
        {
            if (HttpContext.Current != null)
                Add(HttpContext.Current.Session.SessionID);
            else
                throw new Exception("No HttpContext present.");
        }
    
        public new void Remove(string sessionId)
        {
            base.Remove(sessionId);
        }
    
        public void Remove()
        {
            if (HttpContext.Current != null)
                Remove(HttpContext.Current.Session.SessionID);
            else
                throw new Exception("No HttpContext present.");
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a ASP.NET MVC 3 application that uses unobtrusive jQuery validation. The page
I have an application that uses ASP.NET MVC. I have it deployed to a
I have built an ASP.NET MVC web application that uses Entity Framework. To provide
I have an asp.net mvc application that uses partial views. How do I know
I have an ASP.NET MVC 3 application with an action that uses both the
I have an older ASP.NET MVC application that uses classic web forms views. As
I have an ASP.NET MVC Partial View that contains a Html.TextBox that is configured
I have an ASP.NET MVC app that opens a Request view in a new
I have an ASP.NET MVC view on which I've placed jQuery tabs. I'm loading
I have simple jQuery Mobile site created using asp.net mvc 2 and uses basic

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.