i was able to access normal iisexpress-webservices from extern with change of ....vs\DashboardCore\config\applicationhost.config
when adding more bindings with my hostname:
/<bindings>
<binding protocol="http" bindingInformation="*:5001:127.0.0.1" />
<binding protocol="http" bindingInformation="*:5001:localhost" />
<binding protocol="http" bindingInformation="*:5000:localhost" />
<binding protocol="http" bindingInformation="*:47200:localhost" />
<binding protocol="https" bindingInformation="*:44334:localhost" />
<binding protocol="http" bindingInformation="*:5001:nb080.mydomain.local" />
<binding protocol="http" bindingInformation="*:5000:nb080.mydomain.local" />
<binding protocol="http" bindingInformation="*:47200:nb080.mydomain.local" />
<binding protocol="https" bindingInformation="*:44334:nb080.mydomain.local" />
</bindings>
but MQTTnet from the client still works only with
var url = "localhost:5001/mqtt";
and not with
var url = "nb080.mydomain.local:5001/mqtt";
var options = new ManagedMqttClientOptionsBuilder()
.WithAutoReconnectDelay(TimeSpan.FromSeconds(5))
.WithClientOptions(new MqttClientOptionsBuilder()
.WithClientId($"Client {printer}")
.WithWebSocketServer(url)
.WithCredentials(database, hash)
.Build())
.Build();
i expect that mqttnet also uses the hostname.
my launchsettings.json looks like
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:5001",
"sslPort": 44334
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "weatherforecast",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}