设置 Medical Web Viewer 使用HTTPS

发布时间:2017/04/28 00:04 发布者:Richard.Ma

返回博客中心

在Web服务器上启用HTTPS后,还需要执行一些额外的步骤,以使应用程序能够完全使用HTTPS。 步骤详细如下。

  1. 更新MedicalViewerService的web.config文件。 进行以下更改:

a. 将安全信息添加到<webHttpBinding>标签。

原版的:

  
   <webHttpBinding>                               
       <binding name="HandleLargeData" maxReceivedMessageSize="2147483647">
             <readerQuotas maxDepth="2147483647" 
       maxStringContentLength="2147483647" 
       maxArrayLength="2147483647" 
       maxBytesPerRead="2147483647" 
       maxNameTableCharCount="2147483647" />
       </binding>
   </webHttpBinding>
  
  

更改后:

  
  <webHttpBinding>                               
     <binding name="HandleLargeData" maxReceivedMessageSize="2147483647">
        <readerQuotas 
           maxDepth="2147483647" 
           maxStringContentLength="2147483647"
           maxArrayLength="2147483647"
           maxBytesPerRead="2147483647"
           maxNameTableCharCount="2147483647" />
        
        <security mode="Transport">
           <transport clientCredentialType="None" />
        </security>
        
     </binding>
     
     <binding name="wsHttpEndpointBinding">
        <security mode="Transport">
           <transport clientCredentialType="None" />
        </security>
     </binding>
     
  </webHttpBinding>
  
  

突出显示的行设置了支持HTTPS的服务。

b. 使用新的bindingConfiguration属性更新每个端点声明(Leadtools.Medical.Web Viewer.Wcf.Annotations Service除外),如下所示:

      
      <service 
         name="Leadtools.Medical.WebViewer.Wcf.PatientAccessRightsService" 
         behaviorConfiguration="WebViewerServiceBehavior">
         <endpoint 
            address="" 
            binding="webHttpBinding"
            bindingConfiguration="wsHttpEndpointBinding"
            contract="Leadtools.Medical.WebViewer.ServiceContracts.IPatientAccessRightsService"
            behaviorConfiguration="WebViewerServiceBehavior">
         </endpoint>
      </service>
      
      

这个告诉服务使用上面指定的配置。

  1. 更新MedicalViewerService中的所有.svc文件以删除Factory属性。

    原版:

    
    

    <% @ServiceHost Language=C# Debug="true" Factory="System.ServiceModel.Activation.WebServiceHostFactory" Service="Leadtools.Medical.WebViewer.Wcf.ArchiveQueryService" CodeBehind="ArchiveQueryService.cs"%>

    更改后:

    
    

    <% @ServiceHost Language=C# Debug="true" Service="Leadtools.Medical.WebViewer.Wcf.AnnotationsService" CodeBehind="AnnotationsService.cs"%>

    黄色背景的属性被去掉了.

  2. 更新MedicalViewer / Members目录中的WebViewer.aspx文件以指向jquery的HTTPS版本。

    
    

    <link href=https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css rel="stylesheet" type="text/css"/> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>

    The highlighted portions have been changed from "http" to "https". 


关于葡萄城

赋能开发者!葡萄城是专业的集开发工具、商业智能解决方案、低代码开发平台于一身的软件和服务提供商,为超过 75% 的全球财富 500 强企业提供服务。葡萄城专注控件软件领域30年,希望通过模块化的开发控件、灵活的低代码应用开发平台等一系列开发工具、解决方案和服务,帮助开发者快速响应复杂多变的业务需求,最大程度地发挥开发者的才智和潜能,让开发者的 IT 人生更从容更美好。

了解详情,请访问葡萄城官网