Windows Azure Platform Developer Center > Microsoft Visual Studio 2010 Beta 2 Forums > Windows Azure > Access a WCF Service in a cloud project - does not allow partially trusted assembly
Ask a questionAsk a question
 

AnswerAccess a WCF Service in a cloud project - does not allow partially trusted assembly

  • Tuesday, January 27, 2009 6:16 PMswatijain Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,

    I have a WCF service and I have to add a reference to it in my cloud project.  Now, when I run the web project within the cloud project seperately, it runs fine.  But, when I run the Cloud project, it gives me the error - 'Can not allow partially trusted assemblies'  at the point where I am trying to get a reference to the service.

    How can I access my WCF service in my cloud project.

     

    Swati

     

Answers

  • Tuesday, January 27, 2009 6:56 PMShan McArthurMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    I had the same issue.  For me, it turns out that the culprit was that I installed the .net services SDK (labeled Biztalk SDK).  This installation makes changes to your underlying configuration that are not compatible with using other .net services in a partial trust environment.  The solution for me was to remove the .net services SDK from my machine.  I can vouch that you can use WCF services from other sites in your Azure solution.  There are some restrictions, especially on the type of binding that you can have as some of the binding types are not permitted in any partially trusted environment.

    Shan McArthur
    www.shanmcarthur.net

    • Marked As Answer byswatijain Tuesday, January 27, 2009 8:33 PM
    •  

All Replies

  • Tuesday, January 27, 2009 6:56 PMShan McArthurMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    I had the same issue.  For me, it turns out that the culprit was that I installed the .net services SDK (labeled Biztalk SDK).  This installation makes changes to your underlying configuration that are not compatible with using other .net services in a partial trust environment.  The solution for me was to remove the .net services SDK from my machine.  I can vouch that you can use WCF services from other sites in your Azure solution.  There are some restrictions, especially on the type of binding that you can have as some of the binding types are not permitted in any partially trusted environment.

    Shan McArthur
    www.shanmcarthur.net

    • Marked As Answer byswatijain Tuesday, January 27, 2009 8:33 PM
    •  
  • Tuesday, January 27, 2009 8:34 PMswatijain Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thanks a lot... 

     If anyone could also tell when we would be able to install the .net SDK and also create usable WCF services.

     

  • Tuesday, November 03, 2009 2:04 PMJayesh Oswal Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello,

    I am also facing the same problem. Can someone suggest some more solutions or pointers to it?

    Thanks and Regards
    Jayesh
    Jayesh
  • Thursday, November 05, 2009 7:37 AMJayesh Oswal Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Proposed Answer
    Hello,

    I updated the enableNativeCodeExecution="true" in my ServiceDefinition.csdef and it solved the issue.

    Thanks and Regards
    Jayesh
    Jayesh
    • Proposed As Answer byJayesh Oswal Thursday, November 05, 2009 7:37 AM
    •