.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month

Home >> Articles >> Silverlight >> Post New Resource Bookmark and Share   

 Subscribe to Articles

RiaContext.Current.Authentication.User is NULL.

Posted By:Sunil Yadav       Posted Date: May 21, 2010    Points: 25    Category: Silverlight    URL: http://www.dotnetspark.com  

In this article i am going to explaing to to get rid of RiaContext.Current.Authentication.User is NULL on deployment server.

From last two days i was looking for the issue "RiaContext.Current.Authentication.User is null" while authenticating user.

The simple code is shown below which works fine on local development server.
    private AuthenticationService _userService = RiaContext.Current.Authentication;

          always returns False.

After debugging the above on the production server "RiaContext.Current.Authentication.User" returns Null.

Then i use fiddler which gave me following error:

    The resource cannot be found.


    HTTP 404 : The resource cannot be found.

There are many reasons for the above error:

    1.Your application should run in Full Trust Mode.




    2.Make sure that your web.config contains the following entries:



    3.Above can also happen due to missing assembly reference so make sure that you have all the assemblies installed.

 Subscribe to Articles


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend