By Mark Evans


2018-02-13 13:58:23 8 Comments

Is there a way to access silverlight resource from silverlight request headers? the html string returns unusual encrypted characters, which I'm assuming means that silver light is not supported? is there some kind of object that understands the silverlight? the xap document is interpreted by the web browser but is there some way to intercept the HTML before its intercepted?

string newURL="http://Someurl/ClientBin/silverlight.xap?v=150317104642";
                    System.Net.WebRequest request = System.Net.WebRequest.Create(newURL);
                    request.UseDefaultCredentials = true;
                    request.PreAuthenticate = true;
                    request.Credentials = System.Net.CredentialCache.DefaultCredentials;
                    System.Net.WebResponse response = request.GetResponse();
                    System.IO.Stream data = response.GetResponseStream();
                    string html = String.Empty;

                    using (System.IO.StreamReader sr = new System.IO.StreamReader(data))
                    {
                        html = sr.ReadToEnd();
                    }

0 comments

Related Questions

Sponsored Content

7 Answered Questions

[SOLVED] How to make HTTP POST web request

7 Answered Questions

[SOLVED] How do you set the Content-Type header for an HttpClient request?

  • 2012-05-21 03:29:17
  • mynameiscoffey
  • 396357 View
  • 408 Score
  • 7 Answer
  • Tags:   c# asp.net api http rest

4 Answered Questions

[SOLVED] Get code from Silverlight publish?

  • 2009-10-03 18:55:17
  • Jordy
  • 2225 View
  • 3 Score
  • 4 Answer
  • Tags:   silverlight xap

24 Answered Questions

[SOLVED] Get int value from enum in C#

  • 2009-06-03 06:46:39
  • jim
  • 1008539 View
  • 1267 Score
  • 24 Answer
  • Tags:   c# enums casting int

12 Answered Questions

[SOLVED] Get a new object instance from a Type

17 Answered Questions

[SOLVED] Get property value from string using reflection in C#

  • 2009-07-28 21:58:51
  • pedrofernandes
  • 480640 View
  • 621 Score
  • 17 Answer
  • Tags:   c# reflection

7 Answered Questions

[SOLVED] maximum length of HTTP GET request?

  • 2010-04-17 20:32:25
  • Mark Harrison
  • 378702 View
  • 379 Score
  • 7 Answer
  • Tags:   web-services http

1 Answered Questions

Silverlight projects on one IIS web site

  • 2012-09-05 13:53:35
  • Stecenko Ruslan
  • 68 View
  • 0 Score
  • 1 Answer
  • Tags:   silverlight xap

1 Answered Questions

[SOLVED] Load Testing in VS 2010

1 Answered Questions

making web requests in silverlight?

  • 2010-08-23 23:10:45
  • locoboy
  • 43 View
  • 0 Score
  • 1 Answer
  • Tags:   c# silverlight

Sponsored Content