register a DLL object that references System.Web to be used on SQL CLR
I have a Class Library that uses System.Web to access web services and plan to return the XML back to the SQL stored procedure via SQL CLR.
I'm trying to 开发者_JS百科register the DLL but it kept on looking for either the System.Drawing or System.Web. I tried registering the System.Web but it either prompted me with 'There is insufficient system memory in resource pool 'internal' to run this query.' or with 'unable to access file'.
here's my script:
create assembly [System.Drawing]
authorization dbo
from 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll'
with permission_set = unsafe
create assembly SystemWeb
authorization dbo
from 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.dll'
with permission_set = unsafe
Go
CREATE ASSEMBLY TestCheckEncounters
AUTHORIZATION [dbo]
FROM 'C:\APICLR\ClientName.Api.MyCLR.dll'
WITH PERMISSION_SET = unsafe;
GO
精彩评论