Last post Feb 25, 2008 10:27 AM by Raffee
Feb 11, 2008 08:44 AM|Raffee|LINK
I have written a new provider for MPS (HMC 4.0) and when I try to access it through my namespaces I am getting the result:
Catastrophic failure (Exception from HRESULT: 0x8000FFFF <E_Unexpected>>
even though when I debug the provider code there is no error generated.
Could anyone help me out?
Feb 11, 2008 01:00 PM|mkostersitz|LINK
Is your provider marked for COM interop?
Feb 12, 2008 04:24 AM|Raffee|LINK
I don't know actually if it is marked for COM interop.
I have included some code in the post-build action of the provider project to register the assmebly, but I don't know how to mark it for com interop.
"C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil" /if Microsoft.Provisioning.Providers.<myDLL>
Feb 12, 2008 08:07 AM|Raffee|LINK
I checked my project properties, and in the "Build" tab there is a checkbox labeled "Register for com interop."
This checkbox is checked, so I guess the assembly is marked for com interop.
Any other suggestions?
Feb 12, 2008 10:33 AM|DmitriG|LINK
Any other suggestions?
Try to change "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\regasm" Microsoft.Provisioning.Providers.<myDLL> to
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\regasm /codebase" Microsoft.Provisioning.Providers.<myDLL>
Feb 12, 2008 10:41 AM|mkostersitz|LINK
When you register the provider you need to use the /CodeBase switch when using RegAsm.exe i.e. Regasm.exe /Codebase myprovider.dll
Feb 12, 2008 10:59 AM|Raffee|LINK
Thanks guys, it worked. I will mark Dmitri's reply as an answer, since he posted it first :). But I have another error now.
I am trying to use the SQL Admin Provide and I am getting the following error.
<errorContext description="An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused
by the fact that under the default settings SQL Server does not allow remote
connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection
to SQL Server)"
both TCP/IP and Named Pipes are enabled on the SQL Server.
Feb 25, 2008 10:27 AM|Raffee|LINK
Hi again guys,
I am getting an error with the gacutil and regasm code.
Error 268 The command "cd C:\Projects\CO_RM_Provider\CO_RM_Provider\bin\debug
"C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil" /if Microsoft.Provisioning.Providers.CORMProvider.dll
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\regasm /codebase" Microsoft.Provisioning.Providers.CORMProvider.dll" exited with code 3.
If I remove the '/codebase ' I dont get this error.