MSDN > 論壇首頁 > Windows Azure > Error consuming cloud WCF through ASP.NET client but it works with the console based client
發問發問
 

已答覆Error consuming cloud WCF through ASP.NET client but it works with the console based client

  • 2009年7月3日 上午 07:52nikhil_chinchwade 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    I have a WCF service deployed at azure live cloud.  I am able to consume the cloud deployed wcf service through a console based client running on my local machine.   But when i try to consume the cloud wcf service through ASP.NET web application running on my local machine it gives me an error. 
    Exception:"There was no endpoint listening at http://____.cloudapp.net/___.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details."
    Inner Exception:"The remote name could not be resolved: '____.cloudapp.net'"

解答

所有回覆

  • 2009年7月3日 上午 09:07Yi-Lun LuoMSFT, 版主使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Hello, since you an consume the service from a console application, I think the service is working fine. The problem is on the client side. Can you compare the configuration and code between the console application and the ASP.NET application? Are there any differences?
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
  • 2009年7月6日 上午 05:46nikhil_chinchwade 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    hey thanks for replying:).   I have already compared two of the configuration files and those look more than similar :).  Does anyone have any idea regarding this??
  • 2009年7月6日 上午 07:01Yi-Lun LuoMSFT, 版主使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Are you behind a proxy? You can try to add the following to your configuration file. But if proxy is the problem, it can't describe why it works in a console application...

    <

     

    system.net>

    <

     

    defaultProxy>

    <

     

    proxy proxyaddress="youraddress"/>

    </

     

    defaultProxy>

    </

     

    system.net>

     
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
  • 2009年7月6日 上午 09:43nikhil_chinchwade 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     

    I guess even that is not the problem, still i am trying out the solution.  I have a reason for that:  If I configure the WCF service consumers in a web role and a worker role and upload it to azure live cloud, my worker role is able to consume the wcf service but not the web role.

    Is it by any chance a problem with azure itself??  I am really confused.

  • 2009年7月7日 上午 10:10nikhil_chinchwade 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    I could resolve the problem. My client application is running in corpnet and trying to consume WCF service on azure. It was somehow related to proxy servers. But i am still not sure why it was working with console application. The issue was with IAS server. Either my IIS could not find the IAS server or IAS server has some firewall configuration rules. Installing Firewall client management tool and enabling it allowed me to solve the problem. Any clarifications on this? Why this happenes?
  • 2009年7月7日 上午 10:16Yi-Lun LuoMSFT, 版主使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     已答覆
    One possible cause is your proxy server requires authentication, and IIS does not pass your Windows identity to the proxy server. If this is the case, you can refer to http://blogs.msdn.com/stcheng/archive/2008/12/03/wcf-how-to-supply-dedicated-credentials-for-webproxy-authentication.aspx to see if it solves the problem.
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.