首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ICloudStorageAccessToken打开时说引用为空

ICloudStorageAccessToken打开时说引用为空
EN

Stack Overflow用户
提问于 2013-05-02 22:28:18
回答 1查看 289关注 0票数 0

我在打开dropbox文件夹时遇到问题。它是一个生成exe的代码.基本上,当执行exe时,它会开始下载存储在dropbox文件夹中的包。下面是我的代码:

代码语言:javascript
复制
    _storage = new CloudStorage();

    var dropBoxCredentials = new DropBoxCredentials();

    dropBoxCredentials.ConsumerKey = "xxxxxxxxxxxxxxx";
    dropBoxCredentials.ConsumerSecret = "xxxxxxxxxxxxxxx";

    dropBoxCredentials.UserName = "someusername";
    dropBoxCredentials.Password = "somepassword";

    DropBoxConfiguration configuration = DropBoxConfiguration.GetStandardConfiguration();

    //open the dropbox connection
    _storage.Open(configuration, dropBoxCredentials);

很抱歉,我不得不隐藏机密信息,但我认为它们是正确的。所以问题出现在_storage.Open(configuration, dropBoxCredentials);上,它说:

我检查了"configuration“和"dropBoxCredentials",它们不是空的,"_storage”也不是空的。所以我很困惑,到底是什么问题呢?非常感谢。

编辑;下面是堆栈跟踪:

代码语言:javascript
复制
at AppLimit.CloudComputing.SharpBox.StorageProvider.DropBox.DropBoxToken..ctor(OAuthToken token, DropBoxBaseCredentials baseCreds)
at AppLimit.CloudComputing.SharpBox.StorageProvider.DropBox.Logic.DropBoxStorageProviderService.AuthorizeAndGetSession(DropBoxCredentials credentials, DropBoxConfiguration configuration)
at AppLimit.CloudComputing.SharpBox.StorageProvider.DropBox.Logic.DropBoxStorageProviderService.Authorize(DropBoxCredentials credentials, DropBoxConfiguration configuration)
at AppLimit.CloudComputing.SharpBox.StorageProvider.DropBox.Logic.DropBoxStorageProviderService.CreateSession(ICloudStorageCredentials credentials, ICloudStorageConfiguration configuration)
at AppLimit.CloudComputing.SharpBox.StorageProvider.GenericStorageProvider.Open(ICloudStorageConfiguration configuration, ICloudStorageCredentials credentials)
at AppLimit.CloudComputing.SharpBox.CloudStorage.Open(ICloudStorageConfiguration configuration, ICloudStorageCredentials credentials)
at WebUpdater.Program.Main(String[] args) in C:\\TIS\\Tools\\WebUpdater\\WebUpdater\\Program.cs:line 52
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-05-02 22:46:58

堆栈跟踪显示异常源自SharpBox程序集内部。

NullReferenceException总是指示某种错误,因此您应该考虑在SharpBox网站上创建一个问题。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16340697

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档