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

9 Answered Questions

[SOLVED] How to make HTTP POST web request

21 Answered Questions

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

  • 2009-07-28 21:58:51
  • pedrofernandes
  • 552691 View
  • 707 Score
  • 21 Answer
  • Tags:   c# reflection

25 Answered Questions

[SOLVED] Get int value from enum in C#

  • 2009-06-03 06:46:39
  • jim
  • 1156300 View
  • 1424 Score
  • 25 Answer
  • Tags:   c# enums casting int

9 Answered Questions

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

  • 2012-05-21 03:29:17
  • mynameiscoffey
  • 501629 View
  • 501 Score
  • 9 Answer
  • Tags:   c# asp.net api http rest

7 Answered Questions

[SOLVED] maximum length of HTTP GET request?

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

4 Answered Questions

[SOLVED] Get code from Silverlight publish?

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

16 Answered Questions

[SOLVED] How to get the type of T from a member of a generic class or method?

  • 2009-02-17 15:24:36
  • Patrick Desjardins
  • 513672 View
  • 562 Score
  • 16 Answer
  • Tags:   c# .net generics

12 Answered Questions

[SOLVED] Get a new object instance from a Type

1 Answered Questions

Silverlight projects on one IIS web site

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

1 Answered Questions

making web requests in silverlight?

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

Sponsored Content