In Asp.net MVC you can do:
[Authorize]
public class someController{}
Is there a way you can do this in silverlight pages? I saw a guy do this with his own code here. Is there anything built in silverlight like this?
Here is an article that give a decent overview of using ASP.NET Membership from within Silverlight:
http://www.silverlightshow.net/items/Leveraging-the-ASP.NET-Membership-in-Silverlight.aspx
Related
I am trying to create an application following, modular architecture, using Prism 4 & UnityContainer for DI. I am wondering how you would pass the currently logged in user around the system?
I thought nice and dirty would be to validate my user login credetials with a simple login form, hit my dataContext(EntityFramework 4) on application startup and store in applications' App.Xaml.cs using:
App.Current.Properties["CurrentUser"] = user;
But obviously my loaded modules do not have any knowledge of the application. Stuck...
Thanks if you can offer any help.
Got what appears to be a "proper" solution from the chaps over at CodePlex Prism discussions here http://compositewpf.codeplex.com/discussions/429579
Have someone a idea how to implement the 'share button of Twitter' with Silverlight: i'm using the framework 4 of c#.
Basically, you'll have to use the Twitter API. My idea would be to use one of the twitter libraries for .NET found here.
Can you use multiple app domains in silverlight? If so, are there any special restrictions?
Depends on what you mean. By default, each Silverlight application runs in what is, effectively, a separate App Domain. But you can't programmatically control application domains like you do in the full .NET runtime. The System.AppDomain namespace is there, but all the "CreateXXXX" methods are missing. Compare the .NET 4.0 docs with the Silverlight docs to see what I mean.
We are starting a new SilverLight 4 Business Application project and are looking for theme. All we can find on the web are Navigation Application themes, which when applied to business application project, don't work. Most even have compilation errors.
Is there a place on the web to get theme specifically for that project or is there a way to translate navigation application theme into business application theme?
Thank you
Finally got around finding some.
Here goes :
http://gallery.expression.microsoft.com/en-us/site/search?f[0].Type=RootCategory&f[0].Value=themes&f[0].Text=Themes&f[1].Type=Tag&f[1].Value=RIAServices
Repair RIA Service using below link that issue/error will be solved.
http://download.microsoft.com/download/2/4/1/241B26FF-EC1E-41FE-A782-E669C28A0A00/RiaServices.msi
There are application themes for Silverlight 4 templates at Microsoft Download Center.
I have a list of object that is created in my asp.net website project, I need to send it to my silverlight application which is a part of the same solution. How can I do this?
This tutorial should answer your question:
http://www.dotnetfunda.com/articles/article218.aspx