Ich erstelle Self-hosted Web API-Dienst. Um es zu sichern, ich habe studiert und umgesetzt this Artikel, erzeugte erfolgreich ein lokales SSL-Zertifikat mit makecert und meinen Dienst authentifizierte und erzeugt Token in Ordnung, wenn ich verwendeKonfigurieren von SSL auf ASP.NET Self-Hosted Web API
http://localhost/webapi/authentication/authenticate
Link, aber wenn ich versuche, den Zugang mein Dienst HTTPS verwenden, bekomme ich folgende auf Firefox:
ssl_error_rx_record_too_long
und für die gleiche Anfrage Fiddler zeigt mir:
HTTP/1.1 502 Fiddler - Verbindung fehlgeschlagen Datum: Mo, 26 Aug 2013 10:44:27 GMT Content-Type: text/html; charset = UTF-8 Verbindung: schließen Zeitstempel: 13: 44: 27.433
[Fiddler] Die Socket-Verbindung zu localhost ist fehlgeschlagen.
Fehler bei ausgehandelte HTTPS-Verbindung mit server.fiddler.network.https > Fehler beim Sichern der bestehenden Verbindung für localhost. Der Handshake konnte aufgrund eines unerwarteten Paketformat ..
Mein Selbst Host-Konfiguration:
private HttpSelfHostServer _server;
private ExtendedHttpsSelfHostConfiguration _config;
public const string ServiceAddress = "https://localhost/webapi";
_config = new ExtendedHttpsSelfHostConfiguration(ServiceAddress);
_server = new HttpSelfHostServer(_config);
_server.OpenAsync();
wo ExtendedHttpSelfHostConfiguration von this post genommen ist:
public class ExtendedHttpSelfHostConfiguration : HttpSelfHostConfiguration
{
public ExtendedHttpSelfHostConfiguration(string baseAddress) : base(baseAddress) { }
public ExtendedHttpSelfHostConfiguration(Uri baseAddress) : base(baseAddress) { }
protected override BindingParameterCollection OnConfigureBinding(HttpBinding httpBinding)
{
if (BaseAddress.ToString().ToLower().Contains("https://"))
{
httpBinding.Security.Mode = HttpBindingSecurityMode.Transport;
}
return base.OnConfigureBinding(httpBinding);
}
}
Was mir persönlich fehlt ? Vielen Dank im Voraus!
Vielleicht wegen http://stackoverflow.com/questions/18442542/ssl-error-rx-record-too-long-on-self-hosted-asp-net-web-api? – I4V
Schön, Link zu meinem eigenen ** gelöscht ** Beitrag .. –
Um mehr Attraktion zu bekommen, haben Sie die ** gleichen ** gefragt und die alte gelöscht. – I4V