<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=373306&amp;view=findpost&amp;p=3281907</guid>
        <pubDate>Fri, 01 Mar 2013 08:50:17 +0000</pubDate>
        <title>WCF на HTTPS</title>
        <link>https://forum.sources.ru/index.php?showtopic=373306&amp;view=findpost&amp;p=3281907</link>
        <description><![CDATA[Kobra: здравствуйте господа<br>
возникла проблема при переходе с HTTP на HTTPS.<br>
вот конфиг, правильно работающий на HTTP. (лишнее вырезано)<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&#60;?xml version=&quot;1.0&quot;?&#62;</div><div class="code_line">&#60;configuration&#62;</div><div class="code_line">&nbsp;&nbsp; &#60;system.web&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#60;compilation debug=&quot;true&quot; targetFramework=&quot;4.0&quot; /&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;/system.web&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;system.serviceModel&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#60;behaviors&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;&#60;serviceBehaviors&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&#60;behavior&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#60;!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#60;serviceMetadata httpGetEnabled=&quot;true&quot; httpsGetEnabled=&quot;false&quot; /&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#60;!-- To receive exception details in faults for debugging purposes, set the value below to true. &nbsp;Set to false before deployment to avoid disclosing exception information --&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#60;serviceDebug includeExceptionDetailInFaults=&quot;false&quot;/&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&#60;/behavior&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;&#60;/serviceBehaviors&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#60;/behaviors&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#60;serviceHostingEnvironment multipleSiteBindingsEnabled=&quot;true&quot; /&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;/system.serviceModel&#62;</div><div class="code_line">&#60;system.webServer&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#60;modules runAllManagedModulesForAllRequests=&quot;true&quot;/&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;/system.webServer&#62;</div><div class="code_line">&#60;/configuration&#62;</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br>
и соответствуиший wsdl.<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&#60;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&#62; </div><div class="code_line">- &#60;wsdl:definitions name=&quot;Transfer&quot; targetNamespace=&quot;http://tempuri.org/&quot; xmlns:wsdl=&quot;http://schemas.xmlsoap.org/wsdl/&quot; xmlns:soap=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; xmlns:soapenc=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot; xmlns:wsu=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:soap12=&quot;http://schemas.xmlsoap.org/wsdl/soap12/&quot; xmlns:tns=&quot;http://tempuri.org/&quot; xmlns:wsa=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot; xmlns:wsp=&quot;http://schemas.xmlsoap.org/ws/2004/09/policy&quot; xmlns:wsap=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing/policy&quot; xmlns:wsaw=&quot;http://www.w3.org/2006/05/addressing/wsdl&quot; xmlns:msc=&quot;http://schemas.microsoft.com/ws/2005/12/wsdl/contract&quot; xmlns:wsa10=&quot;http://www.w3.org/2005/08/addressing&quot; xmlns:wsx=&quot;http://schemas.xmlsoap.org/ws/2004/09/mex&quot; xmlns:wsam=&quot;http://www.w3.org/2007/05/addressing/metadata&quot;&#62;</div><div class="code_line">- &#60;wsdl:types&#62;</div><div class="code_line">- &#60;xsd:schema targetNamespace=&quot;http://tempuri.org/Imports&quot;&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;xsd:import schemaLocation=&quot;http://REAL IP:9097/Transfer.svc?xsd=xsd0&quot; namespace=&quot;http://tempuri.org/&quot; /&#62; </div><div class="code_line">&nbsp;&nbsp;&#60;xsd:import schemaLocation=&quot;http://REAL IP:9097/Transfer.svc?xsd=xsd1&quot; namespace=&quot;http://schemas.microsoft.com/2003/10/Serialization/&quot; /&#62; </div><div class="code_line">&nbsp;&nbsp;&#60;xsd:import schemaLocation=&quot;http://REAL IP:9097/Transfer.svc?xsd=xsd2&quot; namespace=&quot;http://schemas.datacontract.org/2004/07/BankConstanta.SoflisVaucheri&quot; /&#62; </div><div class="code_line">&nbsp;&nbsp;&#60;/xsd:schema&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;/wsdl:types&#62;</div><div class="code_line">- &#60;wsdl:message name=&quot;ITransfer_createMoneyTransfer_InputMessage&quot;&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;wsdl:part name=&quot;parameters&quot; element=&quot;tns:createMoneyTransfer&quot; /&#62; </div><div class="code_line">&nbsp;&nbsp;&#60;/wsdl:message&#62;</div><div class="code_line">- &#60;wsdl:message name=&quot;ITransfer_createMoneyTransfer_OutputMessage&quot;&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;wsdl:part name=&quot;parameters&quot; element=&quot;tns:createMoneyTransferResponse&quot; /&#62; </div><div class="code_line">&nbsp;&nbsp;&#60;/wsdl:message&#62;</div><div class="code_line">- &#60;wsdl:portType name=&quot;ITransfer&quot;&#62;</div><div class="code_line">- &#60;wsdl:operation name=&quot;createMoneyTransfer&quot;&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;wsdl:input wsaw:Action=&quot;http://tempuri.org/ITransfer/createMoneyTransfer&quot; message=&quot;tns:ITransfer_createMoneyTransfer_InputMessage&quot; /&#62; </div><div class="code_line">&nbsp;&nbsp;&#60;wsdl:output wsaw:Action=&quot;http://tempuri.org/ITransfer/createMoneyTransferResponse&quot; message=&quot;tns:ITransfer_createMoneyTransfer_OutputMessage&quot; /&#62; </div><div class="code_line">&nbsp;&nbsp;&#60;/wsdl:operation&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;/wsdl:portType&#62;</div><div class="code_line">- &#60;wsdl:binding name=&quot;BasicHttpBinding_ITransfer&quot; type=&quot;tns:ITransfer&quot;&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;soap:binding transport=&quot;http://schemas.xmlsoap.org/soap/http&quot; /&#62; </div><div class="code_line">- &#60;wsdl:operation name=&quot;createMoneyTransfer&quot;&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;soap:operation soapAction=&quot;http://tempuri.org/ITransfer/createMoneyTransfer&quot; style=&quot;document&quot; /&#62; </div><div class="code_line">- &#60;wsdl:input&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;soap:body use=&quot;literal&quot; /&#62; </div><div class="code_line">&nbsp;&nbsp;&#60;/wsdl:input&#62;</div><div class="code_line">- &#60;wsdl:output&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;soap:body use=&quot;literal&quot; /&#62; </div><div class="code_line">&nbsp;&nbsp;&#60;/wsdl:output&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;/wsdl:operation&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;/wsdl:binding&#62;</div><div class="code_line">- &#60;wsdl:service name=&quot;Transfer&quot;&#62;</div><div class="code_line">- &#60;wsdl:port name=&quot;BasicHttpBinding_ITransfer&quot; binding=&quot;tns:BasicHttpBinding_ITransfer&quot;&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;soap:address location=&quot;http://REAL IP:9097/Transfer.svc&quot; /&#62; </div><div class="code_line">&nbsp;&nbsp;&#60;/wsdl:port&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;/wsdl:service&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;/wsdl:definitions&#62;</div></ol></div></div></div></div><br>
после перевода на HTTPS, <br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#60;serviceMetadata httpGetEnabled=&quot;false&quot; httpsGetEnabled=&quot;true&quot; /&#62;</div></ol></div></div></div></div><br>
полученный wsdl даёт внутренний soap:address.<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp;&#60;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&#62; </div><div class="code_line">- &#60;wsdl:definitions name=&quot;Transfer&quot; targetNamespace=&quot;http://tempuri.org/&quot; xmlns:wsdl=&quot;http://schemas.xmlsoap.org/wsdl/&quot; xmlns:soap=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; xmlns:soapenc=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot; xmlns:wsu=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:soap12=&quot;http://schemas.xmlsoap.org/wsdl/soap12/&quot; xmlns:tns=&quot;http://tempuri.org/&quot; xmlns:wsa=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing&quot; xmlns:wsp=&quot;http://schemas.xmlsoap.org/ws/2004/09/policy&quot; xmlns:wsap=&quot;http://schemas.xmlsoap.org/ws/2004/08/addressing/policy&quot; xmlns:wsaw=&quot;http://www.w3.org/2006/05/addressing/wsdl&quot; xmlns:msc=&quot;http://schemas.microsoft.com/ws/2005/12/wsdl/contract&quot; xmlns:wsa10=&quot;http://www.w3.org/2005/08/addressing&quot; xmlns:wsx=&quot;http://schemas.xmlsoap.org/ws/2004/09/mex&quot; xmlns:wsam=&quot;http://www.w3.org/2007/05/addressing/metadata&quot;&#62;</div><div class="code_line">- &#60;wsdl:types&#62;</div><div class="code_line">- &#60;xsd:schema targetNamespace=&quot;http://tempuri.org/Imports&quot;&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;xsd:import schemaLocation=&quot;https://REAL IP:444/Transfer.svc?xsd=xsd0&quot; namespace=&quot;http://tempuri.org/&quot; /&#62; </div><div class="code_line">&nbsp;&nbsp;&#60;xsd:import schemaLocation=&quot;https://REAL IP:444/Transfer.svc?xsd=xsd1&quot; namespace=&quot;http://schemas.microsoft.com/2003/10/Serialization/&quot; /&#62; </div><div class="code_line">&nbsp;&nbsp;&#60;xsd:import schemaLocation=&quot;https://REAL IP:444/Transfer.svc?xsd=xsd2&quot; namespace=&quot;http://schemas.datacontract.org/2004/07/BankConstanta.SoflisVaucheri&quot; /&#62; </div><div class="code_line">&nbsp;&nbsp;&#60;/xsd:schema&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;/wsdl:types&#62;</div><div class="code_line">- &#60;wsdl:message name=&quot;ITransfer_createMoneyTransfer_InputMessage&quot;&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;wsdl:part name=&quot;parameters&quot; element=&quot;tns:createMoneyTransfer&quot; /&#62; </div><div class="code_line">&nbsp;&nbsp;&#60;/wsdl:message&#62;</div><div class="code_line">- &#60;wsdl:message name=&quot;ITransfer_createMoneyTransfer_OutputMessage&quot;&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;wsdl:part name=&quot;parameters&quot; element=&quot;tns:createMoneyTransferResponse&quot; /&#62; </div><div class="code_line">&nbsp;&nbsp;&#60;/wsdl:message&#62;</div><div class="code_line">- &#60;wsdl:portType name=&quot;ITransfer&quot;&#62;</div><div class="code_line">- &#60;wsdl:operation name=&quot;createMoneyTransfer&quot;&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;wsdl:input wsaw:Action=&quot;http://tempuri.org/ITransfer/createMoneyTransfer&quot; message=&quot;tns:ITransfer_createMoneyTransfer_InputMessage&quot; /&#62; </div><div class="code_line">&nbsp;&nbsp;&#60;wsdl:output wsaw:Action=&quot;http://tempuri.org/ITransfer/createMoneyTransferResponse&quot; message=&quot;tns:ITransfer_createMoneyTransfer_OutputMessage&quot; /&#62; </div><div class="code_line">&nbsp;&nbsp;&#60;/wsdl:operation&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;/wsdl:portType&#62;</div><div class="code_line">- &#60;wsdl:binding name=&quot;BasicHttpBinding_ITransfer&quot; type=&quot;tns:ITransfer&quot;&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;soap:binding transport=&quot;http://schemas.xmlsoap.org/soap/http&quot; /&#62; </div><div class="code_line">- &#60;wsdl:operation name=&quot;createMoneyTransfer&quot;&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;soap:operation soapAction=&quot;http://tempuri.org/ITransfer/createMoneyTransfer&quot; style=&quot;document&quot; /&#62; </div><div class="code_line">- &#60;wsdl:input&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;soap:body use=&quot;literal&quot; /&#62; </div><div class="code_line">&nbsp;&nbsp;&#60;/wsdl:input&#62;</div><div class="code_line">- &#60;wsdl:output&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;soap:body use=&quot;literal&quot; /&#62; </div><div class="code_line">&nbsp;&nbsp;&#60;/wsdl:output&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;/wsdl:operation&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;/wsdl:binding&#62;</div><div class="code_line">- &#60;wsdl:service name=&quot;Transfer&quot;&#62;</div><div class="code_line">- &#60;wsdl:port name=&quot;BasicHttpBinding_ITransfer&quot; binding=&quot;tns:BasicHttpBinding_ITransfer&quot;&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;soap:address location=&quot;http://ws-test.constanta.ge:9097/Transfer.svc&quot; /&#62; </div><div class="code_line">&nbsp;&nbsp;&#60;/wsdl:port&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;/wsdl:service&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;/wsdl:definitions&#62;</div></ol></div></div></div></div><br>
а если в конфиге статически прописать soap:address, то xsd:import адреса генерит внутренние.<br>
как лечить?<br>
спасибо]]></description>
        <author>Kobra</author>
        <category>.NET: Распределенные приложения</category>
      </item>
	
      </channel>
      </rss>
	