2010-12-10 13 views
5

मैं एकीकृत विंडोज प्रमाणीकरण सक्षम और अज्ञात पहुंच अक्षम के साथ आईआईएस (5/6) में होस्ट की गई डब्ल्यूसीएफ सेवा का उपयोग करना चाहता हूं। मैंने http://msdn.microsoft.com/en-us/library/ff648431.aspx का पालन करके ऐसा करने की कोशिश की, लेकिन एक त्रुटि प्राप्त हो रही है कि प्रमाणपत्र स्थापित नहीं है। लेकिन मुझे एसएसएल की जरूरत नहीं है। मेरे पास पुराने एएसएमएक्स सेवाओं की अपेक्षा रखने वाले कोई भी ग्राहक नहीं हैं, इसलिए मुझे बुनियादी एचटीपी बाइंडिंग (और यह भी सुरक्षित नहीं है) का उपयोग करने की आवश्यकता नहीं है, इसलिए मैंने wsHttp बाइंडिंग का उपयोग करने की कोशिश की।विंडोज प्रमाणीकरण के साथ आईआईएस में डब्ल्यूसीएफ सेवा और अज्ञात पहुंच के बिना

मैं एसएसएल के बिना काम करने के लिए विंडोज प्रमाणीकरण के साथ wsHttp बाइंडिंग कैसे प्राप्त करूं? यह एक आम आवश्यकता है, लेकिन मुझे इसके लिए कोई समाधान नहीं मिला। क्या कोई ग्राहक और सर्वर के लिए कॉन्फ़िगरेशन पोस्ट कर सकता है? मैं एएसपी.नेट क्लाइंट का उपयोग कर रहा हूं।

नीचे मेरी कॉन्फ़िगरेशन। और सटीक त्रुटि संदेश है: जबकि https://mymachine/WCFTest/Service1.svc को HTTP अनुरोध

एक त्रुटि हुई। यह तथ्य के कारण हो सकता है कि सर्वर प्रमाणपत्र HTTP HTYPS मामले में HTTP.SYS के साथ ठीक से कॉन्फ़िगर नहीं किया गया है। यह क्लाइंट और सर्वर के बीच सुरक्षा बाध्यकारी के मेल के कारण भी हो सकता है।

मैंने क्लाइंट के लिए प्रॉक्सी क्लास और कॉन्फ़िगरेशन उत्पन्न करने के लिए "svcUtil" उपयोगिता का उपयोग किया।

server: 
    <system.serviceModel> 
     <bindings> 
      <wsHttpBinding> 
       <binding name="wsHttpEndpointBinding"> 
        <security mode="Transport"/> 
       </binding> 
      </wsHttpBinding> 
     </bindings> 
     <services> 
      <service behaviorConfiguration="WCFTest.Service1Behavior" name="WCFTest.Service1"> 
       <endpoint address="" binding="wsHttpBinding" bindingConfiguration="wsHttpEndpointBinding" name="wsHttpEndpoint" contract="WCFTest.IService1"/> 
      </service> 
     </services> 
     <behaviors> 
      <serviceBehaviors> 
       <behavior name="WCFTest.Service1Behavior"> 
        <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> 
        <serviceMetadata httpGetEnabled="true"/> 
        <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> 
        <serviceDebug includeExceptionDetailInFaults="false"/> 
       </behavior> 
      </serviceBehaviors> 
     </behaviors> 
    </system.serviceModel> 

client: 
    <system.serviceModel> 
    <bindings> 
     <wsHttpBinding> 
     <binding name="wsHttpEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" 
      receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" 
      transactionFlow="false" hostNameComparisonMode="StrongWildcard" 
      maxBufferPoolSize="524288" maxReceivedMessageSize="65536" 
      messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" 
      allowCookies="false"> 
      <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 
       maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
      <reliableSession ordered="true" inactivityTimeout="00:10:00" 
       enabled="false" /> 
      <security mode="Transport"> 
      <transport clientCredentialType="Windows" proxyCredentialType="None" 
       realm="" /> 
      <message clientCredentialType="Windows" negotiateServiceCredential="true" 
       establishSecurityContext="true" /> 
      </security> 
     </binding> 
     </wsHttpBinding> 
    </bindings> 
    <client> 
     <endpoint address="https://mymachine/WCFTest/Service1.svc" 
      binding="wsHttpBinding" bindingConfiguration="wsHttpEndpoint" 
      contract="IService1" name="wsHttpEndpoint"> 
     <identity> 
      <userPrincipalName value="mymachine\ASPNET" /> 
     </identity> 
     </endpoint> 
    </client> 
    </system.serviceModel> 
+0

अपने बाध्यकारी (सर्वर/क्लाइंट) और सटीक त्रुटि पोस्ट करें। आपको विंडोज प्रमाणीकरण के लिए एसएसएल की आवश्यकता नहीं है। – Aliostad

+0

आपका बाध्यकारी इंगित करता है कि आप परिवहन सुरक्षा का उपयोग करना चाहते हैं। मैं 100% सकारात्मक नहीं हूं लेकिन मुझे लगता है कि परिवहन सुरक्षा का मतलब एसएसएल जैसा ही है। इस प्रश्न के शीर्षक के रूप में –

+0

कहता है, मैं चाहता हूं कि आईआईएस में विंडोज प्रमाणीकरण के साथ मेजबान डब्ल्यूसीएफ सेवा और अज्ञात पहुंच के बिना, मुझे किन परिवर्तनों की आवश्यकता है? @ एलोस्टाड ने कुछ बदलावों का सुझाव दिया, लेकिन फिर भी यह काम नहीं करता है और उनकी टिप्पणियां हटा दी गई हैं? – RKP

उत्तर

6

मैं 0Hआलेख में समझाया गया है, तो मैं मूल Http बाइंडिंग का उपयोग कर समाप्त हुआ। यदि कोई दिलचस्पी लेता है तो ग्राहक के लिए कॉन्फ़िगरेशन और नीचे सर्वर को पोस्ट करना। क्लाइंट कॉन्फ़िगरेशन "svcutil" का उपयोग करके उत्पन्न होता है।

server config:  
    <system.serviceModel> 
    <bindings> 
     <basicHttpBinding> 
     <binding name="BasicHttpEndpointBinding"> 
      <security mode="TransportCredentialOnly"> 
      <transport clientCredentialType="Windows" /> 
      </security> 
     </binding> 
     </basicHttpBinding> 
    </bindings> 
    <services> 
     <service behaviorConfiguration="WCFTest.Service1Behavior" name="WCFTest.Service1"> 
     <endpoint address="" binding="basicHttpBinding" 
      bindingConfiguration="BasicHttpEndpointBinding" 
      name="BasicHttpEndpoint" contract="WCFTest.IService1"> 
     </endpoint> 
     </service> 
    </services> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior name="WCFTest.Service1Behavior"> 
      <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> 
      <serviceMetadata httpGetEnabled="true"/> 
      <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> 
      <serviceDebug includeExceptionDetailInFaults="false"/> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    </system.serviceModel> 

client config: 
    <system.serviceModel> 
    <bindings> 
     <basicHttpBinding> 
     <binding name="BasicHttpEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" 
      receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" 
      bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" 
      maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" 
      messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" 
      useDefaultWebProxy="true"> 
      <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 
       maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
      <security mode="TransportCredentialOnly"> 
      <transport clientCredentialType="Windows" proxyCredentialType="None" 
       realm="" /> 
      <message clientCredentialType="UserName" algorithmSuite="Default" /> 
      </security> 
     </binding> 
     </basicHttpBinding> 
    </bindings> 
    <client> 
     <endpoint address="http://machinename/WCFTest/Service1.svc" 
      binding="basicHttpBinding" bindingConfiguration="BasicHttpEndpoint" 
      contract="IService1" name="BasicHttpEndpoint" /> 
    </client> 
    </system.serviceModel> 
संबंधित मुद्दे

 संबंधित मुद्दे