Web Service doesn't work on Win XP

Discussion in 'ASP.NET WebServices' started by cgwp, Feb 16, 2012.

  1. I have Visual Basic application (VS 2010) uses some web services to set/get some data from a central server. This was my first attempt to use web services, and it was remarkably simple to get the basics running. I've rolled out my application to 10 beta users, most of whom are on Windows 7, but four are on Win XP (five if you count the VM XP system I use to test against). Only 1 user has had any problems, and they are all related to the web service calls: the client.service call always fails.

    The error returned is:
    The remote server returned an unexpected response: (417) Expectation failed.

    Googling the error, I modified web.config to include:
    <system.net>
    <settings>
    <servicePointManager expect100Continue="false" />
    </settings>
    </system.net>

    That actually fixed the problem, but for 1 day only. Yesterday the user reported the same problem.

    Researching some more, someone suggested that I enable tracing and pointed me to an article on that.
    http://msdn.microsoft.com/en-us/library/ms733025.aspx

    Their recommendation is to put in the following to web.config
    <system.diagnostics>
    <sources>
    <source name="System.ServiceModel"
    switchValue="Information, ActivityTracing"
    propagateActivity="true">
    <listeners>
    <add name="traceListener"
    type="System.Diagnostics.XmlWriterTraceListener"
    initializeData= "c:\log\Traces.svclog" />
    </listeners>
    </source>
    </sources>
    </system.diagnostics>

    My questions are:
    1) How do I determine the correct path for the traceListiner? In the control panel I can find a reverence to X:\web\site\htdocs, so would the path to my logfiles be X:\web\site\log\ ? I put that in but do not see any files (although the services continue to work)
    2) Do I have to restart IIS to enable this, or is it sufficient just to replace the web.config file?
    3) Does anyone have any other suggestions?

    Thanks

    marc
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    1) The path is not correct. You should save the trace data somewhere within your site. I recommend the app_data directory. If you are not sure about the root path to your site, contact support

    2) Rarely you need to restart IIS. Updating the web.config should issue an appDomain recycle and it should take in all the new settings.
     
  3. I've implemented logging, and it looks like the request is from the client is being rejected before it hits the web service, since nothing is in the log.
    The client is still getting:
    The error returned is:
    The remote server returned an unexpected response: (417) Expectation failed.
    Any help would be much appreciated.
    Thanks
    marc
     
  4. I tried making a call to:
    System.Net.ServicePointManager.Expect100Continue = False
    before the call to the web service.

    That seems to have fixed this problem

    Thanks
    marc
     

Share This Page