OPCUAUniCT / OPCUAWebPlatformUniCT

An ASP.NET Core web application exposing OPC UA Servers to non OPCUA-compliant clients with a REST interface
GNU General Public License v2.0
103 stars 43 forks source link

Question About "DataSet Not Available" - Not a Bug But Asking for help #14

Open yottayuan opened 4 years ago

yottayuan commented 4 years ago

I am using the UA sample Server or NetCoreConsoleServer (https://github.com/OPCFoundation/UA-.NETStandard ), when I run the project in the Visual Studio,It can connect the Server and read values well. But When I Publish it , when I run OPCUA_Web_Platform.exe by itself, or I run the service through IIS , it shows "DataSet Not Available". I've been suffering this problem for 5 days. So could u describe "Troubleshooting-You may occur in error like "DataSet Not Available" even if all the ip addresses or your OPC UA Server are perfectly configured. Be aware you have configured the platform Instance Certificate in the OPC UA Servers Trusted certificate store." more clearly ? I'm wondering how to configure the platform Instance Certificate in the OPC UA Servers? I'm very appreciate If u can provide a example, or show me the way where to find the solution. thanks.

msalafia commented 4 years ago

As i understand, it works when you the platform from visual studio but it doesn't when run from the exe. I don't think it's an issue related to certificates because it should not work for both cases. To be honest, i think it's a problem related to the ASP.NET Core runtime. Did you try to run the platform with following this instruction?

Go in the project directory and run the project

dotnet run

N.B. You have to take care about running the Web Platform in Development or Production configuration. You can choose the configuration setting the environment variable ASPNETCORE_ENVIRONMENT, as explained here.

Probably there is a bad configuration of ASP.NET runtime for the network access. I need more information in order to help you. "DataSet Not Available" may be due to lot of different issues.

yottayuan commented 4 years ago

@msalafia I find the problem: The Publish Setting:
If I set the Deployment Mode: Self-Contained, It shows "DataSet Not Available". When I set the Deployment Mode : Framework-Dependent

  1. When I set Target Runtime: Portable, It works well,
  2. When I set Target Runtime: win-x64, It shows"DataSet Not Available" I can't find the reason.