Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hai to all,


I am developing the sample wcf service for IIS Hosting.In the web config file in the endpoint whether i have to use the address 'http://localhost//IISService/Myservice.svc' or my file folder like'c:/documentsettings/visualstudio2008/IISService/Myservice.svc.Please clear my doubt
Posted

You should be using the URL in the client configuration for the endpoint.
 
Share this answer
 
A config could read something like this. As d@nish mentions, you use the URL rather than the file system path to resolve the service endpoint.


XML
<system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_MyApplication" closeTimeout="00:01:00"
            openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
            allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
            maxBufferSize="1000000" maxBufferPoolSize="524288" maxReceivedMessageSize="1000000"
            messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
            useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
              maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://localhost/YourVirtualDirectory/SomeService.svc"
          binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ MyApplication "
          contract="ISomeInterface" name="BasicHttpBinding_ISomeInterface " />
    </client>
</system.serviceModel>



If you right click on your service in Visual Studio & choose 'View In Browser', it'll open the service and show you some syntax for creating a client side proxy.

svcutil.exe http://localhost/YourVirtualDirectory/SomeService.svc?wsdl 



If you open your visual studio command prompt & run that command, it'll create a proxy class for your service & it will also create a service config file for you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900