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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:52:04+00:00 2026-05-24T08:52:04+00:00

I’ll preface this by saying that I’ve been developing in .NET for many years,

  • 0

I’ll preface this by saying that I’ve been developing in .NET for many years, and VB/BASIC for many years before that, but my background is mostly in desktop applications and system interfaces – I’m still pretty new to all this web application stuff, so I apologize up front if this is a silly question.

That said, here’s my question: when you create an object in an ASPX page and store it in cache, how can you access it from an ASMX web service that resides in the same application?

To further elaborate: I have a single web application which includes ASPX pages, an ASMX web service, and a class library consisting of two object classes. When the user signs in to the application, they configure some settings, and the objects are created and stored in a system.Web.Caching.Cache object. The custom objects are then pulled out of cache on the next page, and the user then makes an AJAX call (via jQuery) to the web service to retrieve some data.

The problem is that in the web service response, I need to parse the returned data based on the content of the user-created objects stored in the web application’s cache. However, I can’t find any way to access the cached object from inside the web service.

I have a sneaking suspicion that it may be possible to serialize my custom .NET objects into JSON objects and pass them via the AJAX call to the web service for deserialization, but frankly, I would have no idea how to even begin at that. Plus the objects are potentially 30 – 40K in size, and the AJAX call is being made as frequently as once every 3 seconds, so I’d really like to avoid the overhead of passing all that extra data with each call, especially since the data I need is already sitting in memory in the application where the web service resides.

So once again, I ask: when you create an object in an ASPX page and store it in cache, how can you access it from an ASMX web service that resides in the same application?

Is this making sense? Am I crazy? Missing something obvious? Any insight anyone can provide would be VERY highly appreciated. Thanks!

  • 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-24T08:52:05+00:00Added an answer on May 24, 2026 at 8:52 am

    You can access current HTTP pipeline state using HttpContext.Current. So for accessing the cache, you need to use HttpContext.Current.Cache.

    BTW, asmx web services are considered to be legacy technology (see this) – so I will suggest you to migrate to WCF services. If you go for WCF services, then you must enable ASP.NET compatibility mode (see this) to access HttpContext.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I want to count how many characters a certain string has in PHP, but
I have a French site that I want to parse, but am running into
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have some data like this: 1 2 3 4 5 9 2 6

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.