Friday, November 19, 2010

Using ASP.NET authentication in Silverlight with RIA Services

The first step is to set up the database you wish to authenticate against (ignore this if you are using Windows authentication, which wouldn't apply for most websites).

If you are not using the default DB, add this to the configuration section in your web.config:

    <add name="LocalSqlServer" connectionString="data source=(local); Integrated Security=SSPI;Initial Catalog=ASPNET;" providerName="System.Data.SqlClient" />

(Thanks to for the html encoding utility.)

To add the default ASP.NET authentication tables to the database, use aspnet_regsql. has a good introduction to setting up ASP.NET authentication.

This blog entry shows how to modify the silverlight business templates to use ASP.NET forms authentication with "stay logged in" feature.


Post a Comment