OPC UA 空服务器中的 https://+:62545/ - C#

https://+:62545/ in OPC UA Empty Server - C#

我在 OPC UA 空服务器 (C#) 中遇到异常 (AddressAccessDeniedException)。此异常涉及 URL https://+:62545/.

的问题

向下跟踪堆栈:

in System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()

in System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)

in System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)

in System.ServiceModel.Channels.TransportChannelListener.OnOpen(TimeSpan timeout)

in System.ServiceModel.Channels.HttpChannelListener`1.OnOpen(TimeSpan timeout)

in System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

in System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)

in System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

in System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)

in System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

in System.ServiceModel.Channels.CommunicationObject.Open()

in Opc.Ua.Bindings.UaHttpsChannelListener.Start() in C:\Users\MyAccount\Desktop\OPC UA\Stack\Core\Stack\Https\HttpsListener.cs:riga 312

in Opc.Ua.Bindings.UaHttpsChannelListener.Open(Uri baseAddress, TransportListenerSettings settings, ITransportListenerCallback callback) in C:\Users\MyAccount\Desktop\OPC UA\Stack\Core\Stack\Https\HttpsListener.cs:riga 125

in Opc.Ua.ServerBase.CreateHttpsServiceHost(IDictionary2 hosts, ApplicationConfiguration configuration, BindingFactory bindingFactory, IList1 baseAddresses, ApplicationDescription serverDescription, List`1 securityPolicies) in C:\Users\MyAccount\Desktop\OPC UA\Stack\Core\Stack\Server\ServerBase.cs:riga 1174

in Opc.Ua.Server.StandardServer.InitializeServiceHosts(ApplicationConfiguration configuration, BindingFactory bindingFactory, ApplicationDescription& serverDescription, EndpointDescriptionCollection& endpoints) in C:\Users\MyAccount\Desktop\OPC UA\SampleApplications\SDK\Server\Server\StandardServer.cs:riga 2718

in Opc.Ua.ServerBase.Start(ApplicationConfiguration configuration) in C:\Users\MyAccount\Desktop\OPC UA\Stack\Core\Stack\Server\ServerBase.cs:riga 247

in Opc.Ua.Configuration.ApplicationInstance.Start(ServerBase server) in C:\Users\MyAccount\Desktop\OPC UA\SampleApplications\SDK\Configuration\ApplicationInstance.cs:riga 459

in Quickstarts.EmptyServer.Program.Main() in C:\Users\MyAccount\Desktop\OPC UA\SampleApplications\Workshop\Empty\Server\Program.cs:riga 78

修复步骤:运行 管理员身份的命令提示符。将 URL 添加到 ACL

netsh http add urlacl url=https://+:62545/ user=my_local_user.