0

I would like to find a best practice to debug an existing ASP.NET MVC application. That's a Web Role already hosted into Azure. The application is using Windows Azure Caching. The configuration file has been defined with the settgins of an Azure Account ->

<dataCacheClient name="default">
   <hosts>
      <host name="xxxx.cache.windows.net" cachePort="22233" />
   </hosts>
</dataCacheClient>

I would like to debug the code. What's the best approach in this case ?

I have already made a test by changing the Host with localhost but it's not working.

Thank you,

PS: I have installed the new SDK 1.8

fix105
  • 234
  • 1
  • 6
  • 16
  • Can you be more specific about what you're trying to do or what the problem is? What code are you trying to debug? What does Azure Caching have to do with anything? One thing I can say is that you can't just change you Azure Cache to point to localhost and expect it to work. You don't have the caching service installed locally, because there isn't a version you can install locally. – Brian Reischl Mar 25 '13 at 20:56
  • I'm trying to debug an existing application. The application is using Table Storage and Caching. To debug Table Storage, i m using the DevStorage and re-create the tables via the Azure Storage Explorer. I m looking for a solution to debug the functionalities which are using Caching as I cannot access to Azure (Company is blocking some ports and I can't access to Azure via my dev. machine). So the question is: Is there any option for debugging ? – fix105 Mar 26 '13 at 09:49

1 Answers1

2

There is no locally-installed equivalent to Azure Shared Caching. Windows Server AppFabric Caching is somewhat close, but not exactly the same.

You could try to get IT to unblock the ports so you can use Azure. Though if you have multiple developers on a project, each dev would need their own cache instance to avoid stepping on each other's data.

Another option is to completely encapsulate your caching in interfaces. Then you can use something completely different to develop on. In the past I've used the MemoryCache in-memory store for development. You could also use AppFabric Caching, or memcached, or really anything else. You just need to be aware of the differences between your dev and production systems.

Edit: Another option would be switching from Shared Caching to caching in your roles (I'm not sure what the official name for this is, these days). I believe this works locally too. The major drawback is that it's only visible within one Hosted Service. If you only have one Hosted Service anyway, that's no problem. If you have several Hosted Services that need to share data, then it could an issue.

Brian Reischl
  • 7,216
  • 2
  • 35
  • 46
  • Thank you Brian for your answer. That's really clear on the different approach. I mean, it's strange to me that Microsoft didn't create a tool like Azure Storage Explorer. We can emulate Blob / Table and Queue but we cannot for the cache. – fix105 Mar 27 '13 at 13:51
  • It is frustrating, and the gap is growing with all the newer stuff like Mobile Services, Media Services, etc. By the way, I added a note about in-role caching vs. shared caching that might be useful to you. – Brian Reischl Mar 27 '13 at 14:36