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
27 Mar 2024 10:29 #12693 by support
Thank you.
This is good news to hear.

We know very well that the default application pool account does not have enough permissions to do COM/DCOM. Either changing its permissions, or using a different account with broader permissions, is necessary. On the other hand, for security reasons, ideally this account should be given minimal permissions needed to perform the task - especially if The Web app is exposed to the public Internet. The code runs under the Web server context. Aside from testing/troubleshooting it needs to be, it certainly should not be an account with admin rights. I do not have, however, specific guidance as to how precisely to configure the account.

Best regards

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

More
26 Mar 2024 19:00 #12688 by Kyle.Oshima@caltrol.com
Good news, now have QuickOPC "ReadAndDisplayValue_VBScript.asp" VBScript ASP example script working thru IIS.

Turns out remaining problem was around your step.3 from your last post. As you note, that step was missing from your previous troubleshooting instruction. Also your step.3 instruction outlines "Basic Settings..." under the Application Pool (which does exist but different, see your step.2) After some digging, think found what you were intending as additional "Basic Settings..." but under the Default Web Site (see attached screenshot)

Changing path credentials to connect as specific user as outlined, webpage now displays as expected.

Thanks.
Attachments:
The following user(s) said Thank You: support

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

More
25 Mar 2024 12:53 #12683 by support
Hello.

I am doing this on a VM with fresh installation of Windows Server 2022 Standard (21H1), with just the administrator account created during the install (no domain). From there, following steps lead me to a successful result:

1. Server Manager -> Add Roles And Features. Added server role "Web Server (IIS)", with default choices except that in Role Services, I have added Web Server -> Application Development -> ASP (which, by itself, also adds ISAPI Extensions).

2. Server Manager >- Tools -> Internet Information Services (IIS) Manager. <computer name> -> Application Pools -> DefaultAppPool. Press "Advanced Settings", and change

2.1 Managed Pipeline Mode = Classic
2.2 Identity = Custom Account -> Set. Enter User name, password, and Confirm password.

Apply all changes (OK, OK)

3. Still in IIS Manager, select <computer name> -> Application Pools -> DefaultAppPool. Press "Basic Settings" under Actions. In "Edit Site" dialog, press "Connect as…" button, select "Specific user", and set it to the same user as in Step 2.2.

Apply all changes (OK, OK, OK).

4. Still in IIS Manager, select <computer name> -> Application Pools -> DefaultAppPool. Double-click on the ASP icon. Under Debugging Properties, set

Send Errors to Browser = True.

Press "Apply" under "Actions".

5. Installed OPC Studio 2024.1, unchecking "Excel OPC Connector" , and choosing "Express install for .NET, Python and COM (native) development.

6. Using File Explorer, copied file ReadAndDisplayValue_VBScript.asp
from C:\Program Files (x86)\OPC Labs OPC Studio 2024.1\Examples-COM\VBScript\ASP
to C:\inetpub\wwwroot

7. Server Manager >- Tools -> Internet Information Services (IIS) Manager. <computer name> -> Default Web Site. Switch the tab to Content View. Select ReadAndDisplayValue_VBScript.asp, press "Browse" under "Actions".

This opens Edge and gives me:




The devil might be in the details. Also not sure if I described Step 3 earlier. Can you please go through the whole process again and see if it works for you.

Best regards
Attachments:

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

More
22 Mar 2024 21:06 #12679 by support
Hello.

Please bear with me. I will travelling starting now and over weekend. I will reply then. Probably start over again, and make sure all my steps are carefully recorded.

Note that assuming we/you will get this working in the "hello world" scenario, the whole architecture, when used in this way, is known to be a headache. This has to do with the use of DCOM in OPC "Classic". It is difficult enough to set up DCOM outside IIS. Running OPC apps under IIS brings it to yet another level.

Do you intend to access remote OPC servers from the Web app, or just local servers (OPC servers on the same machine as the IIS)?

Best regards

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

More
22 Mar 2024 20:00 #12677 by Kyle.Oshima@caltrol.com
Yes, have IIS Manager default application pool DefaultAppPool Identity set to Admin interactive account -- see prior post attachment "InternetInformationServicesManager_ApplicationPools (2).jpg"

Like yourself, am in process of spinning up new VM with fresh OS and QuickOPC installs to eliminate any possible effect of other tools installed to help isolate issue.

With your fresh machine installation that works, can you confirm the specific Windows Server 2022 Standard, IIS 10 install components needed to be installed? -- as noted in prior post, 8 of 10 IIS options installed (of 43 total options available) were automatically selected by default when IIS role enabled, plus 2 Application Development options additionally installed to enable classic ASP (see prior post attachment "ServerManager_AddRolesAndFeaturesWizard (2).jpg")

Note, my test machines are on isolated control LAN, so Admin interactive account is domain account -- can you confirm whether your working machine requires any different setup using domain credentials?

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

More
18 Mar 2024 22:27 #12647 by support
Hello.

I assume you still have the app pool account set to yours. Make sure you restart the app and recycle the app pool, there are actions for that in IIS Manager. If that does not help, I am out of ideas. On a fresh machine installation, I made it work with the steps we went through .

Best regards

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

More
18 Mar 2024 22:00 #12646 by Kyle.Oshima@caltrol.com
As noted, modified IIS Manager default application pool DefaultAppPool Managed Pipeline Mode as directed (see attached screenshot) but still get same error result
Attachments:

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

More
18 Mar 2024 19:48 #12645 by support
Hello.
I installed the whole setup according to your description, and indeed, I was able reproduce the issue in practically the same way.

I was then able to resolve it like this:

1. Select Application Pools -> DefaultApplicationPool.
2. Under Action, press Basic Settings.
3. In "Edit Application Pool" dialog, set "Managed pipeline mode" to "Classic".
4. Confirm/apply.

Note that I still had to run the DefaultApplicationPool under my own interactive user identity.

I hope this helps
Best regards

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

More
18 Mar 2024 07:00 #12644 by Kyle.Oshima@caltrol.com
As requested, modified IIS Manager default application pool DefaultAppPool Advanced Settings as directed but get same error result.

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

More
18 Mar 2024 02:21 #12642 by support
In addition, please verify that in the application pool settings, General -> .NET CLR version is set to v4.0.

Best regards

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

Moderators: support
Time to create page: 0.064 seconds