ASP.NET CLR Not Enabled

asp.netSql ServerClr

asp.net Problem Overview


I am getting the following error on my new installation of ASP.Net and SQL Server when I run my app:

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

I have tried to fix it by running this:

 use dasolPSDev;

 sp_configure 'clr enabled', 1
 go
 RECONFIGURE
 go
 sp_configure 'clr enabled'
 go

But then I get:

 Msg 102, Level 15, State 1, Line 3
 Incorrect syntax near 'sp_config

asp.net Solutions


Solution 1 - asp.net

Try this

use dasolPSDev;

EXEC sp_configure 'clr enabled', 1
 go
 RECONFIGURE
 go
EXEC sp_configure 'clr enabled'
 go

Solution 2 - asp.net

Simplified version of jams' solution which worked for me (SQL Server 2012):

sp_configure 'clr enabled', 1
GO
RECONFIGURE
GO

Source: http://msdn.microsoft.com/en-us/library/ms254506%28v=vs.80%29.aspx

Solution 3 - asp.net

I had a similar issue, but this works for me (SQL Server 2008 R2):

sp_configure 'clr enabled', 1
GO

RECONFIGURE
GO

Solution 4 - asp.net

I tried with sp_configure @configname=clr_enabled, @configvalue=1

then restarted the sql server. it worked

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestioncdubView Question on Stackoverflow
Solution 1 - asp.netjamsView Answer on Stackoverflow
Solution 2 - asp.netJon SchneiderView Answer on Stackoverflow
Solution 3 - asp.netTheodore AmetepeyView Answer on Stackoverflow
Solution 4 - asp.netuser7205049View Answer on Stackoverflow