-
Notifications
You must be signed in to change notification settings - Fork 926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove ASP.NET dependency when develop custom OPC UA server #1949
Comments
Hi @2mik, the https dependency is by default not included if you only reference the OPCFoundation.NetStandard.Opc.Ua.Server package. For backward compatibility the OPCFoundation.NetStandard.Opc.Ua packages includes all client and server packages including GDS and https. |
Hi,
After build NetCoreConsoleServer.runtimeconfig.json does not contain AspNetCore. And there is no Opc.Ua.Bindings.Https.dll in the Release folder. That's good.
So the application tries to load Opc.Ua.Bindings.Https anyway. Is it possible to avoid it? |
Should not be loaded if you don't specify a https endpoint... <ServerConfiguration>
<BaseAddresses>
remove --> <ua:String>https://localhost:62540/Quickstarts/ReferenceServer</ua:String>
<ua:String>opc.tcp://localhost:62541/Quickstarts/ReferenceServer</ua:String> |
I removed the specified string from Opc.Ua.SampleServer.Config.xml, but Opc.Ua.Bindings.Https.dll still requested. Note: the file Opc.Ua.SampleServer.Config.xml is definitely in use, because I can change server TCP port, and changes are applied, for example. |
@2mik thats a bug, I have a fix. |
Cool! I will test the new version with the fix when it is available. |
Could you tell when the next release is going to be available? |
Works in OPC UA 1.4.371.41 |
Type of issue
Current Behavior
Let's consider the NetCoreConsoleServer project. If we build it by default, the file NetCoreConsoleServer.runtimeconfig.json contains AspNetCore dependency:
If I remove Microsoft.AspNetCore.App from NetCoreConsoleServer.runtimeconfig.json and run NetCoreConsoleServer.exe, I got the error:
Then if I delete Opc.Ua.Bindings.Https.dll, the server starts successfully, but internally the application tries to load the dll. To check this, I added to Program.cs the following code
and I got the error:
In our project, a custom OPC UA server works as a service and should not require AspNetCore, only NETCore.
Is there a way to avoid dependency on ASP.NET and Opc.Ua.Bindings.Https?
Expected Behavior
A service that implements OPC UA server can be built and can work without dependency on ASP.NET and probably Opc.Ua.Bindings.Https.
Steps To Reproduce
Described above.
Environment
Anything else?
HTTPS connection to OPC UA server is not needed, TCP is enough.
The text was updated successfully, but these errors were encountered: