Online Forums
Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.
Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.
Do not use the Contact page for technical issues.
- Forum
- Discussions
- QuickOPC-Classic in .NET
- Connections, Reconnections, COM/DCOM
- COMException in IIS8 / Windows Server 2012
COMException in IIS8 / Windows Server 2012
But setting the account under which the OPC server or OPCEnum runs is just a part of the DCOM configuration. What becomes important then is the access permissions - you need to review them and add the accounts needed. And, access permissions that are set on specific COM components (OPC servers, OPC Enum) are further restricted by global DCOM "limits", that are configurable in DCOMCNFG on the machine level (right-click the computer node). Even if you allow an access to a specific account on an OPC server level, it won't work unless the DCOM "limits" also allow that account. And, sometimes, changing the DCOM security settings only takes real effect after computer restart. Terrible stuff to work with.
You can also try to assign different combinations to following static properties - in the code, before the very first OPC operation is attempted:
EasyDAClient.ClientParameters.UseCustomSecurity
EasyDAClient.ClientParameters.TurnOffActivationSecurity
EasyDAClient.ClientParameters.TurnOffCallSecurity
Please Log in or Create an account to join the conversation.
In the identity tab in the properties window of the DCOM components I have set the identity to the server administrator user instead of the launching user but that did not help. I still get:
System.UnauthorizedAccessException: Access denied
ErrorCode: -2147024891
Please Log in or Create an account to join the conversation.
It is issued when there is a problem connecting to the (local, in this case) OPCEnum service (which also serves the purpose of converting ProgIDs to CLSIDs), and the ProgID cannot be converted by other means either. It looks like a security issue. When you make the DCOM settings, do not make them just for the OPC server, but also make the same for OPCEnum.System.Runtime.InteropServices.COMException (0xC0049039): No method available to convert ProgID to CLSID
ErrorCode: -1073442759
I also wanted to suggest using the CLSID directly; it is weird that it does not work. When you specify the CLSID, please make sure you put it in curly brackets, e.g. "{C8A12F17-1E03-401E-B53D-6C654DD576DA}" for our simulation server.
Please Log in or Create an account to join the conversation.
So I think there is just a security setting for the IIS user which i haven't found yet.
I also replaced the name of the DCOM component with the CLSID in the ServerDescriptor constructor so that the name have not to be converted. The result was a System.UnauthorizedAccessException (access denied) (with the IIS user, with the LocalSystem account there was again no problem)
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Are you connecting to an OPC server on a remote machine?
Please Log in or Create an account to join the conversation.
i am trying to use QuickOPC.NET in a WCF service on a Windows Server 2012 with IIS8 but i am not able to read anything from the OPC server.
While debugging i found out that the method ReadMultipleItemValues returned an error for each item:
System.Runtime.InteropServices.COMException (0xC0049039): No method available to convert ProgID to CLSID
ErrorCode: -1073442759
I have then written a simple console application which also reads the items using the ReadMultipleItemValues method.
The console application can read the values from the OPC server without any problems (the application runs under the server administrator user).
I already set the DCOM permission for the IIS user which solved the first exception (access denied). After that, the COMException occured.
Please let me know if you need any more information.
Thank you!
Please Log in or Create an account to join the conversation.
- Forum
- Discussions
- QuickOPC-Classic in .NET
- Connections, Reconnections, COM/DCOM
- COMException in IIS8 / Windows Server 2012