Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can I not register System.Web in SQL Server 2008?

Running this command:

CREATE ASSEMBLY 
[System.Web] from
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\system.web.dll'
with permission_set = UNSAFE

Gives me this error:

Msg 10300, Level 16, State 2, Line 1

Assembly 'System.Web' references assembly 'system.web, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a.', which is not present in the current database. SQL Server attempted to locate and automatically load the referenced assembly from the same location where referring assembly came from, but that operation has failed (reason: version, culture or public key mismatch). Please load the referenced assembly into the current database and retry your request.

... this sounds a little silly. It seems like SQL Server thinks that the System.Web assembly is referencing it's self. How can I fix this?

like image 242
Nick Bolton Avatar asked Nov 04 '10 14:11

Nick Bolton


1 Answers

Try with Framework64 assemblies (64 bit sql server 2008)

CREATE ASSEMBLY

[System.Web] from

'C:\Windows\Microsoft.NET\Framework64\v2.0.50727\System.Web.dll' with permission_set = UNSAFE

GO

like image 165
Mahesh Avatar answered Nov 15 '22 09:11

Mahesh