ASP.NET Output Cache Provider problem

thohan

New member
#1
The documentation under the heading "ASP.NET Output Cache Provider" has a snippet of code. We didn't have context for this snippet as it wasn't in our web.config previously, so an internet search suggested that it go inside <system.webServer>. When we do that, we get an squiggly line on the <outputCache> element. The error message tooltip in Visual Studio is this: "The element 'caching' has invalid child element 'outputCache'. List of possible elements expected: 'profiles'."

So maybe we're placing this snippet in the wrong location, not sure.

For what it's worth, here is our old appfabric-related web.config pieces, with the fat trimmed:

<configSections>
<section name="dataCacheClient" type="Microsoft.ApplicationServer.Caching.DataCacheClientSection,Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" allowLocation="true" allowDefinition="Everywhere"/>
</configSections>

<!-- ... -->

<dataCacheClient>
<hosts>
<host name="#{AppFabricIP}#" cachePort="22233"/>
</hosts>
</dataCacheClient>

We're wondering what the magic sauce is that's missing. I'm guessing that once the <outputCache> issue is solved, we'll be in business. Thank you for your time!
 

thohan

New member
#2
It seems that the <caching> and it's innards all belong inside of <system.web>. That at least solved our server error and our Visual Studio error message.

We have replaced our old appfabric references with the soss references in the web project, but still don't seem to be connecting. Our web project (a web API) is on the same server as the ScaleOut service, for what it's worth.

I have attached a sanitized version of our web.config if that helps. Thanks again!
 

Attachments

thohan

New member
#3
A bit of progress:
When the service is running, no errors. However, when we disable the service, we get this error:

"Unable to open a handle to the local StateServer service"

That suggests that we are connecting. However, it appears that nothing is being cached. It's late and we're stumped. I'll check back later for replies.
 

thohan

New member
#4
We had to replace a few of our old appfabric calls with the new NamedCache calls and we finally got objects caching. Very exciting moment for us. However, when we reload the page and read from cache, we are on a page with about 160 or so cached objects and we're reading about 3 per second max.

I'm guessing it's pretty tricky to troubleshoot this without seeing the code, but if anything jumps out, let me know.
 

markw

Administrator
Staff member
#5
I apologize for the slow reply (we just migrated to a new forum platform and our notifications appear to be misconfigured).

3 reads/second tells us that you're probably facing a connectivity problem between your app and the ScaleOut caching tier--you may be hitting the 250 millisecond timeout in your config file. Is the delay occurring in your NamedCache API calls or just in the the ASP.NET Output Cache provider?

In any case, yes, debugging this without knowing more about your usage will be a challenge--if you're still seeing this problem then please shoot an email to [email protected] and we'll work to schedule a WebEx session so you can walk us through your use case.
 

thohan

New member
#6
It is occurring in our NamedCache API calls. We had a call with one of the devs and we have a few things to try. I'll get back with you when we have had a chance to try them and we can see where we're at then. Thanks!
 
Top