If you can't run the sample

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • curtmantle
    Junior Member
    • Sep 2013
    • 8

    #1

    If you can't run the sample

    If you're having problems running the C# sample code it might have something to do with the Expect 100 Continue header as mentioned in the info box on this page:

    https://api.developer.betfair.com/se...pageId=3834049

    It would have been useful if they'd given you a code snippet telling you how to do it rather than a link to the ServicePointManager documentation, but that would make life too easy wouldn't it?

    Anyway, there are a couple of ways of setting this property in your application. You can enter the following line at the entry point of your application (in the sample code this will be the Main method in the Program class)

    Code:
    ServicePointManager.Expect100Continue = false;
    Or if you're writing a WPF or ASP.NET application you can add the following to your app.xaml (WPF) or web.config(ASP.NET) files:

    Code:
     
    <system.net>
        <settings> 
             <servicePointManager expect100Continue="false"/>  
         </settings> 
    </system.net>
    Hopefully that will get things working for you. It did for me.
  • curtmantle
    Junior Member
    • Sep 2013
    • 8

    #2
    Just seen that this has been answered in a thread below. Doh!

    Comment

    Working...
    X