You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
donaldp
6 years agoCollaborator | Level 9
Win32 exception
Having got SimpleTest working, :-) I've now turned my attention back to my own program to try and sort out the original issue. I thought from memory it was having problems in the same step as we had been with SimpleTest,but it turns out it was actually the NEXT step.
In...
System.Diagnostics.Process.Start(authorizeUri.ToString());
I'm getting...
Exception thrown: 'System.ComponentModel.Win32Exception' in System.Diagnostics.Process.dll
The system cannot find the file specified
The system cannot find the file specified
-2147467259
2
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start(String fileName)
at TestDx.App.<GetAccessToken>d__6.MoveNext()
System.Diagnostics.Process
The system cannot find the file specified
The extra dignostics there not very helpful (not to me anyway). Googling the message usually revolves around web-issues (not surprisingly), with a few mentioning a web.config file. I can't see any such file in my program or SimpleTest folders (and if it's outside those project folders, then whatever it is would be the same settings for both anyway).
Any ideas on this one? Something is missing, or not configured right, but I don't know what?
- Greg-DBDropbox Staff
The `System.Diagnostics.Process.Start(authorizeUri.ToString());` line is supposed to build the OAuth app authorization URL (i.e., https://www.dropbox.com/oauth2/authorize..., via `authorizeUri.ToString()`), and then have the system open it in the system web browser, whatever that may be (i.e., via `System.Diagnostics.Process.Start`).
The SDK essentially delegates how to actually open the URL in the browser to the system, so I don't have much insight on this exception. Based on the message though, it sounds like the system is perhaps interpreting the URL as a local file location for some reason, and when it looks on the local filesystem, it can't find it, of course. To try to troubleshoot that, can you print out the value of `authorizeUri.ToString()`?
Alternatively, it may be saying it can't find the location of something else it's using, e.g., perhaps the browser itself? What system/environment are you running this in?
- donaldpCollaborator | Level 9
Hi Greg,
Sorry - it's Visual Studio 2017 on Windows 10. I did check the string, and all is identical to SimpleTest, except for the state of course.
Yeah, it's not openning the browser, and I'm not sure why. I had a sudden thought that maybe the system wasn't quite ready yet (just ran into this in another project) and put in a delay, but same result. It's puzzling given the very same command is working in SimpleTest, and I'm not sure what else to look at. :-(
- Greg-DBDropbox Staff
I'm afraid I don't know what may be causing this. I tried looking for other reports, but I didn't find anything that quite matches this exactly. It looks like this could be due to a permissions issue though; can you try running as administrator to see if that makes any difference?
Alternatively, can you compare the References in your project with those in SimpleTest? It may be referring to not being able to find a referenced library file.
If you can reproduce this in a new simple project and share that, we'll be happy to try it here so we can troubleshoot directly.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,917 PostsLatest Activity: 11 days ago
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 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!