locked
Not getting response after hosting on IIS 7.0 RRS feed

  • Question

  • Hi,

    I have hosted a WCF service on IIS 7.0 for the following URL http://localhost:57296/ApplicationDataService.svc. I am able to access it from IE and also able to browse the WSDL from IE.

    I have created a client for the same service and called exposed method.

    ************* Client Code *******************

    ServiceReference4.ApplicationDataServiceClient client = new ServiceReference4.ApplicationDataServiceClient();

    client.Open();

    ServiceReference4.getApplicationResponseData[] arr;

    arr = client.GetApplicationData(ServiceReference4.applicationNames.SLS, System.DateTime.Now, 15);

    ******************************************

    ************ Web.Config code ***************

    <system.serviceModel>

    <behaviors>
    <serviceBehaviors>
    <behavior name="MyServiceTypeBehaviors">
    <serviceMetadata httpGetEnabled="true"/>
    </behavior>
    </serviceBehaviors>
    </behaviors>
    <bindings>
    <basicHttpBinding>
    <binding name="BasicHttpBinding_ApplicationDataService" closeTimeout="00:05:00" openTimeout="00:05:00" receiveTimeout="00:20:00" sendTimeout="00:10:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
    <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
    <security mode="None">
    <transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
    <message clientCredentialType="UserName" algorithmSuite="Default"/>
    </security>
    </binding>
    </basicHttpBinding>
    </bindings>
    <services>
    <service name="ApplicationDataService.ApplicationDataService" behaviorConfiguration="MyServiceTypeBehaviors">
    <endpoint address="http://localhost:57296/ApplicationDataService.svc" binding="basicHttpBinding" contract="IApplicationDataService">
              <identity>
                <dns value="206.120.193.39:57296"/>
                <!--<dns value="localhost"/>-->
              </identity>
    </endpoint>
            <!--<endpoint address="" binding="basicHttpBinding" contract="IApplicationDataService">
            </endpoint>-->
    <endpoint address="mex" binding="mexHttpBinding" name="ApplicationDataService_Meta" contract="IMetadataExchange"/>
            <host>
              <baseAddresses>
                <add baseAddress="http://206.120.193.39:57296/" />
              </baseAddresses>
            </host>
    </service>
    <service name="ApplicationDataService.ApplicationDataService1" behaviorConfiguration="MyServiceTypeBehaviors">
    <endpoint contract="IApplicationDataService" binding="mexHttpBinding" address="mex"/>
    </service>
    </services>
    </system.serviceModel>

    **********************************************************

    Everything went well, no error, but its not giving the response.

    I tried the same thing by creating the client in the same solution and it is working fine and giving the perfect reponse in arr.

    I dont know what I did wrong in hosting the service.

    Can anyone please help me in sorting the problem.

    Thanks in advance.

    Regards,

    Afreen

    Thursday, February 23, 2012 4:44 AM

All replies

  • Hi,

     http://localhost:57296/ApplicationDataService.svc Is that url your IIs url or your visual studio web development server url? Also when hosting in IIS you dont have to specify the endpoint address in config because it will take the virtual path your service points to.


    Please mark the response as answers if it solves your question or vote as helpful if you find it helpful. http://thoughtorientedarchitecture.blogspot.com/

    Thursday, February 23, 2012 6:02 AM
  • Hi Thanks for the response.

    The URL is same for both Visual Studio and IIS.

    I tried by not specifying the endpoint address config, but the same problem was there.

    What could be the reason for not getting the response?

    Regards,

    Afreen

    Thursday, February 23, 2012 6:09 AM
  • Hi,

    Are you not even getting a time out?Can you set up tracing and message loggin in you service and client to check the request and responses as received and sent by the client and service respectively.

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


    Please mark the response as answers if it solves your question or vote as helpful if you find it helpful. http://thoughtorientedarchitecture.blogspot.com/

    Thursday, February 23, 2012 6:21 AM