Your workflow is unique 👨💻 - tell us how you use Dropbox 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 Community Moderator
9 years agoYes, that's the official .NET SDK.
What's the actual error you're getting on the backend of the sample app?
What's the actual error you're getting on the backend of the sample app?
knightd23
9 years agoExplorer | Level 3
Hello,
Thanks for the answer.
The error appeared on a web page and is the following:
Server error in application '/'.
Error Analyser
Description: Error parsing a resource required to make this request. See the specific analysis error details below and modify your source file appropriately.
Error message analyzer: Could not load type 'SimpleBusinessDashboard.MvcApplication'.
Source Error:
Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="SimpleBusinessDashboard.MvcApplication" Language="C#" %>
Source file: /global.asax Linha: 1
Version Info: Microsoft .NET Framework version:4.0.30319; ASP.NET version:4.6.1586.0
How can resolve this?
Best Regards
- Greg-DB9 years ago
Dropbox Community Moderator
We can't seem to reproduce that error. Did you follow the instructions for setting it up? (Also, I reccomended trying the SimpleBlogDemo, but it looks like you're trying to run the SimpleBusinessDashboard sample.) If you can share steps to reproduce it, that would be helpful.
In any case, looking online, there seem to be several things that can cause this. Can you take a look at those?
- knightd239 years agoExplorer | Level 3
Hello,
Thanks for the answer.
I leave then the steps that I follow:
-Open the project the Dropbox.api with Visual Studio;
-Right click in SimpleBlogDemo -> Set as Startup Project
-Open Web.config file and add the APPKEY and APPSECRET to lines 21 and 22 respectively.
-Add in MY APPS Dropbox the http://localhost:5000/Home/Auth in the Redirect URIs of the OAuth2
- Save and press Start button
Sometimes gives the error that I described other times open a tab in the browser and after a while time said that is impossible to access to the website.
Best Regards
- Greg-DB9 years ago
Dropbox Community Moderator
Thanks! We have managed to reproduce this. It seems the different sample projects can conflict with each other in some cases.
Please try the following to resolve it:
- right click on the SimpleBlogDemo project
- click "Properties"
- click "Web" in the sidebar
- change the port in "Project Url", e.g., from http://localhost:5000/ to http://localhost:5001/
- say yes the resulting pop-up, if you get one
- run the project again - knightd239 years agoExplorer | Level 3
Hello,
With your configurations the page opens, request a login register and after I give the permissions to my app allows the access to the simpleblogdemo, the request the error "Server Error in '/' Application." reappears.
Best Regards
- Greg-DB9 years ago
Dropbox Community Moderator
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! - Greg-DB9 years ago
Dropbox Community Moderator
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 ago
Dropbox Community Moderator
Thanks! 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 ago
Dropbox Community Moderator
For 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 and Feedback
Get help with the Dropbox API from fellow developers and experts.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If 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, Facebook or Instagram.
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!