Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 946373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:54:14+00:00 2026-05-15T22:54:14+00:00

I have a Silverlight 4 user control that calls a WCF service residing within

  • 0

I have a Silverlight 4 user control that calls a WCF service residing within an ASP.NET 4 web application.

Anonymous access to the webservice is enabled. clientaccesspolicy.xml is in place and downloads successfully. Navigating to FieldITDbService.svc on the server correctly pulls up the service metadata.

However, when I try to view the test page for the Silverlight control that calls this WCF service, the service itself returns:

HTTP/1.1 200 OK
Date: Thu, 22 Jul 2010 21:15:54 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 4.0.30319
Content-Encoding: gzip
Content-Length: 4409
Cache-Control: private
Content-Type: application/soap+msbin1

and then times out without returning data. I am baffled. Does anyone know why this would happen or how I can more effectively debug it? I am trace logging the service but there are no errors in the log — according to the log, it’s working.

Here’s a link showing what happens (from Fiddler2): https://i.stack.imgur.com/5biOM.png

Here is the code in MainPage.xaml.cs that calls the webservice:

var webService = new FieldITDbServiceClient();
webService.ReadVAMDataCompleted += webService_ReadVAMDataCompleted;
webService.ReadVAMDataAsync();
webService.CloseAsync();

Here is the ClientConfig in the Silverlight project used to call the webservice:

<system.serviceModel>
    <bindings>
        <customBinding>
            <binding name="CustomBinding_FieldITDbService">
                <binaryMessageEncoding />
                <httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
            </binding>
        </customBinding>
    </bindings>
    <client>
        <endpoint address="http://[ipofmyserverhere]/FieldIT/FieldITDBService.svc"
            binding="customBinding" bindingConfiguration="CustomBinding_FieldITDbService"
            contract="DbServiceRef.FieldITDbService" name="CustomBinding_FieldITDbService" />
    </client>
</system.serviceModel>

Here is the code in the actual WCF service, FieldITDbService.svc:

 [ServiceContract( Namespace = "" )]
    [AspNetCompatibilityRequirements( RequirementsMode = AspNetCompatibilityRequirementsMode.Required )]
    public class FieldITDbService
    {
        [OperationContract]
        public List<VAM> ReadVAMData()
        {
            List<VAM> allData = new List<VAM>();
            using( FieldITEntities dbContext = new FieldITEntities() )
            {
                allData.AddRange( dbContext.VAMs.ToList() );
            }
            return allData;
        }
    }

Here is the serviceModel section in the web apps web.config file:

 <system.serviceModel>
    <diagnostics>
      <messageLogging maxMessagesToLog="100"
          logEntireMessage="true"
          logMessagesAtServiceLevel="true"
          logMalformedMessages="true"
          logMessagesAtTransportLevel="true">
      </messageLogging>
    </diagnostics>
    <behaviors>
      <serviceBehaviors>
        <behavior name="">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <bindings>
      <customBinding>
        <binding name="FieldIT.FieldITDbService.customBinding0">
          <binaryMessageEncoding />
          <httpTransport />
        </binding>
      </customBinding>
    </bindings>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true"
      multipleSiteBindingsEnabled="true" />
    <services>
      <service name="FieldIT.FieldITDbService">
        <endpoint address="" binding="customBinding" bindingConfiguration="FieldIT.FieldITDbService.customBinding0"
          contract="FieldIT.FieldITDbService" />
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      </service>
    </services>
  </system.serviceModel>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T22:54:16+00:00Added an answer on May 15, 2026 at 10:54 pm

    Switching to client HTTP handling by putting the line

     WebRequest.RegisterPrefix( "http://", WebRequestCreator.ClientHttp );
    

    in the MainPage() constructor fixed this problem instantly and for all browsers. I have no idea why or how, but I’m just going to accept it and move on at this point.

    http://msdn.microsoft.com/en-us/library/dd920295%28v=VS.95%29.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a silverlight 2 beta 2 application that accesses a WCF web service.
I have a Silverlight web app which uses ASP.net Website administration tool for user
I have a Silverlight 2 application that is consuming a WCF service. As such,
I have a Silverlight user control that has several canvas controls within a Stack
I have a Silverlight user control that has an Image control within it. This
I have a Silverlight user control that contains an ItemsControl that renders a StackPanel
I'm just getting started with silverlight. Basically I have a silverlight user control that
I have a User Control that I need to programmatically add to a Silverlight
I have a silverlight mvvm application that loads main view with 2 user controls
I have to create Silverlight User Control with public properties that should be used

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.