Integrating Integrators – BizTalk, Windows Azure, Windows Workflow, and Beyond

Biztalk WCF Service Security Error

BizTalk 2006 R2

This group is for all content related to BizTalk Server 2006 R2. This includes a forum, samples, and videos. Most of the content here also applies to other versions of BizTalk beyond 2006 R2.

Biztalk WCF Service Security Error

Not Answered This question is not answered

Hi,

I have Published a Biztalk WCF Service.

I am getting the following error when I try to invoke the service.

 

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Net.DnsPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

 

[SecurityException: Request for the permission of type 'System.Net.DnsPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]

   System.ServiceModel.AsyncResult.End(IAsyncResult result) +4413209

   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +183

   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +205

   System.ServiceModel.Activation.HttpHandler.ProcessRequest(HttpContext context) +77

   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358

   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

 

I even tried setting the identity to impersonate my login credentials but it  does want to work.

 

Please help.

All Replies
  • Greetings,

    This appears to be a Code Access Security issue. What credentials are your BT Instance running as? ALso look at the credentials that your IIS Server virtual directory that's hosting the WCF/SOAP adapter. What are the credentials for the app pool?

    Both credentials must match and have permission to use the DNS lookup from CAS.

     

    HTH

    Edit
  • check the webconfig for wss_minimal or wss_medium trust levels. If you have windows sharepoint services installed, it may be blocking your WCF service. Good luck.

    Edit
  • Hello did you ever solve this? I've got the same problem. Publishing a simple wcf with biztalk 2006 trying to browse it in IIS. And get the same error as you. The pequliar part is that System.Net version 2.0.0.0 does with public key "b77 etc" dows not exists in GAC, only 3.5.0.0 so my first thought is that IIS is using the wrong framwork sould be 3.5.0.0. Hm I'll test this 

    Edit
  • change this in web.config

    <system.web><trust level="Full"/>

    Edit
Page 1 of 1 (5 items)