Professional OPC
Development Tools

logos

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.

EasyDAClient - application failure when deployed to server

More
30 Jun 2015 15:15 #3243 by support
I suspect it had to do with VC++ redistributables. I am glad it works now.

For QuickOPC version 5.35, we are working on a solution that should remove a need for pre-installing ANY prerequisites whatsoever - by "boxing" them together with our assemblies, using a special virtualization technique.

Please Log in or Create an account to join the conversation.

More
29 Jun 2015 23:49 #3239 by Flintstone
Thanks again for your fast reply. I am using a manual deployment and I took great care to follow the instructions in the Concepts document very closely. Finally after a couple of days of messing with this, I decided to rerun the Microsoft Visual C++ 2013 Redistributable (x64) and OPC Core Components 3.00 Redistributable (x64) installers and selected "Repair." Once the installers completed and I restarted the server, everything began to work properly. Perhaps I neglected to restart the server after the initial install. I am not certain one way or the other. Anyway, everything is working now. Thanks again for your help.

Please Log in or Create an account to join the conversation.

More
28 Jun 2015 17:35 #3232 by support
EasyDAClient has some prerequisites, such as that Microsoft Visual C++ runtime redistributables have to be installed on the target machine, and some more. When deploying to the server, do you follow the instructions in the Concepts document, making sure that all prerequisites are deployed? What is the method you use to deploy the QuickOPC - manually, or using the QuickOPC installation program?

Thank you

Please Log in or Create an account to join the conversation.

More
26 Jun 2015 15:43 #3231 by Flintstone
Thank you for your fast response. As you suggested, I downloaded version 5.34, rebuilt the project and deployed it to the server. I no longer receive the OpcLabs.EasyOpc.DataAccess.Engine.EasyDAAdaptableParameters cannot be cast to OpcLabs.EasyOpc.DataAccess.Engine.EasyDAAdaptableParameters error, but the page with the EasyDAClient in the code-behind, still does not work. (It works on "http://localhost/", but not when deployed to the server.) As far as I can tell, I do not receive any client-side errors nor do I receive any server-side errors. On the server side, I have checked both the Event Viewer and the IIS logs, and there are no errors shown.

During my troubleshooting, I have tried moving the scope of the EasyDAClient object with the following results:

