No time has been spent studying silverlighit Ria services. I always think this seriesArticleThere is no value yet. Cool has always been a perfect place for Ria services. That is, its login function, which has been written before, can also run normally. But .. Many database management systems have developed essential user group permissions, so today we provide a complete Silverlight Ria services login example. We hope that our friends who use Ria services can better use it.
In this example,CodeIs quite simple. I mainly mention two points:
1. Define the following configuration information in the web. config file of the web project:
<System. Web>
<Rolemanager enabled = "true" defaultprovider = "myroleprovider">
<Providers>
<Add name = "myroleprovider" type = "slriaservicerose. Web. myroleprovider"/>
</Providers>
</Rolemanager>
</System. Web>
2. In the app. XAML. CS file of Silverlight. Instantiate webcontent into the app
Public app ()
{
Initializecomponent ();
Webcontext = new webcontext ();
Webcontext. Authentication = new formsauthentication ();
This. applicationlifetimeobjects. Add (webcontext );
}
The Code of other parts is relatively easy to understand.
PS: After logging in, you can download the source project file from the attachment in this article.