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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:23:28+00:00 2026-05-27T00:23:28+00:00

I have created a ASMX Web Service which does some Active Directory stuff behind

  • 0

I have created a ASMX Web Service which does some Active Directory stuff behind the scene.

As I wish to retain certain information within Web Services under user session, I have decided to put [WebMethod(EnableSession = true)] and start using Session variables.

However, when I turn that option on, the return time from app -> web service -> app has became ridiculously long. (about a minute or more).

If I remove [WebMethod(EnableSession = true)], it is fairly fast.

Anyone know what is going on?

  • 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-27T00:23:29+00:00Added an answer on May 27, 2026 at 12:23 am

    Possible reasons:

    1. Session state is stored out of process (state server/ SQL server) and getting/storing it taking a long time
    2. You are making multiple concurrent requests (including service requests) under the same session. ASP.NET ensures that only one session-full (session read/write) request execute at a time and hence, multiple concurrent requests would queue up.

    EDIT :
    For #2, obvious solution is to avoid session state use – for example, can you put the relevant information into another store such as cache or database (expensive).

    If you are only reading session state in web service then you may take advantage of read-only session state (see IReadOnlySessionState). Read-only session state allows concurrent read-only requests – read/write request will still block all other requests. Now, EnableSession from WebMethod attribute does not support this – it either provides no session or read/write session. So one of the workaround can be to implement your own handler implementing IReadOnlySessionState and then route asmx request to thi handler using a http-module and then switch the handler to default one later. Because your handler requires read-only session state, you will have the read-only session state – see this forum post where such http-module that switches the handler has been given.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have ASP.NET website, and it calls the asmx web-service to do some operation
We have created a .NET 4 web service, which runs fine on a Windows
I have created a new VS2008 ASP.Net Web service project, with the default name
I have web site which serves web services (a mixture of .asmx and WCF)
i'm creating asmx web service and have to create thread to do background IO
I have a ASMX web services running as 'network service'. I want to be
I have developed a web service with the .asmx extension using C# and i
I have written a web service application, in that I have created an INI
I have created a custom SharePoint web service that was deployed to, and successfully
I have a website created with ASP.NET and a web service, both using FormsAuthentication

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.