The following error occurs when COM component is not registered and C # script calculation is used:
The COM Object of the "msscriptcontrol. scriptcontrolclass" type cannot be forcibly converted to the interface type "msscriptcontrol. iscriptcontrol ". This operation fails because the following error occurs when QueryInterface is called for the COM component of the interface whose IID is {0e59f1d3-1fbe-11d0-8ff2-00a0d10038bc}: An error occurred while loading the Type Library/DLL. (Exception from hresult: 0x80029c4a (type_e_cantloadlibrary ))
Solution:
To ensure that the script engine can be called correctly, perform the following operations:
1. Run-regsvr32 msscript. ocx
2. Run-regedt32.exe
3. In the Registry Editor, locate the hkcr \ typelib \ {0e59f1d2-1fbe-11d0-8ff2-00a0d10038bc} \ 1.0 \ 0 \ Win32 node.
4. Change the default value of the node to c: \ windows \ system32 \ msscript. ocx, and remove the default quotation marks. Note that the 64-bit win7 or server2008 value is c: \ windows \ syswow64 \ msscript. ocx.
5. If the 64-bit Iis ApplicationProgramPool settings to enable 32-bit applications.