ajmal744 / google-api-dotnet-client

Automatically exported from code.google.com/p/google-api-dotnet-client
Apache License 2.0
0 stars 0 forks source link

MVC4 error #447

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It looks like we don't check if the response contains the authorization code in 
https://code.google.com/p/google-api-dotnet-client/source/browse/Src/GoogleApis.
Auth.Mvc4/OAuth2/Mvc/Filters/AuthActionFilter.cs#34

[KeyNotFoundException: The given key was not present in the dictionary.]
System.Collections.Generic.Dictionary`2.get_Item(TKey key) +14379623
Google.Apis.Auth.OAuth2.Mvc.Filters.AuthorizationCodeActionFilter.OnActionExecut
ing(ActionExecutingContext actionContext) in 
c:\code\google.com\google-api-dotnet-client\default\Tools\Google.Apis.Release\bi
n\Debug\output\default\Src\GoogleApis.Auth.Mvc4\OAuth2\Mvc\Filters\AuthActionFil
ter.cs:34
System.Web.Mvc.Async.AsyncInvocationWithFilters.InvokeActionMethodFilterAsynchro
nouslyRecursive(Int32 filterIndex) +296
System.Web.Mvc.Async.AsyncInvocationWithFilters.InvokeActionMethodFilterAsynchro
nouslyRecursive(Int32 filterIndex) +1137
System.Web.Mvc.Async.<>c__DisplayClass33.b__31(AsyncCallback asyncCallback, 
Object asyncState) +112
System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, 
Object state, Int32 timeout) +150
System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object 
state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, 
Object tag, Int32 timeout) +132
System.Web.Mvc.Async.<>c__DisplayClass21.b__19(AsyncCallback asyncCallback, 
Object asyncState) +1449
System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, 
Object state, Int32 timeout) +150
System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object 
state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, 
Object tag, Int32 timeout) +96
System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerCo
ntext controllerContext, String actionName, AsyncCallback callback, Object 
state) +487
System.Web.Mvc.Controller.b__1c(AsyncCallback asyncCallback, Object asyncState, 
ExecuteCoreState innerState) +45
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback 
callback, Object callbackState) +111
System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, 
Object state, Int32 timeout) +150
System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object 
callbackState, BeginInvokeDelegate`1 beginDelegate, EndInvokeVoidDelegate`1 
endDelegate, TState invokeState, Object tag, Int32 timeout, 
SynchronizationContext callbackSyncContext) +203
System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object 
state) +879
System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, 
Object state, Int32 timeout) +150
System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object 
callbackState, BeginInvokeDelegate`1 beginDelegate, EndInvokeVoidDelegate`1 
endDelegate, TState invokeState, Object tag, Int32 timeout, 
SynchronizationContext callbackSyncContext) +154
System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, 
AsyncCallback callback, Object state) +527
System.Web.Mvc.MvcHandler.b__4(AsyncCallback asyncCallback, Object asyncState, 
ProcessRequestState innerState) +108
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback 
callback, Object callbackState) +111
System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, 
Object state, Int32 timeout) +150
System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object 
callbackState, BeginInvokeDelegate`1 beginDelegate, EndInvokeVoidDelegate`1 
endDelegate, TState invokeState, Object tag, Int32 timeout, 
SynchronizationContext callbackSyncContext) +203
System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, 
AsyncCallback callback, Object state) +681
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Ex
ecute() +12270483
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& 
completedSynchronously) +288 

Original issue reported on code.google.com by Pele...@gmail.com on 5 Feb 2014 at 3:11

GoogleCodeExporter commented 9 years ago

Original comment by pele...@google.com on 5 Feb 2014 at 9:08

GoogleCodeExporter commented 9 years ago
see 
http://peleyal.blogspot.com/2014/01/aspnet-mvc-with-google-openid-and-oauth.html
#comments

Original comment by Pele...@gmail.com on 6 Feb 2014 at 3:54