Security Setting for your CLR Objects that use Datasets

If you have a CLR Object (most likely one that uses a Dataset, but I haven't checked out all possibilities) in Sql Server 2005 / Sql Express, you need to set the "Permission Level" to unsafe.  If not, you will get an error that looks something like this when your CLR Object executes.  BTW, I have already contacted someone I know in the ADO.NET Team who verified that this is a bug, repeated that this is a problem, and logged it.

Update: This does not occur if you are using a Winforms/WebForms application to access a data in a Sql Server 2005 database.  This only seems to occur if you are running within a CLR object that uses a dataset to access data within a Sql Server 2005 database running the April CTP (specifically SqlExpress).

Wally

No Comments