【发布时间】:2013-04-26 18:46:03
【问题描述】:
我在打开保管箱文件夹时遇到问题。它是一个生成exe的代码。基本上,当 exe 执行时,它会开始下载存储在 dropbox 文件夹中的包。这是我的代码:
_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); 它说:
![在此处输入图片描述][1]
我检查了“configuration”和“dropBoxCredentials”,它们不是 Null,“_storage”也是如此。
所以我很困惑,这里到底有什么问题?非常感谢。
编辑;这是堆栈跟踪:
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()
【问题讨论】:
-
异常的堆栈跟踪是什么?
-
你的意思是调用栈?它是一个网络更新 exe。基本上,当 exe 执行时,它会开始下载存储在 dropbox 文件夹中的包。你问的是这个吗?
-
不,我的意思是堆栈跟踪。您可以通过显示屏幕截图的异常弹出窗口中的“查看详细信息...”来查看它。或者,您可以单击最后一个链接“将异常详细信息复制到剪贴板”并将其粘贴到此处。
-
我明白了。我把它作为图片发布了。有帮助吗?
-
你展示的是完全的例外。我需要堆栈跟踪。看看图片。从顶部,找到“StackTrace”的第一次出现。那根弦就是我需要的。完整的字符串,而不仅仅是屏幕截图中看到的内容。我正在尝试找出是否在
Open方法中引发了异常。