namespace AthensProductionMVC
{
public partial class L1StatusViewer : System.Web.UI.Page
{
private OpcLabs.EasyOpc.ServerDescriptor opcPrimaryServerDescriptor = new OpcLabs.EasyOpc.ServerDescriptor(...removed);

private EasyDAClient client = new EasyDAClient(); // If I initialize an instance here, the entire page fails to load, but no errors that I know of are thrown

// ... more code here

protected void Timer1_Tick(object sender, EventArgs e)
{
EasyDAClient client = new EasyDAClient(); // If I initialize an instance here, the entire page loads, but no errors that I know of are thrown.

ValueResult[] extruderResults = client.ReadMultipleItemValues(opcPrimaryServerDescriptor, new DAItemDescriptor[] {
// ... more code here

Can you provide more guidance? Perhaps a better way to look for errors or a better troubleshooting technique than I am currently using?

Best Regards

Please Log in or Create an account to join the conversation.

More
25 Jun 2015 08:26 #3229 by support
Looking at the error, it appears as it cannot typecast between two types that appear identical. I suspect that it may be because they come from different .NET AppDomain-s.

We have been fixing a problem in this area recently, albeit not under this precise (IIS) scenario. I therefore suggest that you download the recent version (5.34), rebuild your project with it, and test again.

Best regards

Please Log in or Create an account to join the conversation.

More
24 Jun 2015 18:03 #3228 by Flintstone
I have a fairly large ASP.NET MVC project that I have written that has several ".aspx" pages with ".aspx.cs" code behind using QuickOPC. Most of the pages with their code behind use your EasyUAClient and they are working well. Recently, I had a need to develop a new page and code behind using your EasyDAClient client because this area of our facility does not have an OPC UA server. The entire site, including the page with the EasyDAClient works well when I run it on "localhost." However, when I deploy the application to my server, the page with EasyDAClient fails to update. When I use a developer tool to analyze the client side, there are no errors shown on the client side. When I look at the event viewer on the server, it has a warning and I was hoping that you could give me some guidance.

Here is the IIS warning from the event viewer:

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 6/24/2015 1:26:53 PM
Event time (UTC): 6/24/2015 5:26:53 PM
Event ID: 2c0a906355784dff96b99bd8495463e4
Event sequence: 27
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/5/ROOT-3-130796403552713741
Trust level: Full
Application Virtual Path: /
Application Path: C:\AthensProductionMVC\
Machine name: ATHAP5

Process information:
Process ID: 714304
Process name: w3wp.exe
Account name: IIS APPPOOL\AthensProductionMVC

Exception information:
Exception type: TypeInitializationException
Exception message: The type initializer for 'OpcLabs.EasyOpc.DataAccess.EasyDAClient' threw an exception.
at OpcLabs.EasyOpc.DataAccess.EasyDAClient..ctor()
at AthensProductionMVC.L1StatusViewer.Timer1_Tick(Object sender, EventArgs e)
at System.Web.UI.Timer.OnTick(EventArgs e)
at System.Web.UI.Timer.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Timer.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Exception has been thrown by the target of an invocation.
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index)
at OpcLabs.BaseLib.Extensions.TypeExtension.SetStaticPropertyValue(Type type, String name, Object value)
at OpcLabs.EasyOpc.Native.DataAccess.NativeEasyDAClient.set_AdaptableParameters(EasyDAAdaptableParameters value)
at OpcLabs.EasyOpc.DataAccess.EasyDAClient.set_AdaptableParameters(EasyDAAdaptableParameters value)
at OpcLabs.EasyOpc.DataAccess.EasyDAClient..cctor()

[A]OpcLabs.EasyOpc.DataAccess.Engine.EasyDAAdaptableParameters cannot be cast to OpcLabs.EasyOpc.DataAccess.Engine.EasyDAAdaptableParameters. Type A originates from 'OpcLabs.EasyOpcClassicInternal, Version=5.33.1157.1, Culture=neutral, PublicKeyToken=6faddca41dacb409' in the context 'Default' at location 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\cadcc9de\ae15f36c\assembly\dl3\96ab9257\00a50b8e_4775d001\OpcLabs.EasyOpcClassicInternal.dll'. Type B originates from 'OpcLabs.EasyOpcClassicInternal, Version=5.33.1157.1, Culture=neutral, PublicKeyToken=6faddca41dacb409' in the context 'Default' at location 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\cadcc9de\ae15f36c\assembly\dl3\96ab9257\00a50b8e_4775d001\OpcLabs.EasyOpcClassicInternal.dll'.
at OpcLabs.EasyOpcRaw.DataAccess.CDAInnerEngine._PutAdaptableParameters(CDAInnerEngine* , Object value)



Request information:
Request URL: http://athap5/L1StatusViewer.aspx
Request path: /L1StatusViewer.aspx
User host address: 10.4.10.64
User:
Is authenticated: False
Authentication Type:
Thread account name: IIS APPPOOL\AthensProductionMVC

Thread information:
Thread ID: 131
Thread account name: IIS APPPOOL\AthensProductionMVC
Is impersonating: False
Stack trace: at OpcLabs.EasyOpc.DataAccess.EasyDAClient..ctor()
at AthensProductionMVC.L1StatusViewer.Timer1_Tick(Object sender, EventArgs e)
at System.Web.UI.Timer.OnTick(EventArgs e)
at System.Web.UI.Timer.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Timer.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


Custom event details:



Thank you for any help that you can provide.

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.067 seconds