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 6674009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:41:43+00:00 2026-05-26T03:41:43+00:00

Possible Duplicate: Can I access session state from an HTTPModule? I have set up

  • 0

Possible Duplicate:
Can I access session state from an HTTPModule?

I have set up and am using SQLServer State handling and it works well within my project. But I have shared resource file that provides handlers for loading images form the database, etc. In this module, the Session is always Null. I have tried the following:

  1. Full path for Session variable i.e., HttpContext.Current.Session[“varname”];
  2. I have added the sessionState line to the web.config for the user controls file that has the handlers, just like I did for the main project.

Is there anything else to make session variables available in a module? I am relatively new to .net so I may have used the incorrect terminology. The be clear, I have a ‘Solution’ defined. In this solution is a ‘Project’ called CMS. There are also two other projects in the solution – one for handling shared classes and one for handlers. These external files are included by reference in the main Project (of course, or it wouldn’t work at all). It is in these ‘external’ projects that I cannot seem to be able to access the Session variables.

Any help is greatly appreciated. O, and while I am fine with RTFM type responses, previous questions I have asked point me to long, theoretical MSDN documents that rarely help because they are too deep for my comprehension. Try to give a brother a break huh?

  • 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-26T03:41:44+00:00Added an answer on May 26, 2026 at 3:41 am

    You need to use either the IReadOnlySessionState or the IRequiresSessionState interface in the class declaration, like this:

    public sealed class MyHandler : IHttpHandler, IReadOnlySessionState {
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Can I set a breakpoint on 'memory access' in GDB? I have
Possible Duplicate: Access x86 COM from x64 .NET I have a COM object which
Possible Duplicate: Can't pass mysqli connection in session in php Many of us have
Possible Duplicate: Can I set a breakpoint on 'memory access' in GDB? I want
Possible Duplicate: Default class inheritance access I know I can set the protection level
Possible Duplicate: Why can I only access static members from a static function? While
Possible Duplicate: How can I access local scope dynamically in javascript? Hi all. We
Possible Duplicate: Can Read-Only Properties be Implemented in Pure JavaScript? I have an Object
Possible Duplicate: How can I pre-set arguments in JavaScript function call? (Partial Function Application)
Possible Duplicate: Is there a reason you can not define the access modifier on

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.