Cheap Silverlight 4 Hosting :: Configure an AuthenticationDomainService using Ria Services Class Library
Using a Ria Services Class library to collect DomainServices and DomainContexts in
a solution is a good practice because everyone know the value of having classes separated in projects instead of having them in the web project.
To workaround to this problem you may simply write by hand this class and put it in the client side part of the Ria Services library project. The code can be copied by an AuthenticationDomainContext generated in the web project but it is very simple and we show you the code here:
public sealed partial class RiaContext : System.Windows.Ria.RiaContextBase
{
#region Extensibility Method Definitions
partial void OnCreated();
#endregion
public RiaContext()
{
this.OnCreated();
}
public new static RiaContext Current
{
get
{
return ((RiaContext)(System.Windows.Ria.RiaContextBase.Current));
}
}
public new User User
{
get
{
return ((User)(base.User));
}
}
}
With this class you can configure the Authentication Domain Context as you did with the generated class. So you have to add it to the App.config, in the ApplicationLifetimeObjects tag and then add a kind of authentication like the WindowsAuthentication and FormsAuthentication.
The second drawback is that if you run the project this way and then you call the Login() method (or any other method) of the RiaContext you will get an error:
The DomainContextType is null or invalid and there are no contexts generated from AuthenticationBase
This probably come from the fact that the RiaContext is not correctly initializated so when the class search for a valid domaincontext to handle the Login call it fails because it does not find it. The tip to correct this behavior is to specify the DomainContext property in the Authentication you have choosed. Here is how to change the App.xaml file:
As you can see you have simply to give an instance of the generated Authentication Domain context class to the FormsAuthentication (or Windows Authentication as well). The RiaContext need to have this instance to make the calls to the BL methods in the Domain Service.
Hope this post can help you. Need Silverlight 4 hosting? You can visit http://www.asphostdirectory.com.
What is so SPECIAL on ASPHostDirectory.com Silverlight 4 Hosting?
We know that finding a cheap, reliable web host is not a simple task so we've put all the information you need in one place to help you make your decision. At
ASPHostDirectory, we pride ourselves in our commitment to our customers and want to make sure they have all the details they need before making that big decision.
We will work tirelessly to provide a refreshing and friendly level of customer service. We believe in creativity, innovation, and a competitive spirit in all that we do. We are sound, honest company who feels that business is more than just the bottom line. We consider every business opportunity a chance to engage and interact with our customers and our community. Neither our clients nor our employees are a commodity. They are part of our family.
The followings are the top 10 reasons you should trust your online business and hosting needs to us:
- FREE domain for Life -ASPHostDirectory gives you your own free domain name for life with our Professional Hosting Plan and 3 free domains with any of Reseller Hosting Plan! There's no need to panic about renewing your domain as ASPHostDirectory will automatically do this for you to ensure you never lose the all important identity of your site
- 99,9% Uptime Guarantee - ASPHostDirectory promises it's customers 99.9% network uptime! We are so concerned about uptime that we set up our own company to monitor people's uptime for them called ASPHostDirectory Uptime
- 24/7-based Support - We never fall asleep and we run a service that is opening 24/7 a year. Even everyone is on holiday during Easter or Christmast/New Year, we are always behind our desk serving our customers
- Customer Tailored Support - if you compare our hosting plans to others you will see that we are offering a much better deal in every aspect; performance, disk quotas, bandwidth allocation, databases, security, control panel features, e-mail services, real-time stats, and service
- Money Back Guarantee - ASPHostDirectory offers a no questions asked' money back guarantee with all our plans for any cancellations made within the first 30 days of ordering. Our cancellation policy is very simple - if you cancel your account within 30 days of first signing up we will provide you with a full refund
- Experts in Silverlight Hosting - Given the scale of our environment, we have recruited and developed some of the best talent in the hosting technology that you are using. Our team is strong because of the experience and talents of the individuals who make up ASPHostDirectory
- Daily Backup Service - We realise that your website is very important to your business and hence, we never ever forget to create a daily backup. Your database and website are backup every night into a permanent remote tape drive to ensure that they are always safe and secure. The backup is always ready and available anytime you need it
- Easy Site Administration - With our powerful control panel, you can always administer most of your site features easily without even needing to contact for our Support Team. Additionally, you can also install more than 100 FREE applications directly via our Control Panel in 1 minute!
Happy Hosting!
Cheap Silverlight 4 Hosting :: Configure an AuthenticationDomainService using Ria Services Class Library
By: dotnetgeek
Vision Benefits From Vision Service Plan Compare loans get the best service The Truth about Debt Consolidation Services Renting A Rolls Royce From A Limo Service? Tips For Sales - To Find Potential Customers Secured loans - Asset at your service Importance Of Remote Backup Services Microtek Ups Chennai Ups Service Chennai Beneficial Aspects Of Directory Submission Services Get A Personal Touch With Customized Web Development Services Budget Hotels in Bangalore comfort and customer pleasure More About Link Building Services Outsource SEO services from a SEO Company
Cheap Silverlight 4 Hosting :: Configure an AuthenticationDomainService using Ria Services Class Library Anaheim