We're making changes to the Community, so you may have received some notifications - thanks for your patience and welcome back. Learn more here.
Forum Discussion
knightd23
9 years agoExplorer | Level 3
Access Token
Hello, I would like to know if is possible a person who is not developer get your token? I ask this because I'm developing an app that can access to any account, for example, in my computer the app...
- 9 years ago
Also, make sure to update the redirect URI to match the new port.
We've now updated the repo in Github to have the two projects point to different ports now to avoid this in the future. Pulling the latest code should fix everything. If not (maybe due to cached files), Properties -> Web -> Create Virtual Directory should fix it.
Greg-DB
Dropbox Staff
I'm glad to hear that fixed that issue.
Can you share the backend error you're getting for this new problem? Thanks in advance!
Can you share the backend error you're getting for this new problem? Thanks in advance!
Greg-DB
9 years agoDropbox Staff
Also, make sure to update the redirect URI to match the new port.
We've now updated the repo in Github to have the two projects point to different ports now to avoid this in the future. Pulling the latest code should fix everything. If not (maybe due to cached files), Properties -> Web -> Create Virtual Directory should fix it.
- knightd239 years agoExplorer | Level 3
Hello,
Thanks for the answer.
The error gives after I run the program and run the follow steps:
-Appear a web page when I run, that tells to signup now, I press that key
-Next ask to write my email account and password, I wrote;
-In the end has a button which name is "connected", I press this and gives the following error.
Server Error in '/' Application.
The value can't be null.
Parameter name: clientIdDescription: Unhandled exception when running the current Web request. Please review the stack trace for more information about the error and the appropriate originated in the code.
Exception Details: System.ArgumentNullException: Value can not be null.
Parameter name: clientId
Source error:Line 207: if (string.IsNullOrWhiteSpace(clientId)) Line 208: { Line 209: throw new ArgumentNullException("clientId");Line 210: } Linha 211:
Source File: ......\dropbox-sdk-dotnet-master\Dropbox.Api\DropboxOauth2Helper.cs Line: 209
Stack Trace:[ArgumentNullException: O valor não pode ser nulo. Nome do parâmetro: clientId] Dropbox.Api.DropboxOAuth2Helper.GetAuthorizeUri(OAuthResponseType oauthResponseType, String clientId, Uri redirectUri, String state, Boolean forceReapprove, Boolean disableSignup) in C:\Users\tsf\Documents\dropbox-sdk-dotnet-master\Dropbox.Api\DropboxOauth2Helper.cs:209 Dropbox.Api.DropboxOAuth2Helper.GetAuthorizeUri(OAuthResponseType oauthResponseType, String clientId, String redirectUri, String state, Boolean forceReapprove, Boolean disableSignup) in C:\Users\tsf\Documents\dropbox-sdk-dotnet-master\Dropbox.Api\DropboxOauth2Helper.cs:181 SimpleBlogDemo.Controllers.HomeController.Connect() in C:\Users\tsf\Documents\dropbox-sdk-dotnet-master\Examples\SimpleBlogDemo\Controllers\HomeController.cs:176 lambda_method(Closure , ControllerBase , Object[] ) +61 System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14 System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +166 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27 System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +22 System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) +29 System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +32 System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() +50 System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +225 System.Web.Mvc.Async.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32(IAsyncResult asyncResult) +10 System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10 System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34 System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +26 System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +100 System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10 System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27 System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +13 System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29 System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49 System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +36 System.Web.Mvc.Controller.<BeginExecute>b__15(IAsyncResult asyncResult, Controller controller) +12 System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +22 System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49 System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +26 System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10 System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +21 System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29 System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +28 System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9765121 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
- Greg-DB9 years agoDropbox StaffThanks! That error indicates that the app key is missing. Make sure you filled in the DropboxAppKey and DropboxAppSecret values in Web.config for that sample app.
- knightd239 years agoExplorer | Level 3
Hello,
Thanks for the anser.
I really forget to add the APPkey and Secret, that's because I download the last version and not added these values.
I having test the example now and it works good, however after I add files to my blog and if I delete these files in my dropbox, when i'm going to disconnect in the app gives the following error. I'm saying this because can be a problem to someone that need to do this, for me this isn't a problem.
Server Error in '/' Application.
The collection was modified; Enumeration operation may not be performed.
Description: Eception unhandled when running the current Web request. Please review the stack trace for more information about the error and the appropriate source in the code.
Exception Details: System.InvalidOperationException: The collection was modified; enumeration operation may not be performed.
Source error:Line 82: select k; Line 83: Line 84: foreach (var key in keys)Line 85: { Line 86: ArticleCache.Remove(key);
Source File: .....\dropbox-sdk-dotnet-master\Examples\SimpleBlogDemo\Helpers\BlogHelpers.cs Line: 84
Stack Trace:[InvalidOperationException: The collection was modified; The enumeration operation may be not performed.] System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) +52 System.Collections.Generic.Enumerator.MoveNext() +12384225 System.Linq.WhereEnumerableIterator`1.MoveNext() +32 SimpleBlogDemo.Helpers.BlogHelpers.FlushCache(ControllerBase controller, String blogName) in ....\dropbox-sdk-dotnet-master\Examples\SimpleBlogDemo\Helpers\BlogHelpers.cs:84 SimpleBlogDemo.Controllers.<DisconnectAsync>d__10.MoveNext() in C:\Users\tsf\Documents\dropbox-sdk-dotnet-master\Examples\SimpleBlogDemo\Controllers\HomeController.cs:154 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58 System.Web.Mvc.Async.TaskAsyncActionDescriptor.EndExecute(IAsyncResult asyncResult) +97 System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeAsynchronousActionMethod>b__36(IAsyncResult asyncResult) +17 System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10 System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +48 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +32 System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() +50 System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +225 System.Web.Mvc.Async.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32(IAsyncResult asyncResult) +10 System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10 System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +48 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34 System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +26 System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +100 System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10 System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +48 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27 System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +13 System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29 System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +48 System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +36 System.Web.Mvc.Controller.<BeginExecute>b__15(IAsyncResult asyncResult, Controller controller) +12 System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +22 System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +48 System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +26 System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10 System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +21 System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29 System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +48 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +28 System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9765121 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
- knightd239 years agoExplorer | Level 3
Hello,
You are right, I forgot to add the APPKEY and Secret in the xml file, because I think I was working with a old folder, however I was working with the new folder that you upload.
Other question, when I run the SimpleTest application gives the following error after ask to reset the settings. How can I solve? I already have looking for the URL configuration and I not found.
Best Regards
Dropbox - 400
Error (400)It seems the app you were using submitted a bad request. If you would like to report this error to the app's developer, include the information below.More details for developersInvalid redirect_uri: "https://localhost/authorize": It must exactly match one of the redirect URIs you've pre-configured for your app (including the path).
- Greg-DB9 years agoDropbox StaffFor that sample, you should add "https://localhost/authorize" as a redirect URI for your app on the App Console:
https://www.dropbox.com/developers/apps - knightd239 years agoExplorer | Level 3
Hello,
Thanks for the help and sorry for the basics questions. It's all works.
Best Regards
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,875 PostsLatest Activity: 4 hours agoIf you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!