How to Register mshtml dll in to GAC ? Urgent.
-
Dear All, I am using the bellow lines
mshtml.HTMLHeadElementClass elDynHead = null;
foreach (IHTMLElement elcol in (IHTMLElementCollection)document.getElementsByTagName("HEAD"))
{
if (elcol.ToString() == "mshtml.HTMLHeadElementClass")
{
elDynHead = (mshtml.HTMLHeadElementClass)elcol;
}
}it works in Develpement system, but not in the client system it throws the following error
Error :: System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to class type 'mshtml.HTMLHeadElementClass'. COM components that enter the CLR and do not support IProvideClassInfo or that do not have any interop assembly registered will be wrapped in the __ComObject type. Instances of this type cannot be cast to any other class; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface.
at PAW_URL.clsURLMON.browser_DocumentComplete(Object pDisp, Object& URL)so i think i have to Register mshtml in GAC. But i dont know how to do it. can some one help me how to Register the mshtml.dll in to GAC.(urgent please) thanks in Adavnce
-
Dear All, I am using the bellow lines
mshtml.HTMLHeadElementClass elDynHead = null;
foreach (IHTMLElement elcol in (IHTMLElementCollection)document.getElementsByTagName("HEAD"))
{
if (elcol.ToString() == "mshtml.HTMLHeadElementClass")
{
elDynHead = (mshtml.HTMLHeadElementClass)elcol;
}
}it works in Develpement system, but not in the client system it throws the following error
Error :: System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to class type 'mshtml.HTMLHeadElementClass'. COM components that enter the CLR and do not support IProvideClassInfo or that do not have any interop assembly registered will be wrapped in the __ComObject type. Instances of this type cannot be cast to any other class; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface.
at PAW_URL.clsURLMON.browser_DocumentComplete(Object pDisp, Object& URL)so i think i have to Register mshtml in GAC. But i dont know how to do it. can some one help me how to Register the mshtml.dll in to GAC.(urgent please) thanks in Adavnce
jasome wrote:
so i think i have to Register mshtml in GAC.
You are utterly wrong. The mshtml DLL is obviously not present on the target system. It's a COM dll, that's what the error message says. Therefore, it's almost certainly not .NET, and cannot be put in the GAC. If you were to google the error message, you'd get a ton of previous questions like this[^] one.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
jasome wrote:
so i think i have to Register mshtml in GAC.
You are utterly wrong. The mshtml DLL is obviously not present on the target system. It's a COM dll, that's what the error message says. Therefore, it's almost certainly not .NET, and cannot be put in the GAC. If you were to google the error message, you'd get a ton of previous questions like this[^] one.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Hi Thanks, Do you have any idea ? How to overcome this problem. if it is please do guide me thanks
-
Dear All, I am using the bellow lines
mshtml.HTMLHeadElementClass elDynHead = null;
foreach (IHTMLElement elcol in (IHTMLElementCollection)document.getElementsByTagName("HEAD"))
{
if (elcol.ToString() == "mshtml.HTMLHeadElementClass")
{
elDynHead = (mshtml.HTMLHeadElementClass)elcol;
}
}it works in Develpement system, but not in the client system it throws the following error
Error :: System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to class type 'mshtml.HTMLHeadElementClass'. COM components that enter the CLR and do not support IProvideClassInfo or that do not have any interop assembly registered will be wrapped in the __ComObject type. Instances of this type cannot be cast to any other class; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface.
at PAW_URL.clsURLMON.browser_DocumentComplete(Object pDisp, Object& URL)so i think i have to Register mshtml in GAC. But i dont know how to do it. can some one help me how to Register the mshtml.dll in to GAC.(urgent please) thanks in Adavnce
Hi all, any way i'v found the solution. we need to run a exe called "vs_piaredist.exe" thanks to all.
-
Hi all, any way i'v found the solution. we need to run a exe called "vs_piaredist.exe" thanks to all.
Because it installs it, right.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.