Using NServiceBus in Partial Trust Application

127 Views Asked by At

We are trying to send NServiceBus messages from a Microsoft Dynamics CRM plugin and running into issues like this:

Attempt by security transparent method [Our_Namespace].GetStandardBus(System.String)' to access security critical type 'NServiceBus.IBus' failed at [Our_Namespace].GetStandardBus(String endpointName)

The CRM plugins are running in the sandbox which means they are running as partial trust in IIS and we really want to keep it that way.

So my question is, is it possible to access NServiceBus from an IIS partial trust application?

Thanks, Mark

1

There are 1 best solutions below

0
Udi Dahan On

Check out the Dynamics Adapter for NServiceBus:

https://github.com/ParticularLabs/NServiceBus.DynamicsAdapter

... contains an example application that demonstrates bi-directional integration between cloud hosted Dynamics 365 2016 and an on-premises NServiceBus system using Azure Service Bus Queues.