none
endpoint on web.config RRS feed

  • Question

  • hi ,

    i'm having a problem: when i create a web service to consume data from ma database created with sql server 2012, i can't find any endponit on web.config file

    how can i add it ???

    thanks for advance

    Tuesday, March 25, 2014 11:19 AM

Answers

  • Hi,

    If you host your service in the IIS, then by default it will use the basicHttpBinding, so you will see no endpoint in the web.config file, but you can add the endpoint in the <system.serviceModel> as following:

    <bindings>
          <basicHttpBinding>
            <binding name="basicHttpBinding_service" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" allowCookies="false" 
    maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
             
    <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
             
    <security mode="None"/>
           
    </binding> </basicHttpBinding> </bindings> <services> <service name="WcfService1.Service1"> <endpoint address="" binding="basicHttpBinding" contract="WcfService1.IService1"
    bindingConfiguration="basicHttpBinding_service"></endpoint> </service> </services>

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, March 26, 2014 3:17 AM
    Moderator
  • Hi,

    I think you are using WCF on .NET 4.0. This version has removed lots of configuration related coding for default behaviour. You can still apply the same if you need.

    If you use .NET 3.0 then you will see the details of configuration in Web.config.

    Below document may help you.

    http://msdn.microsoft.com/en-us/library/ee354381.aspx


    One good question is equivalent to ten best answers.

    Wednesday, March 26, 2014 3:29 AM

All replies

  • Hi,

    If you host your service in the IIS, then by default it will use the basicHttpBinding, so you will see no endpoint in the web.config file, but you can add the endpoint in the <system.serviceModel> as following:

    <bindings>
          <basicHttpBinding>
            <binding name="basicHttpBinding_service" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" allowCookies="false" 
    maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
             
    <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
             
    <security mode="None"/>
           
    </binding> </basicHttpBinding> </bindings> <services> <service name="WcfService1.Service1"> <endpoint address="" binding="basicHttpBinding" contract="WcfService1.IService1"
    bindingConfiguration="basicHttpBinding_service"></endpoint> </service> </services>

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, March 26, 2014 3:17 AM
    Moderator
  • Hi,

    I think you are using WCF on .NET 4.0. This version has removed lots of configuration related coding for default behaviour. You can still apply the same if you need.

    If you use .NET 3.0 then you will see the details of configuration in Web.config.

    Below document may help you.

    http://msdn.microsoft.com/en-us/library/ee354381.aspx


    One good question is equivalent to ten best answers.

    Wednesday, March 26, 2014 3:29 AM