none
Azure Cache Problems

    Question

  • Hello,

    In the past I have successfully used the Azure Caching preview, I am currently working on a project that needs caching, so I thought I would just kick in the Azure Caching NuGet and use that.

    But I appear to be missing something, I have so far spent the last 3 hours trying to work out what won't work. I have even resorted to creating a brand new project with just the barebones in and I am still having problems.

    So this is what I have done, my aim for now is just to store one object in the cache, in a bare bones project.

    • I created a new "Cloud Project" (.net 4.5), and added a MVC4 application and a Cache Worker Role.
    • I have added the NuGut for the Azure Cache to the MVC application.
    • I then created a new API controller in the MVC app.
    • I set the web.config so the cache pointed at my Cache Worker Project
    • I then added the following code.
        Function GetTest() As TempMe
            Dim x As New DataCache()
    
            Dim y As New TempMe
            x.Put("x1", y)
    
            y = x.Get("x1")
            Return y
    
        End Function
    
        Class TempMe
            Property Value As String
        End Class

    I then use fiddler to call the API as I normally would, and I debug and step in to the first line.

      Dim x As New DataCache()

    And it just locks up and I get the following in the output window.

    iisexpress.exe Warning: 0 : WARNING: <DistributedCache.SocketClientChannel.1> Request 1 to host net.tcp://127.255.0.1:20004/ failed Status=ChannelOpenFailed[System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 127.255.0.1:20004
       at Microsoft.ApplicationServer.Caching.AsyncResultNoResult.EndInvoke()
       at Microsoft.ApplicationServer.Caching.AsyncResult`1.EndInvoke()
       at Microsoft.ApplicationServer.Caching.TcpClientChannelFactory.EndConnect(IAsyncResult asyncResult)
       at Microsoft.ApplicationServer.Caching.TcpClientChannel.ConnectionCallback(IAsyncResult result)]
    iisexpress.exe Warning: 0 : WARNING: <SimpleSendReceiveModule> c82fa17d-390e-4f2d-81b0-aa3ad6250891:Request - 1, result - Status=ChannelOpenFailed[System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 127.255.0.1:20004
       at Microsoft.ApplicationServer.Caching.AsyncResultNoResult.EndInvoke()
       at Microsoft.ApplicationServer.Caching.AsyncResult`1.EndInvoke()
       at Microsoft.ApplicationServer.Caching.TcpClientChannelFactory.EndConnect(IAsyncResult asyncResult)
       at Microsoft.ApplicationServer.Caching.TcpClientChannel.ConnectionCallback(IAsyncResult result)] for end point [net.tcp://127.255.0.1:20004]

    I appear to have not set something up correctly, I get this in my main application which I tried to add it to first then I am now getting it in my barbones project.

    If anyone has any experience, or pointers at where I am going wrong I would appreciate it.

    Monday, November 26, 2012 8:57 PM

Answers

  • Hi Johnson

    Thank you for your reply, I do have all the emulators running, and I have the October release of release of Azure installed.

    I came back to the same problem this morning, but all my above code is now working, the only two differences is that I installed the new VS update last night before the machine shut down.

    I am not sure what caused the issue but I suspect the reboot fixed the issue, moreso than the update.

    But either way the error has now gone away.

    Thanks for your help.

    Tuesday, November 27, 2012 12:27 PM

All replies

  • Hi, please check whether your storage emulator is running. Locally, by default cache is stored in storage emulator.

    In addition, please make sure you don't have Windows Server AppFabric installed, as pointed out in the release notes (http://msdn.microsoft.com/library/jj651667.aspx), it may conflict with Windows Azure cache.

    Best Regards

    Tuesday, November 27, 2012 11:15 AM
    Moderator
  • Hi Johnson

    Thank you for your reply, I do have all the emulators running, and I have the October release of release of Azure installed.

    I came back to the same problem this morning, but all my above code is now working, the only two differences is that I installed the new VS update last night before the machine shut down.

    I am not sure what caused the issue but I suspect the reboot fixed the issue, moreso than the update.

    But either way the error has now gone away.

    Thanks for your help.

    Tuesday, November 27, 2012 12:27 PM
  • Hi, I'm glad to hear that you resolve this issue.

    Thank you for sharing your experience here.

    Best Regards


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework

    Wednesday, November 28, 2012 2:30 AM
    Moderator