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.

Problem Running ASP.NET MVC in iis server

More
27 Jan 2018 10:40 #5919 by support
Even locally, you can get at least half of DCOM troubles if you are running under IIS.

What likely happens is that your MVC runs in an application pool in IIS. And there is a user identity under which this app pool runs. That is usually a user that has *very* limited permissions (so that the Web app remains secure and cannot be misued to do something on your computer that it is not supposed to do).

For start, just to verify this, change the user identity of the app pool to be e.g. your own account (or create a separate app pool for that, and assign just this one Web app to it). If that resolves the problem, you know where to look.

Regards

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

More
26 Jan 2018 16:56 #5918 by jmolina
Yes, I'm sorry I forgot to check the .Exception in release mode. This is the code result of the exception with this exceptions messages
text = text+" \n "+tag.Exception + "\n "+tag.Diagnostics + " \n "+tag.StatusInfo + " \n "+tag.NormalizedException +" \n "+tag.ErrorMessage +" \n "+tag.ErrorCode + " \n " +tag.ErrorMessageBrief ;

System.UnauthorizedAccessException: Access is denied. OpcLabs.BaseLib.Collections.Specialized.ExceptionCollection Unknown OpcLabs.BaseLib.NormalizedException: Access is denied. Access is denied. -2147024891 Access is denied. System.UnauthorizedAccessException: Access is denied. OpcLabs.BaseLib.Collections.Specialized.ExceptionCollection Unknown


I think this is for DCOM, but why? if I'am running the ASP.NET MVC app in the same server not in a remote server. Should you recommend to open the DCOM access connections to the OPC Server?
Thanks for the patience and regards.

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

More
25 Jan 2018 08:53 #5913 by support
Hello,
can you post a relevant part of your ItemChanged event handler here?

Specifically, are you checking the .Exception property of the received event arguments? That's the way any problems in Subscribe-s are reported.

Best regards

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

More
25 Jan 2018 02:59 #5912 by jmolina
Hi, I'm running 2 apps in a Windows Server 2012 R2.
The first app is a Windows forms that reads 20 tags (with Quick OPC version 2017.1) from a local Beanair Opc server. This app works using subscriptions and works fine without any problem.
The second app is a ASP.net MVC application that reads the same 20 tags (with Quick OPC version 2017.1) from the same local Beanair Opc server using signal R. When I run the app in the IIS Server the subscriptions don't give any kind of results.
When I run the same app in my laptop (Windows 8 ) the subscriptions returns the results with no problem. So I need to determinate wich is my problem (could be signal r or other libraries). Using Suscribe multiple I don't catch any kind of exception (recommendations in your documentation), but there a way (exception or code) to determine if the declaration of the subscription or parameters are not working well? for example in this code.
EasyDAClient humSuscrp = new EasyDAClient();
 
            humSuscrp.ItemChanged += new OpcLabs.EasyOpc.DataAccess.EasyDAItemChangedEventHandler(humSuscrp_ItemChanged);
 
    var humArray = new DAItemGroupArguments[4];
    humArray[0] = new DAItemGroupArguments("", "Beanair.BeanOpc.1.0", "GATEWAY_3900.DEVICE_390000158D00000E0CCB.SENSOR_0", 1000, true);
    humArray[1] = new DAItemGroupArguments("", "Beanair.BeanOpc.1.0", "GATEWAY_3900.DEVICE_390000158D00000E0CC6.SENSOR_0", 1000, true);
    humArray[2] = new DAItemGroupArguments("", "Beanair.BeanOpc.1.0", "GATEWAY_3900.DEVICE_390000158D00000E0D1E.SENSOR_0", 1000, true);
    humArray[3] = new DAItemGroupArguments("", "Beanair.BeanOpc.1.0", "GATEWAY_3900.DEVICE_390000158D00000E0B73.SENSOR_0", 1000, true);
 
    humSuscrp.SubscribeMultipleItems(humArray);
 

Thanks and regards.

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

Moderators: support
Time to create page: 0.048 seconds