Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 deploying managed stored procedures to .mdf file

Author  Topic 

-Dman100-
Posting Yak Master

210 Posts

Posted - 2010-01-24 : 12:07:20
I am using Visual Studio 2008 and have a web application with a standalone .mdf file in the App_Data folder.

I created a SQL Server Database Project and created a managed stored procedure, which I am trying to deploy to the standalone database.

I'm getting the error:

The current database compatibility level does not support managed objects.

I verified the compatibility level is 90, so that should be okay.

Has anyone successfully deployed managed stored procedures and/or UDF's to a standalone .mdf file located in the App_Data folder of a website project in Visual Studio? If so, any help would be appreciated on the steps to accomplish this.

My code compiles fine, I just can't deploy it.

As an alternative, I can attach the database to SSMSE, change the conection string and then I can deploy, but when I detach the database and try to run the managed stored procedures from my web application project I get the following error:

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

I have enabled clr integration from sql server surface area configuration.

The problem is two fold:

deploying to a standalone .mdf file
running the managed stored procedure with a standalone .mdf file

I read an article that the solution indicates to enable CLR at the *instance* level, not the database level. I'm not clear on how to accomplish this?

Thanks for any help.
   

- Advertisement -