cdanielm58 / 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

Web request to 'https://accounts.google.com/o/oauth2/token' failed using webapplication. #371

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have SERVICE account in GoogleConsoleAPI . My console application is working 
fine and i am getting the data from GoogleAnalytics But when i implement the 
same code into WEB Application and try to access the data then
I am getting the exception 

Message - ProtocolException was caught.
Web request to 'https://accounts.google.com/o/oauth2/token' failed.
StackTrace -    at Google.Apis.Requests.ClientServiceRequest`1.Execute() in 
c:\code.google.com\google-api-dotnet-client\default\Tools\BuildRelease\bin\Relea
se\release140\default\Src\GoogleApis\Apis\Requests\ClientServiceRequest.cs:line 
88
   at GoogleAnalyticsDataAccess.GoogleDataAccess.GetDataFromGoogle(GoogleParameterEntity gparamEntity) in C:\Users\g.shirpurkar\Documents\Visual Studio 2010\Projects\GoogleAnalyticsDataAccess\GoogleAnalyticsDataAccess\GoogleDataAccess.vb:line 94

Someone suggest me ,for webapplication  i am using same service account . is 
this correct ? if not please tell me the steps , What to do to solve this 
problem ?

Thanx in advance 

Original issue reported on code.google.com by viv...@interfaceinfosoft.com on 9 Aug 2013 at 11:22

GoogleCodeExporter commented 9 years ago
Stack Trace for this - 
   at System.Net.Security.SecureChannel.VerifyRemoteCertificate(RemoteCertValidationCallback remoteCertValidationCallback)
   at System.Net.Security.SslState.CompleteHandshake()
   at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Net.TlsStream.CallProcessAuthentication(Object state)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
   at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.ConnectStream.WriteHeaders(Boolean async)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
   at System.Net.HttpWebRequest.GetRequestStream()
   at DotNetOpenAuth.Messaging.StandardWebRequestHandler.GetRequestStreamCore(HttpWebRequest request)

Original comment by viv...@interfaceinfosoft.com on 9 Aug 2013 at 12:21

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Check Kamran comment on this issue - 
http://stackoverflow.com/questions/18060340/asp-net-using-analytics-reporting-ap
i-does-not-work-on-server

It sounds like a SSL error which happens in your network configuration. Let me 
know 

Original comment by pele...@google.com on 12 Aug 2013 at 4:05

GoogleCodeExporter commented 9 years ago
I'I'm closing this issue cause I still didn't get a response from you in the 
last several weeks.
Check the StackOverflow issue I mentioned in my last response.

Feel free to reopen this issue and add additional details.

Original comment by pele...@google.com on 6 Sep 2013 at 7:10