设置 Medical Web Viewer 使用HTTPS

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

发布于 2017/04/28 00:00

在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". 

关于葡萄城

葡萄城是专业的软件开发技术和低代码平台提供商,以“赋能开发者”为使命,致力于通过表格控件、低代码和BI等各类软件开发工具和服务,一站式满足开发者需求,帮助企业提升开发效率并创新开发模式。葡萄城开发技术始于1980年,40余年来始终聚焦软件开发技术,有深厚的技术积累和丰富的产品线。是业界能够同时赋能软件开发和低代码开发的企业。凭借过硬的产品能力、活跃的开发者社区和丰富的伙伴生态,与超过3000家合作伙伴紧密合作,产品广泛应用于信息和软件服务、制造、交通运输、建筑、金融、能源、教育、公共管理等支柱产业。

推荐相关案例
推荐相关资源
关注微信
葡萄城社区二维码

关注“葡萄城社区”

加微信获取技术资讯

加微信获取技术资讯

想了解更多信息,请联系我们, 随时掌握技术资源和产品动态