Summary on Calling C # HG_Interface.dll of Guangzhou Medical Insurance (external component exception ),
At the beginning, I also encountered a strange situation. The dll provided by chuangzhi can only be in the UIWinform and WPFUsed on,WebForm, WPF, WebServiceNo way to use,ConsoleAfter adding [STAThread] ThreadAttributeIt can also be called successfully.MFCWrite related, but various IntroductionMFCThe dll is fruitless. When I mentioned the problem in the exchange group, Niu of myule gave a feasible solution-using WCF to call it.
With a specific solution, everything went smoothly. However, after the program was completed, there was a strange problem, and external component exceptions also occurred when deploying it to the server, debugging on the local machine can be deployed, but it is obviously an environment problem. Because the dll is a non-hosted dll, we cannot get effective error information from the error and try to solve it from the environment, although the final result is successful, it is still unclear what the cause is. The experience here is that MSSOAP, MSXML, and WebMatrix must be installed. If they still cannot run successfully, consider installing the VS environment. We look forward to some experts who can provide specific solutions.