Friday, April 20, 2012

Execution of user code in the .NET Framework is disabled. Enable "clr enabled" configuration option

While running a test from a project I've taken over, I get this error:
Execution of user code in the .NET Framework is disabled. Enable "clr enabled" configuration option
My first thought is , "I thought the .NET Framework kinda *had* to run CLR code." Turns out the project is using .Net CLR inside the database. The error message wanted to be
Execution of user code in the .NET Framework inside the database is disabled. 
Execute this TSQL:  "sp_configure 'clr enabled',1" and "RECONFIGURE"
So to fix this run this TSQL inside the database.
sp_configure 'clr enabled',1
GO
RECONFIGURE
GO
sp_configure 'clr enabled'  -- make sure it took
GO

19 comments:

Ashrafur Rahaman said...

Helpful. Thanks.

Anonymous said...

It did solved my issue .. many thanks..

Anonymous said...

Solved my issue! THanks!

Anonymous said...

Very Helpful. Solved the issue. Much clearer than the MS error

Sarbland said...

Thank you! It works

Anonymous said...

Thanks for the help!!

Anonymous said...

It worked for me, thank you man

Anonymous said...

Thanks!!..

Anonymous said...

Thanks!!!... worked

Anonymous said...

Thank You!!..

Anonymous said...

Fantastic - very helpful!

m said...

THNX

Unknown said...

I solved my problem . Thanks fro the great answer. really appreciate it.

Anonymous said...

Helpful, Thank you very much

Unknown said...

Total thanks

Unknown said...

It worked for me. Thank you very much.

Anonymous said...

Thanks! It resolved my issue!

Anonymous said...

It worked. Thanks a lot!!

alexandru.ispas said...

Thanks. It worked for me.