本文介绍了谷歌驱动例如:oauth2callback未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要与谷歌驱动器...

I need a little help with the C# example program of Google-Drive...

我用这个的所谓教程/榜样:

I used this so-called "tutorial"/"example":
https://developers.google.com/drive/examples/dotnet

而code从这里:

我在这里上传了我的(仅略作修改)来源$ C ​​$ C的情况下,任何人没有水银(我没有水银,没有管理权限要么安装它,Mercurial是获得的唯一途径来源$ C ​​$ C ...):

I uploaded my (only slightly modified) sourcecode here in case anybody doesn't have Mercurial (I didn't have Mercurial and no admin rights to install it either, and Mercurial is the only way to get the sourcecode...):
http://verzend.be/elt0k13enraw/DrEdit.rar.html

我总是

的ressource无法找到

请求的URL:/ oauth2callback

Requested URL: /oauth2callback

我不觉得这是惊人的,因为没有oauth2callback控制器或处理器实现...

I don't find this astonishing, as no oauth2callback controller or handler is implemented...

我尝试添加了一个名为oauth2callbackController控制器,并重定向到另一个oauth2callbackController.Index行动,做

I tried adding a Controller called oauth2callbackController and redirecting to another action in oauth2callbackController.Index, doing

return new RedirectResult("/about/about");

但是,只有创建一个NULL参考异常。

But that only creates a NULL-reference exception.

所以我想,也许是错误的控制器和重定向到

So i figured, maybe the wrong controller and redirected to

return new RedirectResult("/drive/Index");

但是,只有创建重定向无限循环 - >允许 - >重定向 - 让 - >等

But that only creates an infinite loop of redirect -> allow -> redirect - allow -> etc.

顺便说一句,在配置更改API密钥+ REDIRECT_URI是

BTW, the config to change the API key + REDIRECT_URI is in

Models\ClientCredentials.cs

注意:

这个问题是不是我的修改。

样品还没有工作未修改的,具有完全相同的错误。

我所做的只是去掉EntityFramwork参考,并抛出未实现的例外在使用实体的方法被调用。

Note:
The problem aren't my modifications.
The sample also didn't work unmodified, with the exact same error.
All I did was removing EntityFramwork references, and throwing "Not implemented exception" when a method using entity was called.

编辑:

其他信息:

我真的很想在第一时间要做的就是写一个出口我的数据库控制台服务,LZMA-COM presses导出的内容,加密与OpenPGP的,并上传我的服务器,以谷歌的数据库每天开车24:00时许,无需任何用户输入。


Additional information:
What I really wanted to do in the first place is to write a console service that exports my database, LZMA-compresses the exported content, encrypts that with OpenPGP, and uploads the database of my server to Google drive every day at 24:00 o'clock, without any user input.

我出口没有问题的工作,我得到了LZMA COM pression没有问题的工作,我得到PGP工作没有问题加密。
一天的工作结束后(grrrr),当我在家里​​,我甚至可以下载示例 - code安装在家里我的Linux机器上的善变,用把它在Windows机器上SMB ...

I got export working without a problem, i got the LZMA compression working without a problem, I got the encryption with PGP working without a problem.After the end of the working day (grrrr), when I was at home, I was even able to download the example-code with the mercurial installed on my Linux-machine at home, and bring it on the windows machine using SMB...

但现在我不能为谷歌驱动SDK工作样本...

而且,我真正需要的是一个控制台服务/守护进程,而不是一个web应用的例子。
当我创建API密钥,我看见一个人可以创造一个服务的关键,但对如何写一个谷歌驱动器服务(控制台应用程序),并没有有用文档以及没有例如(是啊,有一个参考,但它只是一个参考,智能感知提供大约相同的)...

But now I can't get the sample for the Google-drive SDK working...
And moreover, what I really need is an example for a console service/daemon, not a web-application. When I created the API key, I saw one could create a key for a service, but there is no example on how to write a Google-Drive service (console application), and no useful documentation as well (yea there is a reference, but it's only a reference, IntelliSense provides about the same)...

推荐答案

在配置API控制台中的API访问选项卡您的应用程序,你必须为重定向的URI来设置你的web服务器的根目录(/),而不是/ oauth2callback。

When configuring your app in the API Access tab of the APIs Console, you had to set the root (/) of your web server as the redirect URI and not /oauth2callback.

假设你的应用程序是在www.example.com公布,只是回到API控制台并将其设置为www.example.com,而不是www.example.com/oauth2callback

Assuming that your app is published at www.example.com, just go back to the APIs Console and set it to www.example.com instead of www.example.com/oauth2callback

这篇关于谷歌驱动例如:oauth2callback未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 19:48