We're using MSMQ to insert records from a service into SQL Server tables in multiple locations. I'd like to insert into this MSMQ queue from SQL Server - that way, rather than come up with my own way to add messages to each server, I can just piggyback on the existing infrastructure and code.
It looks like the best way to do this is by using a CLR.
However, all the code I've found to create MSMQ messages from a CLR require UNSAFE mode. Is there a way to do it in EXTERNAL_ACCESS mode instead?
This is most likely because System.Messaging is not a supported library for CLR. Since it's not a supported library, it does not meet the requirements of SAFE or EXTERNAL_ACCESS.
Read more here: http://msdn.microsoft.com/en-us/library/ms403279.aspx