Terenced
Terenced

Reputation: 675

Silverlight: Access REST service behind forms authentication site

I am new to Silverlight, and I building a simple app which provides an interface for an expense report portal. The portal has a REST API which I can access; I know I can do it using WebClient or WebHttpRequest. However, to be able to access the API, I need to login first. The login is simple forms authentication on login.aspx of the site. How do I login (post to the login page) from Silverlight?

NOTE: The site has the clientaccesspolicy.xml setup, and I am able to access the REST URL that do not require you to be logged on.

Upvotes: 0

Views: 753

Answers (1)

Geoff Appleford
Geoff Appleford

Reputation: 18832

Have you looked at the Silverlight Business Application project template and WCF Ria Services. The template has built in functionality to login to a forms authenticated website.

You can use this as a starting point for your silverlight application or simply use it to see how to perform authentication from silverlight.

Upvotes: 1

Related Questions