none
Service bus connection refused(Accessed denied) RRS feed

  • 问题

  •  Hi All

           I use servicebus API to connect Servicebus for windows server 1.1.the code is as below:

            var namespaceManager = NamespaceManager.CreateFromConnectionString(namespaceConnectionString);  

            namespaceManager.GetQueues();

           this code can work well in local machine(Servicebus 1.1 installed).

           but if I run the same code in the remote machine.sometimes can work well.

           sometimes will throw UnauthorizedAccessException.(Access Denied)

           I already imported certicate.I want to know why.is there some network issue? Could some one help me? thanks

           

    

    2013年12月25日 7:16

答案

全部回复

  • Hi,

    It's a certificate validation issue.  At this point, request has not reached ServiceBus yet. I found a similar thread (http://social.msdn.microsoft.com/Forums/windowsazure/en-US/43dd8239-5b42-4e80-8d46-5ab37b301d39/unauthorizedaccessexception-microsoftservicebus?forum=servbus), you can try the post that Loc Phan provided.

    Best Regards


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    2013年12月25日 9:18
    版主
  • Hi

       I already import the Certificate into the remote machine.here is more detailed exception that service bus return:

               '.. Method <GetQueues>b__3c: retry 2 of 10.
    <20:16:12> Exception: The token provider was unable to provide a security token while accessing 'https://uspnsvulm132.americas.hpqcorp.net:9355/CISAsynchronous/$STS/Windows/'. Token provider returned message: '<HTML><HEAD>
               <TITLE>Access Denied</TITLE>
               </HEAD>
               <BODY>
               <FONT face="Helvetica">
               <big><strong></strong></big><BR>
               </FONT>
               <blockquote>
               <TABLE border=0 cellPadding=1 width="80%">
               <TR><TD>
               <FONT face="Helvetica">
               <big>Access Denied (connect_method_denied)</big>
               <BR>
               <BR>
               </FONT>
               </TD></TR>
               <TR><TD>
               <FONT face="Helvetica">
               Your request attempted a CONNECT to a port "9355" that is not permitted by default.
               </FONT>
               </TD></TR>
               <TR><TD>
               <FONT face="Helvetica">
               This is typically caused by an HTTPS URL that uses a port other then the default of 443.
               </FONT>
               </TD></TR>
               <TR><TD>
               <FONT face="Helvetica" SIZE=2>
               <BR>
               For assistance, contact your network support team.
               </FONT>
               </TD></TR>
               </TABLE>
               </blockquote>
               </FONT>
               </BODY></HTML>

              is there certificate expired? or may be certificate importing failed? I am still confused.I use win7 enterprise   version

    2013年12月25日 12:24
  • Hi,

    Based on your description, your code in the remote machine sometimes can work well, sometimes will throw UnauthorizedAccessException. May I know Is there some other information when throw errors, the service bus in Windows Azure Service Dashboard (http://www.windowsazure.com/en-us/support/service-dashboard/)
    was running normally? Or was there something wrong with your network?

    About this error, I found a similar thread, you can try to add the two lines codes. The thread link
    is: http://answers.flyppdevportal.com/categories/azure/servicebus.aspx?ID=c717a480-8fc1-493f-9f0e-4b87f9b372d0

    Hope this helps




    2013年12月26日 5:30