Recommended

  • Silverlight 4 Podcast Pack with Tim Heuer
  • Building Modular Silverlight Applications
  • Prism -  10 Things to Know
  • Securing Silverlight Application and WCF Service using ASP.Net Authentication Techniques
  • Model– View – ViewModel in Silverlight
Skip Navigation LinksHome / Search

Search

 
Results Per Page

Found 2 results for Web Request.
Date between: <not defined> and <not defined>
Search in: News , Articles , Tips , Shows , Showcase , Books

Order by Publish Date   Ascending Title   Rating  

  • 0 comments  /  posted by  Silverlight Show  on  May 21, 2009 (11 months ago)
    Tags: WebRequest , Proxy Service
    Peter Bromberg presents a multipurpose cross-domain server side proxy handler for Silverlight.

    One of the repetitive issues that presents itself to the Silverlight developer is the fact that the majority of web-based resources, content and APIs do not expose a crossdomain.xml or clientaccesspolicy.xml policy file on their domain. When a WebRequest of any type is made from a Silverlight application for such a resource that is not located on the same domain from which the Silverlight app was loaded, Silverlight first attempts to load either of these policy files. If the file is not present, or it is too restrictive, the WebRequest will fail with a security exception.



  • 3 comments  /  posted by  Nikolay Raychev  on  Jun 17, 2008 (more than a year ago)

    Introduction

    When you are making a web request from a Silverlight application the cookies associated with the current browser-server session are automatically sent within each request.

    A common scenario is when you have a web site with some kind of a cookie driven authentication implemented and a Silverlight application within your web site that shows different content depending on whether the user is logged in or not. The Silverlight application may use some resources on the server, which are accessible only to authenticated users. The good thing is that if you are logged in the web site and make requests from the Silverlight application the server “knows” that your requests come from an authenticated user. You do not need to login both on the web site and the Silverlight application.

    Example

    I made a simple example to test if all this stuff really works. I just want to have a simple web site with Form authentication and a Silverlight application which uses a resource from the server. The resource behaves differently when the user is logged in and when not. I won’t describe how I created the web site and the authentication system because you are not limited about the server technology. Currently it is ASP.NET web site with the standard ASP.NET membership. But you can also make it with PHP for example.