llj
2 天以前 92cbf3f1a76ecdfdb98dc590d1a5730a70b87a03
接口签名更改
3个文件已修改
13 ■■■■■ 已修改文件
WebAPI/App_Start/WebApiConfig.cs 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Service/SignatureVerifyAttribute.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web.config 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/App_Start/WebApiConfig.cs
WebAPI/Service/SignatureVerifyAttribute.cs
@@ -19,6 +19,9 @@
            HttpActionContext actionContext,
            System.Threading.CancellationToken cancellationToken)
        {
            if(actionContext.Request.Method != HttpMethod.Get)
            {
            var hasAttr = actionContext.ActionDescriptor.GetCustomAttributes<RequireSignatureAttribute>(true).Any()
                       || actionContext.ControllerContext.ControllerDescriptor.GetCustomAttributes<RequireSignatureAttribute>(true).Any();
@@ -26,8 +29,10 @@
            {
                return; 
            }
            }
            var headers = actionContext.Request.Headers;
            string timestamp = null, nonce = null, clientSign = null;
            if (headers.Contains("X-Timestamp"))
WebAPI/Web.config
@@ -143,15 +143,15 @@
            </basicHttpBinding>
        </bindings>
        <client>
            <!--<endpoint address="http://47.96.97.237/WEBS-WMS/WebService1.asmx" binding="basicHttpBinding" bindingConfiguration="WebService1Soap" contract="Webs1.WebService1Soap" name="WebService1Soap" /> -->
        <endpoint address="http://localhost:81/MESWMS-WEBS/webservice1.asmx" binding="basicHttpBinding" bindingConfiguration="WebService1Soap" contract="Webs1.WebService1Soap" name="WebService1Soap" />
            <endpoint address="http://47.96.97.237/WEBS-WMS/WebService1.asmx" binding="basicHttpBinding" bindingConfiguration="WebService1Soap" contract="Webs1.WebService1Soap" name="WebService1Soap" />
        <!--<endpoint address="http://localhost:81/MESWMS-WEBS/webservice1.asmx" binding="basicHttpBinding" bindingConfiguration="WebService1Soap" contract="Webs1.WebService1Soap" name="WebService1Soap" />-->
        </client>
    </system.serviceModel>
 <applicationSettings>
  <WebAPI.Properties.Settings>
   <setting name="WebAPI_WebS_WebService1" serializeAs="String">
       <!--<value>http://47.96.97.237/WEBS-WMS/WebService1.asmx</value> -->
    <value>http://localhost:81/MESWMS-WEBS/webservice1.asmx</value>
       <value>http://47.96.97.237/WEBS-WMS/WebService1.asmx</value>
    <!--<value>http://localhost:81/MESWMS-WEBS/webservice1.asmx</value>-->
   </setting>
  </WebAPI.Properties.Settings>
 </applicationSettings>