Click here to Skip to main content
15,889,116 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Sign in with ASP.NET Pin
jain jinesh26-Feb-13 19:12
jain jinesh26-Feb-13 19:12 
GeneralRe: Sign in with ASP.NET Pin
User 871522226-Feb-13 20:47
professionalUser 871522226-Feb-13 20:47 
Questionunable to change Web.SiteMap Pin
jojoba201125-Feb-13 23:58
jojoba201125-Feb-13 23:58 
AnswerRe: unable to change Web.SiteMap Pin
Sandeep Mewara26-Feb-13 2:24
mveSandeep Mewara26-Feb-13 2:24 
GeneralRe: unable to change Web.SiteMap Pin
jojoba201126-Feb-13 4:12
jojoba201126-Feb-13 4:12 
QuestionBinding gridview from two tables Pin
demoninside925-Feb-13 22:45
demoninside925-Feb-13 22:45 
AnswerRe: Binding gridview from two tables Pin
David Mujica26-Feb-13 5:09
David Mujica26-Feb-13 5:09 
Questioncustom MVC authorization and Authorize Pin
Super Lloyd25-Feb-13 20:07
Super 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
nlarson1125-Feb-13 11:51 
QuestionDevelop a Custom Login page Pin
Meherab Bhamgara25-Feb-13 3:24
Meherab Bhamgara25-Feb-13 3:24 
AnswerRe: Develop a Custom Login page Pin
Sandeep Mewara25-Feb-13 18:13
mveSandeep Mewara25-Feb-13 18:13 
AnswerRe: Develop a Custom Login page Pin
Rahul Rajat Singh25-Feb-13 20:04
professionalRahul Rajat Singh25-Feb-13 20:04 
Questionproblem with intelligencia.urlrewriter Pin
C#Programmer201224-Feb-13 22:32
C#Programmer201224-Feb-13 22:32 
AnswerRe: problem with intelligencia.urlrewriter Pin
C#Programmer201225-Feb-13 17:57
C#Programmer201225-Feb-13 17:57 
QuestionRe: problem with intelligencia.urlrewriter Pin
ZurdoDev26-Feb-13 10:35
professionalZurdoDev26-Feb-13 10:35 
AnswerRe: problem with intelligencia.urlrewriter Pin
C#Programmer201226-Feb-13 17:48
C#Programmer201226-Feb-13 17:48 
QuestionMaintaining Array Data in an SQL Database. Pin
Bram van Kampen24-Feb-13 15:23
Bram van Kampen24-Feb-13 15:23 
AnswerRe: Maintaining Array Data in an SQL Database. Pin
David Mujica25-Feb-13 3:02
David Mujica25-Feb-13 3:02 
Questionsaving and retrieving recent activities Pin
Jassim Rahma24-Feb-13 4:40
Jassim Rahma24-Feb-13 4:40 
AnswerRe: saving and retrieving recent activities Pin
jkirkerx26-Feb-13 11:04
professionaljkirkerx26-Feb-13 11:04 
Generalasp.net export to excel Pin
pppppsssss24-Feb-13 0:50
pppppsssss24-Feb-13 0:50 
GeneralRe: asp.net export to excel Pin
Sandeep Mewara24-Feb-13 1:18
mveSandeep Mewara24-Feb-13 1:18 
AnswerRe: asp.net export to excel Pin
ZurdoDev26-Feb-13 10:37
professionalZurdoDev26-Feb-13 10:37 
Questionhow to linbutton's text on another page button click event Pin
Member 870181323-Feb-13 2:56
Member 870181323-Feb-13 2:56 
AnswerRe: how to linbutton's text on another page button click event Pin
Sandeep Mewara23-Feb-13 3:28
mveSandeep Mewara23-Feb-13 3: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.