System.management reference in SQL CLR stored procedure - sql

I am trying to build an SQL CLR stored procedure that references an IBM WebSphere MQ dll. I'm having problems doing this on my work machine, so I decided to see if I could just get this to work on my home comp using localhost. I've made progress in getting a different error, however I'm not sure what this means:
Msg 10301, Level 16, State 1, Line 1
Assembly 'amqmdnet' references assembly 'system.management, 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: 2(The system cannot find the file specified.)). Please load the referenced assembly into the current database and retry your request.

Related

Unity Di container not working with 64 bit build

I am using Unity for in WCF service to load component.
I am referring below mention article.
https://msdn.microsoft.com/en-us/library/vstudio/hh323725(v=vs.100).aspx
Service is working fine when i build service in visual studio with build option option any CPU.
As one third party component required 64 bit specific build. So i selected 64 bit build option.
I have downloaded Unity code and build for 64 bit but it is also not working.
I am getting below mention exception.
Could not load file or assembly 'Common.Unity' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.BadImageFormatException: Could not load file or assembly 'Common.Unity' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Common.Unity' could not be loaded.
As this is not issue of Unity.
It is issue of IISExprees of VS2012 which is support on 32 bit.
Can't get IIS Express 8 beta to run website as 64-bit process
https://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/3254745-allow-for-iis-express-64-bit-to-run-from-visual-st

SQL Server 2012 - facing installation error

I was trying to install SQL Server 2012 but I get an error
Could not load file or assembly ‘Microsoft.VisualC, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified. Error code 0x84B10001.
Any idea how to solve this?

How can I create assembly reference for mscorlib.dll ver 5 in SQL Server 2012

I Use SQL Server 2012 and I want create CLR
I want execute this command in SQL Server 2012
CREATE ASSEMBLY AndishCSSCommon FROM 'C:\Andish.CSS.Common.dll'
WITH PERMISSION_SET=EXTERNAL_ACCESS
But I get this error
Msg 10301, Level 16, State 1, Line 1
Assembly 'Andish.CSS.Common' references assembly 'mscorlib, version=5.0.5.0,
culture=neutral, publickeytoken=7cec85d7bea7798e.', 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: 2(The system cannot find the file specified.)). Please load the
referenced assembly into the current database and retry your request.
and in my debug folder not exist mscorlib.dll
how can I CREATE ASSEMBLY for mscorlib.dll before CREATE ASSEMBLY AndishCSSCommon FROM 'C:\Andish.CSS.Common.dll'
You could try to set the target framework to a more recent one from your project's
Properties -> Application -> Target framework.

Where to find the System.management dll

I am trying to build an SQL CLR stored procedure that references an IBM WebSphere MQ dll. I'm having problems doing this on my work machine, so I decided to see if I could just get this to work on my home comp using localhost. I've made progress in getting a different error, however I'm not sure where the system.management dll is located...
Here is a copy of the error message:
Msg 10301, Level 16, State 1, Line 1 Assembly 'amqmdnet' references assembly 'system.management, 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: 2(The system cannot find the file specified.)). Please load the referenced assembly into the current database and retry your request.
This is installed in GAC, Check the version of .Net that you have it on your system
You must register this assembly in SQL Server
create assembly [System.Management]
from 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Management.dll'
with permission_set = unsafe

Error adding sharepoint web service as web reference in a project

I'm trying to add web reference to my project using the link:- http://localhost/_vti_bin/Lists.asmx
Getting the following error:-
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load file or assembly 'Microsoft.SharePoint' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 1: <%# Assembly Name="Microsoft.SharePoint"%><%# Application Language="C#" Inherits="Microsoft.SharePoint.ApplicationRuntime.SPHttpApplication" %>
Source File: /global.asax Line: 1
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.SharePoint' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].