Silverlight - Using HttpWebRequest

Download this episode

Description

If you are looking to do an HTTP request at a lower level then HttpWebRequest is the class that you're looking for. Here, we take a look at doing an HTTP POST from a Silverlight application using this class.

Embed

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • User profile image
      CKurt
      Could I post something to a PHP page and get the response from there ?

      I wont to run silverlight without having to run a ASP.NET server somewhere...
    • User profile image
      aL_
      that should work. íts just a regular webrequest, nothing .net specific Smiley you'd get the html from the php page in your response strem and just read that and xml and do whatever to it. the same would be true for posting Smiley
      you can host silverlight on any backend (including lamp) you only have to add the mime types
    • User profile image
      mtaulty
      Hi,

      Yes, agree!

      Silverlight makes very little requirement as to what kind of web server it's served off ( you probably need to add the MIME type for the XAP extension ) so it can be IIS or A.N.Other web server.

      Equally, it makes very little requirement about what kind of web servers you talk to whether that's via web services, WebClient, HttpWebRequest or whatever.

      Generally, it "Plays Well With Others" Smiley

      Mike.

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.