Click here to Skip to main content
11,638,173 members (76,099 online)
   

ASP.NET

 
Questionwhy team is not replyin gmy question Pin
prince_rumeel26-Feb-13 23:13
memberprince_rumeel26-Feb-13 23:13 
AnswerRe: why team is not replyin gmy question Pin
Richard MacCutchan27-Feb-13 1:09
mvpRichard MacCutchan27-Feb-13 1:09 
GeneralRe: why team is not replyin gmy question Pin
prince_rumeel27-Feb-13 20:07
memberprince_rumeel27-Feb-13 20:07 
QuestionSign in with ASP.NET Pin
omarbench26-Feb-13 0:45
memberomarbench26-Feb-13 0:45 
AnswerRe: Sign in with ASP.NET Pin
Sandeep Mewara26-Feb-13 2:16
mvpSandeep Mewara26-Feb-13 2:16 
AnswerRe: Sign in with ASP.NET Pin
ryanb3126-Feb-13 10:34
memberryanb3126-Feb-13 10:34 
AnswerRe: Sign in with ASP.NET Pin
jain jinesh26-Feb-13 19:12
memberjain jinesh26-Feb-13 19:12 
GeneralRe: Sign in with ASP.NET Pin
omarbench26-Feb-13 20:47
memberomarbench26-Feb-13 20:47 
Questionunable to change Web.SiteMap Pin
jojoba201125-Feb-13 23:58
memberjojoba201125-Feb-13 23:58 
AnswerRe: unable to change Web.SiteMap Pin
Sandeep Mewara26-Feb-13 2:24
mvpSandeep Mewara26-Feb-13 2:24 
GeneralRe: unable to change Web.SiteMap Pin
jojoba201126-Feb-13 4:12
memberjojoba201126-Feb-13 4:12 
QuestionBinding gridview from two tables Pin
demoninside925-Feb-13 22:45
memberdemoninside925-Feb-13 22:45 
AnswerRe: Binding gridview from two tables Pin
David Mujica26-Feb-13 5:09
memberDavid Mujica26-Feb-13 5:09 
Questioncustom MVC authorization and Authorize Pin
Super Lloyd25-Feb-13 20:07
memberSuper Lloyd25-Feb-13 20: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 11:51
membernlarson1125-Feb-13 11:51 
QuestionDevelop a Custom Login page Pin
Meherab Bhamgara25-Feb-13 3:24
memberMeherab Bhamgara25-Feb-13 3:24 
AnswerRe: Develop a Custom Login page Pin
Sandeep Mewara25-Feb-13 18:13
mvpSandeep Mewara25-Feb-13 18:13 
AnswerRe: Develop a Custom Login page Pin
Rahul Rajat Singh25-Feb-13 20:04
mvpRahul Rajat Singh25-Feb-13 20:04 
Questionproblem with intelligencia.urlrewriter Pin
C#Programmer201224-Feb-13 22:32
memberC#Programmer201224-Feb-13 22:32 
AnswerRe: problem with intelligencia.urlrewriter Pin
C#Programmer201225-Feb-13 17:57
memberC#Programmer201225-Feb-13 17:57 
QuestionRe: problem with intelligencia.urlrewriter Pin
ryanb3126-Feb-13 10:35
memberryanb3126-Feb-13 10:35 
AnswerRe: problem with intelligencia.urlrewriter Pin
C#Programmer201226-Feb-13 17:48
memberC#Programmer201226-Feb-13 17:48 
QuestionMaintaining Array Data in an SQL Database. Pin
Bram van Kampen24-Feb-13 15:23
memberBram van Kampen24-Feb-13 15:23 
AnswerRe: Maintaining Array Data in an SQL Database. Pin
David Mujica25-Feb-13 3:02
memberDavid Mujica25-Feb-13 3:02 
Questionsaving and retrieving recent activities Pin
Jassim Rahma24-Feb-13 4:40
memberJassim Rahma24-Feb-13 4:40 
AnswerRe: saving and retrieving recent activities Pin
jkirkerx26-Feb-13 11:04
memberjkirkerx26-Feb-13 11:04 
Generalasp.net export to excel Pin
pppppsssss24-Feb-13 0:50
memberpppppsssss24-Feb-13 0:50 
GeneralRe: asp.net export to excel Pin
Sandeep Mewara24-Feb-13 1:18
mvpSandeep Mewara24-Feb-13 1:18 
AnswerRe: asp.net export to excel Pin
ryanb3126-Feb-13 10:37
memberryanb3126-Feb-13 10:37 
Questionhow to linbutton's text on another page button click event Pin
Member 870181323-Feb-13 2:56
memberMember 870181323-Feb-13 2:56 
AnswerRe: how to linbutton's text on another page button click event Pin
Sandeep Mewara23-Feb-13 3:28
mvpSandeep Mewara23-Feb-13 3:28 
GeneralRe: how to linbutton's text on another page button click event Pin
Member 870181323-Feb-13 6:55
memberMember 870181323-Feb-13 6:55 
GeneralRe: how to linbutton's text on another page button click event Pin
Member 870181323-Feb-13 22:40
memberMember 870181323-Feb-13 22:40 
GeneralRe: how to linbutton's text on another page button click event Pin
Sandeep Mewara23-Feb-13 22:46
mvpSandeep Mewara23-Feb-13 22:46 
Questionhtml5 with vs2010 Pin
manoranjan gupta23-Feb-13 2:07
membermanoranjan gupta23-Feb-13 2:07 
AnswerRe: html5 with vs2010 Pin
Sandeep Mewara23-Feb-13 3:10
mvpSandeep Mewara23-Feb-13 3:10 
Question70-480 Course Book Pin
silentspeaker23-Feb-13 0:35
membersilentspeaker23-Feb-13 0:35 
AnswerRe: 70-480 Course Book Pin
Richard MacCutchan23-Feb-13 1:07
mvpRichard MacCutchan23-Feb-13 1:07 
Questionvisul studio installing Pin
agrigold22-Feb-13 22:48
memberagrigold22-Feb-13 22:48 
AnswerRe: visul studio installing Pin
Marco Bertschi23-Feb-13 1:42
memberMarco Bertschi23-Feb-13 1:42 
AnswerRe: visul studio installing Pin
Sandeep Mewara23-Feb-13 3:13
mvpSandeep Mewara23-Feb-13 3:13 
Questionhow to increment column value by 1 Pin
Member 870181322-Feb-13 21:39
memberMember 870181322-Feb-13 21:39 
AnswerRe: how to increment column value by 1 Pin
Member 870181322-Feb-13 22:33
memberMember 870181322-Feb-13 22:33 
QuestionWeb Task Scheduler Pin
Mohamad Hoosein Fakhravary22-Feb-13 11:17
memberMohamad Hoosein Fakhravary22-Feb-13 11:17 
AnswerRe: Web Task Scheduler Pin
Richard MacCutchan22-Feb-13 23:23
mvpRichard MacCutchan22-Feb-13 23:23 
GeneralRe: Web Task Scheduler Pin
Mohamad Hoosein Fakhravary23-Feb-13 0:21
memberMohamad Hoosein Fakhravary23-Feb-13 0:21 
GeneralRe: Web Task Scheduler Pin
Richard MacCutchan23-Feb-13 0:35
mvpRichard MacCutchan23-Feb-13 0:35 
GeneralRe: Web Task Scheduler Pin
Mohamad Hoosein Fakhravary24-Feb-13 1:01
memberMohamad Hoosein Fakhravary24-Feb-13 1:01 
GeneralRe: Web Task Scheduler Pin
Richard MacCutchan24-Feb-13 1:10
mvpRichard MacCutchan24-Feb-13 1:10 
GeneralRe: Web Task Scheduler Pin
Mohamad Hoosein Fakhravary24-Feb-13 20:17
memberMohamad Hoosein Fakhravary24-Feb-13 20:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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
Web04 | 2.8.150728.1 | Last Updated 30 Jul 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid