locked
SSL RRS feed

  • Question

  • User-2061822545 posted

    i deployed a web service on i configured an SSL connection, this webservice is called by two applications and the response time when i upload one of these application is too hight. when i removed the ssl the response time was too short.   is'it possible to call this webservice with http://mywebservice..com to get a speed response or  https://mywebservice...com to focus on the security aspect in the other cases. i though to change some thing in the web config to manage this situation, but what..? 

    thanks in advnce for any suggestions.

    Wednesday, May 8, 2013 4:32 PM

Answers

  • User-166373564 posted

    Hi wannouche

    I am looking to configure the same webservice to also accept stantard http calls but not sure how to configure this webconfig to accept both.

    If you want to configure web.config for both http and https, you could refer the discussion that combine the WCF services config for both http and https in one web.config, I think it will give some tips for you,

    # How can I combine the WCF services config for both http and https in one web.config

    hope it helpful to you,

    With regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 15, 2013 2:31 AM

All replies

  • User1196771204 posted

    hi there,

    I do not seem to understand your question. Would you please advise whether you have an issue with the "response time" or something else? 

    Thursday, May 9, 2013 12:00 AM
  • User-2061822545 posted

    thanks,

    I have a webservice configured for https connections and I am looking to configure the same webservice to also accept stantard http calls but not sure how to configure this webconfig to accept both. 

    if yes, where can i manage this because i got the following error : HTTP404

    this is my web config

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
        <system.web>
            <trace enabled="true" pageOutput="false" requestLimit="40" localOnly="false" />
            <customErrors mode="Off" />
            <compilation debug="true" targetFramework="4.0">
                <assemblies>
                    <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
                </assemblies>
            </compilation>
            <httpRuntime maxRequestLength="524288" />
            <authentication mode="Windows"></authentication>
        </system.web>
        <system.serviceModel>
            <behaviors>
                <serviceBehaviors>
                    <behavior name="MyServiceTypeBehaviors">
                        <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
                    </behavior>
                </serviceBehaviors>
                <endpointBehaviors>
                    <behavior name="REST">
                        <webHttp />
                    </behavior>
                </endpointBehaviors>
            </behaviors>
            <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
            <services>
                <service name="ServiceApp.Service1" behaviorConfiguration="MyServiceTypeBehaviors">
                    <endpoint address="" binding="webHttpBinding" behaviorConfiguration="REST" bindingConfiguration="webBinding" contract="ServiceApp.IService1" />
                </service>
            </services>
            <bindings>
                <webHttpBinding>
                    <binding name="webBinding">
                        <security mode="Transport">
                            <transport clientCredentialType="Windows" />
                        </security>
                    </binding>
                </webHttpBinding>
            </bindings>
        </system.serviceModel>
        <system.webServer>
            <modules runAllManagedModulesForAllRequests="true" />
            <httpProtocol>
                <customHeaders>
                    <add name="Access-Control-Allow-Origin" value="*" />
                    <add name="Access-Control-Allow-Headers" value="Content-Type" />
                </customHeaders>
            </httpProtocol>
        </system.webServer>
    </configuration>


    Thanks again.

    Monday, May 13, 2013 12:12 PM
  • User-166373564 posted

    Hi wannouche

    I am looking to configure the same webservice to also accept stantard http calls but not sure how to configure this webconfig to accept both.

    If you want to configure web.config for both http and https, you could refer the discussion that combine the WCF services config for both http and https in one web.config, I think it will give some tips for you,

    # How can I combine the WCF services config for both http and https in one web.config

    hope it helpful to you,

    With regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 15, 2013 2:31 AM
  • User-2061822545 posted

    thanks so much Angie

    Thursday, May 16, 2013 3:52 PM
  • User-2061822545 posted
    i followed the solution in the link step by step, but the result i get was :

    Could not find a base address that matches scheme http for the endpoint with binding WebHttpBinding. Registered base address schemes are [https].

      <system.serviceModel>
        <behaviors>
          <serviceBehaviors>
            <behavior name="MyServiceTypeBehaviors">
              <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
            </behavior>
          </serviceBehaviors>
          <endpointBehaviors>
            <behavior name="REST">
              <webHttp />
            </behavior>
          </endpointBehaviors>
        </behaviors>   
         <serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true" />
        
        <services>
          <service name="ServiceApp.Service1" behaviorConfiguration="MyServiceTypeBehaviors">
            <endpoint address="basic" 
                      binding="webHttpBinding"                   
                      contract="ServiceApp.IService1"
                      behaviorConfiguration="REST"
                      bindingConfiguration="HttpBinding"/>
          
            <endpoint address="secure" 
                    binding="webHttpBinding" 
                    bindingConfiguration="HttpsBinding" 
                    contract="ServiceApp.IService1" 
                    behaviorConfiguration="REST"
                    />
          </service>
        </services>    
          
            
        <bindings>
          <webHttpBinding>       
            <binding name="HttpsBinding">
              <security mode="Transport">
                <transport clientCredentialType="Windows" />
              </security>
            </binding>
            
           <binding name="HttpBinding">
              <security mode="None">
                  <transport clientCredentialType="None"/>
               </security>
              <readerQuotas maxArrayLength="2147483647" maxStringContentLength="2147483647" />
            </binding>
          
          </webHttpBinding>
        </bindings>
      </system.serviceModel>

    by the way, i have IIS 7.0 and the ssl setting for this web service are like : require ssl : checked and client certificates. Ignore: checked

    thnks in advance for all suggestions

    Wednesday, May 22, 2013 2:07 PM