web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Dynamics 1612 (9.0.22.8)on premise plugin issue

(1) ShareShare
ReportReport
Posted on by

Hello community,

I'm facing an issue with a Dynamics 365 On premise Plugin where I'm getting a SecurityException related to System.Net.WebPermission. The exact error message is as follows:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Unexpected exception from plug-in (Execute): Crm.Plugins.Outbound: System.Security.SecurityException: Request for the permission of type 'System.Net.WebPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.Detail:
<OrganizationServiceFault xmlns:i="">www.w3.org/.../XMLSchema-instance" xmlns="">schemas.microsoft.com/.../Contracts">
<ActivityId>55b753a0-2e1c-4058-8d8f-5fce997c0c73</ActivityId>
<ErrorCode>-2147220956</ErrorCode>
<ErrorDetails xmlns:d2p1="">schemas.datacontract.org/.../System.Collections.Generic" />
<Message>Unexpected exception from plug-in (Execute): Crm.Plugins.Outbound: System.Security.SecurityException: Request for the permission of type 'System.Net.WebPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.</Message>
<Timestamp>2023-05-18T07:50:09.8190886Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText>

Error: System.Security.SecurityException: Request for the permission of type 'System.Net.WebPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark&amp; stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Net.HttpWebRequest.CheckConnectPermission(Uri uri, Boolean needExecutionContext)
at System.Net.HttpWebRequest..ctor(Uri uri, ServicePoint servicePoint)
at System.Net.HttpRequestCreator.Create(Uri Uri)
at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)

The action that failed was:
Demand
The type of the first permission that failed was:
System.Net.WebPermission
The Zone of the assembly that failed was:
MyComputer


This issue occurs when the Plugin tries to make a web request. I have already checked the necessary permissions and tried also webClient but the problem persists (upgraded to dot net framework 4.6.1 also). Could anyone provide some suggestions on how to resolve this issue? Are there any specific CRM configuration settings or permissions that need to be adjusted?. Initially plugin was able to call the web api but now stopped working suddenly. tried Manifest.xml but no luck

Any help or insights would be greatly appreciated. Thank you in advance!"

  • Community Member Profile Picture
    on at

    Hello community,

    I'm facing an issue with a Dynamics 365 On premise Plugin where I'm getting a SecurityException related to System.Net.WebPermission. The exact error message is as follows:

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Unexpected exception from plug-in (Execute): Crm.Plugins.Outbound: System.Security.SecurityException: Request for the permission of type 'System.Net.WebPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.Detail:
    <OrganizationServiceFault xmlns:i="">www.w3.org/.../XMLSchema-instance" xmlns="">schemas.microsoft.com/.../Contracts">
    <ActivityId>55b753a0-2e1c-4058-8d8f-5fce997c0c73</ActivityId>
    <ErrorCode>-2147220956</ErrorCode>
    <ErrorDetails xmlns:d2p1="">schemas.datacontract.org/.../System.Collections.Generic" />
    <Message>Unexpected exception from plug-in (Execute): Crm.Plugins.Outbound: System.Security.SecurityException: Request for the permission of type 'System.Net.WebPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.</Message>
    <Timestamp>2023-05-18T07:50:09.8190886Z</Timestamp>
    <ExceptionRetriable>false</ExceptionRetriable>
    <ExceptionSource i:nil="true" />
    <InnerFault i:nil="true" />
    <OriginalException i:nil="true" />
    <TraceText>

    Error: System.Security.SecurityException: Request for the permission of type 'System.Net.WebPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
    at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark&amp; stackMark, Boolean isPermSet)
    at System.Security.CodeAccessPermission.Demand()
    at System.Net.HttpWebRequest.CheckConnectPermission(Uri uri, Boolean needExecutionContext)
    at System.Net.HttpWebRequest..ctor(Uri uri, ServicePoint servicePoint)
    at System.Net.HttpRequestCreator.Create(Uri Uri)
    at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)

    The action that failed was:
    Demand
    The type of the first permission that failed was:
    System.Net.WebPermission
    The Zone of the assembly that failed was:
    MyComputer


    This issue occurs when the Plugin tries to make a web request. I have already checked the necessary permissions and tried also webClient but the problem persists (upgraded to dot net framework 4.6.1 also). Could anyone provide some suggestions on how to resolve this issue? Are there any specific CRM configuration settings or permissions that need to be adjusted?. Initially plugin was able to call the web api but now stopped working suddenly. tried Manifest.xml but no luck

    Any help or insights would be greatly appreciated. Thank you in advance!"

  • Kadir Kurt Profile Picture
    38 on at

    Hi,

    I think the link below will help you

       

    If you find the answer as useful, please mark it as verified.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Syed Aqib Raza Profile Picture

Syed Aqib Raza 139

#2
11manish Profile Picture

11manish 105 Super User 2026 Season 2

#3
ParthPatel249 Profile Picture

ParthPatel249 77

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans