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.

QuickOPC VBScript ASP example script not working

More
18 Mar 2024 02:19 #12641 by support
Hello.
What you have done is a fair attempt, and is close to what I had in mind, but not completely, so I would still like you to test my original idea. To do so, in IIS Manager:

- select DefaultAppPool
- under Actions, press Advanced Settings
- press "..." on the Process Model -> Identity row
- select Custom account
- press Set
- enter your own interactive account info
- confirm/save everything
- retest

Thank you

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

More
18 Mar 2024 02:00 #12640 by Kyle.Oshima@caltrol.com
Not sure I follow request for test account setup -- please can you provide detailed instruction for setting up desired test account setup?

As noted in prior posts, IIS 10 for most part is default install, with only classic ASP support also installed (ASP and ISAPI Extensions Application Development features installed as described in referenced article)

IIS Manager has only default application pool DefaultAppPool defined (see attached screenshot)

Following speculation that IIS might not have permissions to directory where QuickOPC COM components are installed, added DefaultAppPool to security properties of "OPC Labs OPC Studio 2024.1" install folder and contents (see attached screenshot) but get same error result.

Please advise. Thanks.
Attachments:

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

More
17 Mar 2024 22:18 #12639 by support
Hello.
Yes indeed, the output from the console VBScript example is as expected.

One possible reason for the error you are observing is that the IIS might not have permissions to the directory where QuickOPC com components are installed. To test out this hypothesis, please set (temporarily) the user account under which the AppPool of your IIS application runs to your own interactive account instead (an account you use to log in to Windows) (by default IIS uses the IUSR_ or IWAM_ account, and we do not want it now), and retest. This is just an experiment, it *not* a secure way to do it, but it would give us a hint as to whether the problem might be related to these permissions.

Best regards

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

More
17 Mar 2024 21:00 #12638 by Kyle.Oshima@caltrol.com
As requested, please find attached screenshot of QuickOPC "ReadItem.Main.vbs" VBScript WSH example script run from command line.

Assume output is expected result, seemingly pointing to problem to do with IIS?

Also, please find attached screenshot of Windows Server 2022 Standard, Server Manager, IIS 10 install -- as noted in prior posts, 8 of 10 IIS options installed were automatically selected by default when IIS role enabled, plus 2 Application Development options additionally installed to enable classic ASP.

Are additional IIS options required for using EasyDVClient thru classic ASP HTML5 script?

As noted in initial post, IIS would be running on HMI machine for industrial DCS operating in regulated industry, so is preferrable to only install those options required for QuickOPC to work properly for use case.

Any insight is appreciated. Thanks.
Attachments:

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

More
17 Mar 2024 15:14 - 17 Mar 2024 15:15 #12637 by support
Hello,
thank you for the information.

"0x80131534" corresponds to HRESULT COR_E_TYPEINITIALIZATION, a .NET exception TypeInitializationException. And it is on the line which attempts to create the EasyDAClient object.

Let's first try if you can run QuickOPC examples in VBScript from command line. This will tell us whether the problem has to do with IIS or not.

Please use the command line (manually, or there is a shortcut from QuickOPC launcher), and navigate to VBScript examples for WSH (Windows Script Host), and run this one, for example:

VBScript\WSH\DocExamples\DataAccess\_EasyDAClient\ReadItem.Main.vbs

from the proper directory, like this
CScript ReadItem.Main.vbs
What are the results in this case?

Thank you
Last edit: 17 Mar 2024 15:15 by support.

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

More
16 Mar 2024 20:00 #12636 by Kyle.Oshima@caltrol.com
As requested, with IIS ASP-->Debugging Properties-->Send Errors To Browser setting set to True, please find attached QuickOPC "ReadAndDisplayValue_VBScript.asp" VBScript ASP example script copied to IIS Manager default web site error displayed in MS Edge browser
Attachments:

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

More
16 Mar 2024 14:51 #12635 by support
Hello,
thank you for all the details, it is really helpful.

Can you please edit the properties on the IIS site level, setting ASP -> "Debugging Properties" -> "Send Errors to Browser" to True, and retest?
The idea is that we should get a better error message then.

Best regards

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

More
16 Mar 2024 01:30 #12634 by Kyle.Oshima@caltrol.com
As far as can tell, classic ASP support on IIS should be installed (see attached screenshot of Server Manager for Windows Server 2022 showing ASP and ISAPI Extensions Application Development features installed as described in referenced article) Also as noted in initial post, simple "test.asp" script set up in IIS Manager default web site does display in MS Edge no problem (see attached screenshots) so assume classic ASP on IIS is properly set up otherwise "test.asp" script should error?

That said, also as noted in initial post, unlike "test.asp" script, QuickOPC "ReadAndDisplayValue_VBScript.asp" VBScript ASP example script copied to IIS Manager default web site displays in MS Edge browser error (see attached screenshot)

Appears essentially only substantive difference between scripts are QuickOPC elements creating object of type EasyDVClient class and .ReadItemValue() call on that object.

Beyond standard install of QuickOPC download "Setup-OPCLabs-OpcStudio-2024.1-Windows-Full.exe" (all options installed except for Excel Connector as Excel is not installed on machine) which did not post any install errors, QuickOPC documentation is unclear whether additional install steps are needed for using EasyDVClient thru classic ASP HTML5 script.

Is QuickOPC install incomplete, which could explain why VBScript ASP example script does not work? Is there procedure for verifying QuickOPC is installed properly?

Any insight is appreciated. Thanks.
Attachments:

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

More
15 Mar 2024 23:57 #12633 by support
Hello,
thank you for your interest in our products.

It is not clear to me whether you have actually performed the steps described in the article you referred to ("Classic ASP Not Installed by Default on IIS 7.0 and above").
You need to do so. QuickOPC does not install the necessary parts of IIS for you.

Please install the Classic support into your IIS. If you have performed the steps, and still have a problem, please come back here and describe the problem.

Best regards

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

More
15 Mar 2024 23:30 #12632 by Kyle.Oshima@caltrol.com
Am prototyping QuickOPC as possible OPC DA interface for web HMI component for industrial DCS.

HMI machine is running Windows Server 2022 Standard and Internet Information Services 10.

Have installed QuickOPC from download "Setup-OPCLabs-OpcStudio-2024.1-Windows-Full.exe" version 5.80.82.1

Am interested in using EasyDVClient thru classic ASP HTML5 script seemingly compatible with HMI.

Have simple "test.asp" script (see attached) <%@ language="vbscript"%><html><body><%response.write("Hello world! - VBScript in IIS")%></body></html> set up in IIS Manager default web site that MS Edge browser displays no problem, so assume IIS is properly set up.

Have QuickOPC "ReadAndDisplayValue_VBScript.asp" VBScript ASP example script (see attached) copied to IIS Manager default web site but MS Edge browser posts following error: "An error occurred on the server when processing the URL. Please contact the system administrator. If you are the system administrator please click here to find out more about this error." -- referenced link refers to MS webpage learn.microsoft.com/en-us/iis/application-frameworks/running...ot-installed-by-default-on-iis which discusses installing classic ASP which appears to be correct (see above paragraph)

Can successfully run QuickOPC OPC Command-line Tool following online documentation kb.opclabs.com/Using_OpcCmd_Utility_as_OPC_DA_Client quickstart commands no problem.

Is QuickOPC install incomplete, why VBScript ASP example script does not work?

Any insight is appreciated. Thanks.

File Attachment:

File Name: ReadAndDis...ript.zip
File Size:1 KB
Attachments:

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

Moderators: support
Time to create page: 0.095 seconds