Click here to Skip to main content
12,623,027 members (30,076 online)
   

ASP.NET

 
AnswerRe: Sign in with ASP.NET Pin
jain jinesh26-Feb-13 20:12
memberjain jinesh26-Feb-13 20:12 
GeneralRe: Sign in with ASP.NET Pin
omarbench26-Feb-13 21:47
memberomarbench26-Feb-13 21:47 
Questionunable to change Web.SiteMap Pin
jojoba201126-Feb-13 0:58
memberjojoba201126-Feb-13 0:58 
AnswerRe: unable to change Web.SiteMap Pin
Sandeep Mewara26-Feb-13 3:24
mvpSandeep Mewara26-Feb-13 3:24 
GeneralRe: unable to change Web.SiteMap Pin
jojoba201126-Feb-13 5:12
memberjojoba201126-Feb-13 5:12 
QuestionBinding gridview from two tables Pin
demoninside925-Feb-13 23:45
memberdemoninside925-Feb-13 23:45 
AnswerRe: Binding gridview from two tables Pin
David Mujica26-Feb-13 6:09
memberDavid Mujica26-Feb-13 6:09 
Questioncustom MVC authorization and Authorize Pin
Super Lloyd25-Feb-13 21:07
memberSuper Lloyd25-Feb-13 21:07 
1st I'm a beginner MVC developer!

At any rate I wanted to add Facebook login to my (personal) website and didn't want to use the build in authentication (why bother the user with one more very forgettable useless password?)

So I deleted all authorization code and I have an account controller which take the facebook id and check it against Facebook server and set up a Session property with relevant Facebook data

now when I add an [Auhorize] attribute on my method it doesn't work (normal)
I wonder how I could setup the user!
I have code which create an IPrincipal (from facebook info) and set it to the HttpContext.User but it's lost on next query.

I tried override myControl.Initialize(RequestConterxt) and setup the current user (as in request.HttpContext.User = ...)

But I got a stranger error when I do that (which involve none of my code!!!!!):
[NullReferenceException: Object reference not set to an instance of an object.]
   System.Web.Mvc.Controller.PossiblyLoadTempData() +52
   System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state) +92
   System.Web.Mvc.Async.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +161
   System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout) +92
   System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate endDelegate, Object tag, Int32 timeout) +97
   System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate endDelegate, Object tag) +53
   System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +417
   System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +49
   System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__2(AsyncCallback asyncCallback, Object asyncState) +127
   System.Web.Mvc.Async.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +161
   System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout) +92
   System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate endDelegate, Object tag, Int32 timeout) +97
   System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate endDelegate, Object tag) +53
   System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +373
   System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +88
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +50
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +301
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

To summarize how could I use the [Authorize] attribute with my facebook user info?
My programming get away... The Blog...
DirectX for WinRT/C# since 2013!
Taking over the world since 1371!

QuestionMVC Model + Entity Design Guidance Needed. Pin
nlarson1125-Feb-13 12:51
membernlarson1125-Feb-13 12:51 
QuestionDevelop a Custom Login page Pin
Meherab Bhamgara25-Feb-13 4:24
memberMeherab Bhamgara25-Feb-13 4:24 
AnswerRe: Develop a Custom Login page Pin
Sandeep Mewara25-Feb-13 19:13
mvpSandeep Mewara25-Feb-13 19:13 
AnswerRe: Develop a Custom Login page Pin
Rahul Rajat Singh25-Feb-13 21:04
mvpRahul Rajat Singh25-Feb-13 21:04 
Questionproblem with intelligencia.urlrewriter Pin
C#Programmer201224-Feb-13 23:32
memberC#Programmer201224-Feb-13 23:32 
AnswerRe: problem with intelligencia.urlrewriter Pin
C#Programmer201225-Feb-13 18:57
memberC#Programmer201225-Feb-13 18:57 
QuestionRe: problem with intelligencia.urlrewriter Pin
ryanb3126-Feb-13 11:35
memberryanb3126-Feb-13 11:35 
AnswerRe: problem with intelligencia.urlrewriter Pin
C#Programmer201226-Feb-13 18:48
memberC#Programmer201226-Feb-13 18:48 
QuestionMaintaining Array Data in an SQL Database. Pin
Bram van Kampen24-Feb-13 16:23
memberBram van Kampen24-Feb-13 16:23 
AnswerRe: Maintaining Array Data in an SQL Database. Pin
David Mujica25-Feb-13 4:02
memberDavid Mujica25-Feb-13 4:02 
Questionsaving and retrieving recent activities Pin
Jassim Rahma24-Feb-13 5:40
memberJassim Rahma24-Feb-13 5:40 
AnswerRe: saving and retrieving recent activities Pin
jkirkerx26-Feb-13 12:04
memberjkirkerx26-Feb-13 12:04 
Generalasp.net export to excel Pin
pppppsssss24-Feb-13 1:50
memberpppppsssss24-Feb-13 1:50 
GeneralRe: asp.net export to excel Pin
Sandeep Mewara24-Feb-13 2:18
mvpSandeep Mewara24-Feb-13 2:18 
AnswerRe: asp.net export to excel Pin
ryanb3126-Feb-13 11:37
memberryanb3126-Feb-13 11:37 
Questionhow to linbutton's text on another page button click event Pin
Member 870181323-Feb-13 3:56
memberMember 870181323-Feb-13 3:56 
AnswerRe: how to linbutton's text on another page button click event Pin
Sandeep Mewara23-Feb-13 4:28
mvpSandeep Mewara23-Feb-13 4:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.161128.1 | Last Updated 3 Dec 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid