
Hi all,
I set up both the cache and search index Web Notification URLs. Then I edited a Home page information and checked the trace, but I didn't see any POSTs to cache.axd. I then checked System Jobs in the CRM and found that the job Adxstudio.Xrm.Plugins.WebNotificationPlugin: Update of any Entity failed, and I got the following error details:
Could anybody please help me with it would certainly be appreciated. Thank you!
Plugin Trace:
[Adxstudio.Xrm.Plugins: Adxstudio.Xrm.Plugins.WebNotificationPlugin]
[c9b9ae0d-2745-e711-80f6-c4346bada540: Adxstudio.Xrm.Plugins.WebNotificationPlugin: Update of adx_webpage entity.]
Error Message:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: 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>5e25df76-087e-4a47-a46e-043b17014fed</ActivityId>
<ErrorCode>-2147220891</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d2p1:key>OperationStatus</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:int">0</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>SubErrorCode</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:int">-2146233088</d2p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>Request for the permission of type 'System.Net.WebPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.</Message>
<Timestamp>2017-06-01T06:55:51.3845821Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource>PluginExecution</ExceptionSource>
<InnerFault i:nil="true" />
<OriginalException>Microsoft.Xrm.Sdk.InvalidPluginExecutionException
at Adxstudio.Xrm.Plugins.WebNotificationPlugin.Execute(IServiceProvider serviceProvider, ITracingService tracing, IPluginExecutionContext executionContext, IOrganizationService service)
at Adxstudio.Xrm.Plugins.Plugin.Execute(IServiceProvider serviceProvider)
at Microsoft.Crm.Sandbox.SandboxAppDomainHelper.<>c__DisplayClass8.<Execute>b__1()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Crm.Sandbox.SandboxAppDomainHelper.Execute(IOrganizationServiceFactory organizationServiceFactory, Dictionary`2 sandboxServices, String pluginTypeName, String pluginConfiguration, String pluginSecureConfig, IPluginExecutionContext requestContext, Boolean enablePluginStackTrace, Boolean chaosFailAppDomain)
at Microsoft.Crm.Sandbox.SandboxAppDomainHelper.Execute(IOrganizationServiceFactory organizationServiceFactory, Dictionary`2 sandboxServices, String pluginTypeName, String pluginConfiguration, String pluginSecureConfig, IPluginExecutionContext requestContext, Boolean enablePluginStackTrace, Boolean chaosFailAppDomain)
at Microsoft.Crm.Sandbox.SandboxWorker.Execute(SandboxCallInfo callInfo, SandboxPluginExecutionContext requestContext, Guid pluginAssemblyId, Int32 sourceHash, String assemblyName, Guid pluginTypeId, String pluginTypeName, String pluginConfiguration, String pluginSecureConfig, SandboxRequestCounter& workerCounter, Boolean returnTraceInfo)</OriginalException>
<TraceText>
[Adxstudio.Xrm.Plugins: Adxstudio.Xrm.Plugins.WebNotificationPlugin]
[c9b9ae0d-2745-e711-80f6-c4346bada540: Adxstudio.Xrm.Plugins.WebNotificationPlugin: Update of adx_webpage entity.]
WebNotificationPlugin: Execute: Begin
WebNotificationPlugin: SendNotifications: {"MessageName":"Update","RelatedEntities":null,"Relationship":null,"Target":{"Id":"de90d43b-1ff4-45f2-8de2-32eeb03c8878","LogicalName":"adx_webpage","Name":null}}
WebNotificationPlugin: ToRequest: POST request: localhost/Cache.axd
WebNotificationPlugin: Execute: An exception was thrown while trying to send notifications.
WebNotificationPlugin: Execute: 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& 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)
at Adxstudio.Xrm.Plugins.WebNotificationPlugin.ToRequest(ITracingService tracing, Uri uri, String body)
at Adxstudio.Xrm.Plugins.WebNotificationPlugin.<>c__DisplayClass13_0.<SendNotifications>b__0(Uri url)
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at Adxstudio.Xrm.Plugins.WebNotificationPlugin.SendNotifications(ITracingService tracing, IExecutionContext context, List`1 webNotificationUrls)
at Adxstudio.Xrm.Plugins.WebNotificationPlugin.Execute(IServiceProvider serviceProvider, ITracingService tracing, IPluginExecutionContext executionContext, IOrganizationService service)
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
</TraceText>
</OrganizationServiceFault>
*This post is locked for comments
I have the same question (0)Hi Nizky
I have had similar problems with these jobs failing and found that if a change is made to the Web Notification URL settings, you need to disable and then enable the plugins. I am still getting a few failures (mostly entities that I don't need to show on the Portal), but much less than I was previously, so for a couple minutes of effort, it is worth a try.
Hope that helps
James