WCF 服务不会在 HTTPS 上 运行
WCF Service Won't Run on HTTPS
我正在 运行ning IIS 7.5,我的 asp.net mvc 网站有一个 SSL 证书。我的服务是我网站的免费服务,所以我使用 https://www.example.com and I access my service via https://www.example.com/MyService/Service1.svc.
访问网站
我有适用于 HTTP 的代码,但我一直在尝试将其迁移到 HTTPS 以及我在网络上找到的任何示例:Microsoft、Whosebug、Youtube 等。他们都以相同的方式进行操作,但出于某种原因,我无法将我的代码发送到 运行。谁能帮帮我。
Visual Studio 使用 "Add Service Reference" 时的错误消息:
“下载‘https://www.example.com/MyService/Service1.svc?wsdl/$元数据’时出错。
请求已中止:无法创建 SSL/TLS 安全通道。
元数据包含无法解析的引用:“https://www.example.com/MyService/Service1.svc?wsdl”。
无法使用权限 'www.example.com' 为 SSL/TLS 建立安全通道。
请求已中止:无法创建 SSL/TLS 安全通道。
如果服务在当前解决方案中定义,请尝试构建解决方案并再次添加服务引用。"
在我的服务器上,如果我进入 IIS 管理器并单击我的服务并单击浏览 www.example.com on *.443(https),我会得到一个目录列表,这是我打开的项目之一在 web.config.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
<!--Email Information-->
</appSettings>
<!--
For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.
The following attributes can be set on the <httpRuntime> tag.
<system.Web>
<httpRuntime targetFramework="4.5" />
</system.Web>
-->
<system.web>
<customErrors mode="Off"/>
<compilation debug="true" targetFramework="4.7" />
<httpRuntime targetFramework="4.7" />
</system.web>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="secureHttpBinding">
<security mode="Transport">
<transport clientCredentialType="None"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
<services>
<service name="MyService.MyServiceOperations" behaviorConfiguration="MyServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="https://www.example.com"/>
</baseAddresses>
</host>
<endpoint address="basic1" binding="wsHttpBinding" bindingConfiguration="secureHttpBinding" contract="MyService.IUserOperations" />
<endpoint address="basic1" binding="wsHttpBinding" bindingConfiguration="secureHttpBinding" contract="MyService.IPaymentOperations" />
<endpoint address="basic1" binding="wsHttpBinding" bindingConfiguration="secureHttpBinding" contract="MyService.ILocationOperations" />
<endpoint address="basic1" binding="wsHttpBinding" bindingConfiguration="secureHttpBinding" contract="MyService.IInfoOperations" />
<endpoint address="basic1" binding="wsHttpBinding" bindingConfiguration="secureHttpBinding" contract="MyService.IServiceLocationOperations" />
<endpoint address="basic1" binding="wsHttpBinding" bindingConfiguration="secureHttpBinding" contract="MyService.IHelperOperations" />
<endpoint address="basic1" binding="wsHttpBinding" bindingConfiguration="secureHttpBinding" contract="MyService.IReporting" />
<endpoint address="basic1" binding="wsHttpBinding" bindingConfiguration="secureHttpBinding" contract="MyService.ISubItems" />
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceBehavior">
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="jsonEndPoints">
<webHttp />
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<!--
To browse web app root directory during debugging, set the value below to true.
Set to false before deployment to avoid disclosing web app folder information.
-->
<directoryBrowse enabled="true" />
</system.webServer>
<connectionStrings>
<!--DB Connection Strings Have been Removed-->
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v13.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.EntityFramework, Version=8.0.13.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider>
</providers>
</entityFramework>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.13.0" newVersion="8.0.13.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Google.Protobuf" publicKeyToken="a7d26565bac4d604" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.6.1.0" newVersion="3.6.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.EntityFrameworkCore" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.4.0" newVersion="2.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Interactive.Async" publicKeyToken="94bc3704cddfc263" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.2.0.0" newVersion="3.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Remotion.Linq" publicKeyToken="fee00910d6e5f53b" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.Logging.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.1.0" newVersion="2.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.1.0" newVersion="2.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.1" newVersion="4.0.3.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.1.0" newVersion="2.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ComponentModel.Annotations" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.1.0" newVersion="4.2.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.Caching.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.2.0" newVersion="2.1.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.Caching.Memory" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.2.0" newVersion="2.1.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.Primitives" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.6.0" newVersion="2.1.6.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
-----更新唯一可以找到的错误代码-----
事件代码:3005
事件消息:发生了未处理的异常。
活动时间:1/13/2019 10:56:55下午
活动时间 (UTC):1/14/2019 5:56:55 AM
事件 ID:ccf077ec0a414d6bb71d178ba496cec1
事件顺序:2
事件发生:1
事件详细信息代码:0
申请信息:
应用领域:/LM/W3SVC/2/ROOT-17-131919190153815312
信任级别:完全
应用虚拟路径:/
申请路径:C:\inetpub\wwwroot{Path}
机器名称:WEB
进程信息:
进程号:3848
进程名称:w3wp.exe
账户名:IIS APPPOOL\ASP.NET v4.0
异常信息:
异常类型:HttpException
异常消息:提供的 URI 方案 'https' 无效;预计 'http'。
参数名称:通过
在 System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext 上下文,HttpApplication 应用程序)
在 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext、HttpContext 上下文、MethodInfo[] 处理程序)
在 System.Web.HttpApplication.InitSpecial(HttpApplicationState 状态、MethodInfo[] 处理程序、IntPtr appContext、HttpContext 上下文)
在 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext,HttpContext 上下文)
在 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
提供的 URI 方案 'https' 无效;预计 'http'。
参数名称:通过
在 System.ServiceModel.Channels.TransportChannelFactory1.ValidateScheme(Uri via)
at System.ServiceModel.Channels.HttpChannelFactory
1.ValidateCreateChannelParameters(端点地址远程地址,Uri 通过)
at System.ServiceModel.Channels.HttpChannelFactory1.OnCreateChannelCore(EndpointAddress remoteAddress, Uri via)
at System.ServiceModel.Channels.ChannelFactoryBase
1.InternalCreateChannel(EndpointAddress 地址,Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(端点地址,Uri 通过)
at System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress地址,Uri通过)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(类型 channelType,EndpointAddress 地址,Uri 通过)
在 System.ServiceModel.ChannelFactory1.CreateChannel(EndpointAddress address, Uri via)
at System.ServiceModel.ClientBase
1.CreateChannel()
在 System.ServiceModel.ClientBase1.CreateChannelInternal()
at System.ServiceModel.ClientBase
1.get_Channel()
在 TruckIt.TruckItWebOps.LocationOperationsClient.GetStates(Int32 CountryId) 在 C:\Users\User\Desktop{Path}\Reference.cs:line 6107
在 MyService.MvcApplication.Application_Start() 在 C:\Users\User\Desktop{path}\Global.asax.cs:line 41
请求信息:
请求 URL:https://www.example.com:443/
请求路径:/
用户主机地址:192.168.1.1
用户:
是否通过身份验证:假
身份验证类型:
线程帐户名称:IIS APPPOOL\ASP.NET v4.0
线程信息:
线程 ID:43
线程帐户名称:IIS APPPOOL\ASP.NET v4.0
正在模拟:假
堆栈跟踪:在 System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext 上下文,HttpApplication 应用程序)
在 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext、HttpContext 上下文、MethodInfo[] 处理程序)
在 System.Web.HttpApplication.InitSpecial(HttpApplicationState 状态、MethodInfo[] 处理程序、IntPtr appContext、HttpContext 上下文)
在 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext,HttpContext 上下文)
在 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
自定义事件详细信息:
谢谢所有给我智慧回复的人。对于只是将您引导到另一页的愚蠢的人,祝您生活愉快!生活中到处都是平庸的人,我向你保证他们不会走得太远。
至于答案:
所以我的服务将通过网络浏览器响应,所有浏览器。所以我知道这不是 web.config 问题。所以我回去调查了一个最初的想法,我遇到了 TLS 和 SSL 问题。
访问此网站
https://www.ssllabs.com/ssltest/analyze.html?d=casnet.casusa.com&latest
该网站会告诉您可能遇到的问题。就我而言,我的服务器上使用的是 运行 非常旧版本的 TLS 和 SSL。
我使用以下方法更新了我的 SSL:
https://social.technet.microsoft.com/Forums/office/en-US/02241093-187d-41e4-a0fe-1cd19331a9a2/how-to-enable-ssl-v3-on-windows-2008?forum=winserversecurity
我使用以下方法更新了我的 TLS 1.1 和 1.2:
https://tecadmin.net/enable-tls-on-windows-server-and-iis/
然后我不得不在注册表中更新我个人计算机上的上述 SSL 和 TLS,而不是插入 "Server" 密钥,我最终安装了 "Client" 密钥。
更新这些安全协议后,截至 2019 年 1 月 14 日,我能够通过 Visual Studio 2017 最新版本进行连接。再次,我非常感谢那些尝试投入工作并给我答案的人。
我正在 运行ning IIS 7.5,我的 asp.net mvc 网站有一个 SSL 证书。我的服务是我网站的免费服务,所以我使用 https://www.example.com and I access my service via https://www.example.com/MyService/Service1.svc.
访问网站我有适用于 HTTP 的代码,但我一直在尝试将其迁移到 HTTPS 以及我在网络上找到的任何示例:Microsoft、Whosebug、Youtube 等。他们都以相同的方式进行操作,但出于某种原因,我无法将我的代码发送到 运行。谁能帮帮我。
Visual Studio 使用 "Add Service Reference" 时的错误消息: “下载‘https://www.example.com/MyService/Service1.svc?wsdl/$元数据’时出错。 请求已中止:无法创建 SSL/TLS 安全通道。 元数据包含无法解析的引用:“https://www.example.com/MyService/Service1.svc?wsdl”。 无法使用权限 'www.example.com' 为 SSL/TLS 建立安全通道。 请求已中止:无法创建 SSL/TLS 安全通道。 如果服务在当前解决方案中定义,请尝试构建解决方案并再次添加服务引用。"
在我的服务器上,如果我进入 IIS 管理器并单击我的服务并单击浏览 www.example.com on *.443(https),我会得到一个目录列表,这是我打开的项目之一在 web.config.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
<!--Email Information-->
</appSettings>
<!--
For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.
The following attributes can be set on the <httpRuntime> tag.
<system.Web>
<httpRuntime targetFramework="4.5" />
</system.Web>
-->
<system.web>
<customErrors mode="Off"/>
<compilation debug="true" targetFramework="4.7" />
<httpRuntime targetFramework="4.7" />
</system.web>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="secureHttpBinding">
<security mode="Transport">
<transport clientCredentialType="None"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
<services>
<service name="MyService.MyServiceOperations" behaviorConfiguration="MyServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="https://www.example.com"/>
</baseAddresses>
</host>
<endpoint address="basic1" binding="wsHttpBinding" bindingConfiguration="secureHttpBinding" contract="MyService.IUserOperations" />
<endpoint address="basic1" binding="wsHttpBinding" bindingConfiguration="secureHttpBinding" contract="MyService.IPaymentOperations" />
<endpoint address="basic1" binding="wsHttpBinding" bindingConfiguration="secureHttpBinding" contract="MyService.ILocationOperations" />
<endpoint address="basic1" binding="wsHttpBinding" bindingConfiguration="secureHttpBinding" contract="MyService.IInfoOperations" />
<endpoint address="basic1" binding="wsHttpBinding" bindingConfiguration="secureHttpBinding" contract="MyService.IServiceLocationOperations" />
<endpoint address="basic1" binding="wsHttpBinding" bindingConfiguration="secureHttpBinding" contract="MyService.IHelperOperations" />
<endpoint address="basic1" binding="wsHttpBinding" bindingConfiguration="secureHttpBinding" contract="MyService.IReporting" />
<endpoint address="basic1" binding="wsHttpBinding" bindingConfiguration="secureHttpBinding" contract="MyService.ISubItems" />
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceBehavior">
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="jsonEndPoints">
<webHttp />
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<!--
To browse web app root directory during debugging, set the value below to true.
Set to false before deployment to avoid disclosing web app folder information.
-->
<directoryBrowse enabled="true" />
</system.webServer>
<connectionStrings>
<!--DB Connection Strings Have been Removed-->
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v13.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.EntityFramework, Version=8.0.13.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider>
</providers>
</entityFramework>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.13.0" newVersion="8.0.13.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Google.Protobuf" publicKeyToken="a7d26565bac4d604" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.6.1.0" newVersion="3.6.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.EntityFrameworkCore" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.4.0" newVersion="2.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Interactive.Async" publicKeyToken="94bc3704cddfc263" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.2.0.0" newVersion="3.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Remotion.Linq" publicKeyToken="fee00910d6e5f53b" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.Logging.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.1.0" newVersion="2.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.1.0" newVersion="2.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.1" newVersion="4.0.3.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.1.0" newVersion="2.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ComponentModel.Annotations" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.1.0" newVersion="4.2.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.Caching.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.2.0" newVersion="2.1.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.Caching.Memory" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.2.0" newVersion="2.1.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.Primitives" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.6.0" newVersion="2.1.6.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
-----更新唯一可以找到的错误代码-----
事件代码:3005 事件消息:发生了未处理的异常。 活动时间:1/13/2019 10:56:55下午 活动时间 (UTC):1/14/2019 5:56:55 AM 事件 ID:ccf077ec0a414d6bb71d178ba496cec1 事件顺序:2 事件发生:1 事件详细信息代码:0
申请信息: 应用领域:/LM/W3SVC/2/ROOT-17-131919190153815312 信任级别:完全 应用虚拟路径:/ 申请路径:C:\inetpub\wwwroot{Path} 机器名称:WEB
进程信息: 进程号:3848 进程名称:w3wp.exe 账户名:IIS APPPOOL\ASP.NET v4.0
异常信息: 异常类型:HttpException 异常消息:提供的 URI 方案 'https' 无效;预计 'http'。 参数名称:通过 在 System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext 上下文,HttpApplication 应用程序) 在 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext、HttpContext 上下文、MethodInfo[] 处理程序) 在 System.Web.HttpApplication.InitSpecial(HttpApplicationState 状态、MethodInfo[] 处理程序、IntPtr appContext、HttpContext 上下文) 在 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext,HttpContext 上下文) 在 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
提供的 URI 方案 'https' 无效;预计 'http'。
参数名称:通过
在 System.ServiceModel.Channels.TransportChannelFactory1.ValidateScheme(Uri via)
at System.ServiceModel.Channels.HttpChannelFactory
1.ValidateCreateChannelParameters(端点地址远程地址,Uri 通过)
at System.ServiceModel.Channels.HttpChannelFactory1.OnCreateChannelCore(EndpointAddress remoteAddress, Uri via)
at System.ServiceModel.Channels.ChannelFactoryBase
1.InternalCreateChannel(EndpointAddress 地址,Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(端点地址,Uri 通过)
at System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress地址,Uri通过)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(类型 channelType,EndpointAddress 地址,Uri 通过)
在 System.ServiceModel.ChannelFactory1.CreateChannel(EndpointAddress address, Uri via)
at System.ServiceModel.ClientBase
1.CreateChannel()
在 System.ServiceModel.ClientBase1.CreateChannelInternal()
at System.ServiceModel.ClientBase
1.get_Channel()
在 TruckIt.TruckItWebOps.LocationOperationsClient.GetStates(Int32 CountryId) 在 C:\Users\User\Desktop{Path}\Reference.cs:line 6107
在 MyService.MvcApplication.Application_Start() 在 C:\Users\User\Desktop{path}\Global.asax.cs:line 41
请求信息:
请求 URL:https://www.example.com:443/
请求路径:/
用户主机地址:192.168.1.1
用户:
是否通过身份验证:假
身份验证类型:
线程帐户名称:IIS APPPOOL\ASP.NET v4.0
线程信息: 线程 ID:43 线程帐户名称:IIS APPPOOL\ASP.NET v4.0 正在模拟:假 堆栈跟踪:在 System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext 上下文,HttpApplication 应用程序) 在 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext、HttpContext 上下文、MethodInfo[] 处理程序) 在 System.Web.HttpApplication.InitSpecial(HttpApplicationState 状态、MethodInfo[] 处理程序、IntPtr appContext、HttpContext 上下文) 在 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext,HttpContext 上下文) 在 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
自定义事件详细信息:
谢谢所有给我智慧回复的人。对于只是将您引导到另一页的愚蠢的人,祝您生活愉快!生活中到处都是平庸的人,我向你保证他们不会走得太远。
至于答案: 所以我的服务将通过网络浏览器响应,所有浏览器。所以我知道这不是 web.config 问题。所以我回去调查了一个最初的想法,我遇到了 TLS 和 SSL 问题。
访问此网站 https://www.ssllabs.com/ssltest/analyze.html?d=casnet.casusa.com&latest
该网站会告诉您可能遇到的问题。就我而言,我的服务器上使用的是 运行 非常旧版本的 TLS 和 SSL。
我使用以下方法更新了我的 SSL: https://social.technet.microsoft.com/Forums/office/en-US/02241093-187d-41e4-a0fe-1cd19331a9a2/how-to-enable-ssl-v3-on-windows-2008?forum=winserversecurity
我使用以下方法更新了我的 TLS 1.1 和 1.2: https://tecadmin.net/enable-tls-on-windows-server-and-iis/
然后我不得不在注册表中更新我个人计算机上的上述 SSL 和 TLS,而不是插入 "Server" 密钥,我最终安装了 "Client" 密钥。
更新这些安全协议后,截至 2019 年 1 月 14 日,我能够通过 Visual Studio 2017 最新版本进行连接。再次,我非常感谢那些尝试投入工作并给我答案的人。