当前位置: 代码迷 >> Web Service >> WCF 无法激活请求的服务,本机正常,服务器报错!
  详细解决方案

WCF 无法激活请求的服务,本机正常,服务器报错!

热度:245   发布时间:2016-05-02 02:20:10.0
WCF 无法激活请求的服务,本机正常,服务器报错!在线等!!!!
本帖最后由 xinqinglhj 于 2014-01-02 15:57:36 编辑
WCF 发布,本机正常,服务器报错,信息如下:
baidu google 无果后,来请大家帮忙。

ServiceMetadataBehavior 的 HttpsGetEnabled 属性设置为 True,而 HttpsGetUrl 属性是相对地址,但没有 https 基址。请提供 https 基址或将 HttpsGetUrl 设置为绝对地址。

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 

异常详细信息: System.InvalidOperationException: ServiceMetadataBehavior 的 HttpsGetEnabled 属性设置为 True,而 HttpsGetUrl 属性是相对地址,但没有 https 基址。请提供 https 基址或将 HttpsGetUrl 设置为绝对地址。

源错误: 

执行当前 Web 请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。

堆栈跟踪: 


[InvalidOperationException: ServiceMetadataBehavior 的 HttpsGetEnabled 属性设置为 True,而 HttpsGetUrl 属性是相对地址,但没有 https 基址。请提供 https 基址或将 HttpsGetUrl 设置为绝对地址。]
   System.ServiceModel.Description.ServiceMetadataBehavior.EnsureGetDispatcher(ServiceHostBase host, ServiceMetadataExtension mex, Uri url, String scheme) +5330817
   System.ServiceModel.Description.ServiceMetadataBehavior.CreateHttpGetEndpoints(ServiceDescription description, ServiceHostBase host, ServiceMetadataExtension mex) +89
   System.ServiceModel.Description.ServiceMetadataBehavior.ApplyBehavior(ServiceDescription description, ServiceHostBase host) +61
   System.ServiceModel.Description.ServiceMetadataBehavior.System.ServiceModel.Description.IServiceBehavior.ApplyDispatchBehavior(ServiceDescription description, ServiceHostBase serviceHostBase) +30
   System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description, ServiceHostBase serviceHost) +3276
   System.ServiceModel.ServiceHostBase.InitializeRuntime() +60
   System.ServiceModel.ServiceHostBase.OnBeginOpen() +27
   System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) +50
   System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +318
   System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +206
   System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +651

[ServiceActivationException: 由于编译过程中出现异常,无法激活服务“/Rights/RightService.svc”。异常消息为: ServiceMetadataBehavior 的 HttpsGetEnabled 属性设置为 True,而 HttpsGetUrl 属性是相对地址,但没有 https 基址。请提供 https 基址或将 HttpsGetUrl 设置为绝对地址。。]
   System.Runtime.AsyncResult.End(IAsyncResult result) +688590
   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +190
   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, String routeServiceVirtualPath, Boolean flowContext, Boolean ensureWFService) +234
   System.ServiceModel.Activation.HttpHandler.ProcessRequest(HttpContext context) +24
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

------解决方案--------------------
该回复于2014-06-26 16:00:48被管理员删除
  相关解决方案