Sreenath G

Sreenath G

  • NA
  • 233
  • 309.9k

Issue with Hosting Silverlight Application with WCF Service

Apr 8 2011 2:20 AM
 

Hi,

After deployment, I can see the Silverlight control on ASP.Net page being loaded. But, my WCF service which is in my .Web application is not been found it seems. Here is my ServiceReference. ClientConfig file data…

/**************************************

 

<configuration>

  <system.serviceModel>

    <bindings>

      <basicHttpBinding>

        <binding name="BasicHttpBinding_IServiceIncident" maxBufferSize="2147483647"

            maxReceivedMessageSize="2147483647" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00">

          <security mode="None" />

        </binding>

      </basicHttpBinding>

    </bindings>

    <client>

      <endpoint address="../ServiceIncident.svc"

          binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IServiceIncident"

          contract="ServiceReference1.IServiceIncident" name="BasicHttpBinding_IServiceIncident" />

    </client>

  </system.serviceModel>

</configuration>

 

/**************************************

 

And I am calling the Service client object in this way..

/**************************************

 

ServiceReference1.ServiceIncidentClient Prp_WCFService

        {

            get

            {

                if (lObjWCFService == null)

                {

                    Uri lUri = new Uri(Application.Current.Host.Source, "../ServiceIncident.svc");

                    lObjWCFService = new ServiceReference1.ServiceIncidentClient("BasicHttpBinding_IServiceIncident", lUri.AbsoluteUri);

 

                }

                return lObjWCFService;

            }

        }

 

/**************************************

 

And my web.config is as follows…

<system.serviceModel>

    <behaviors>

      <serviceBehaviors>

        <behavior name="">

          <serviceMetadata httpGetEnabled="true" />

          <serviceDebug includeExceptionDetailInFaults="false" />

        </behavior>

      </serviceBehaviors>

    </behaviors>

    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />

  </system.serviceModel>

 

/**************************************

 

Also, I have all the required MIME configured in my IIS.

Do I need to do anything here. Please help


Answers (1)