Hello,
I am in the process of porting my SQL DB and Website to Azure. Basically, I did it; and it works, EXCEPT, the Dropbox part of it does not work 😞 .
Below is my C# code that works when the website is running on a local machine, it works because the Dropbox app is installed on that Server. In the below code, Dropbox syncs folders are on the
\ drive. It's simple code... if a subfolder doesn't exist, then the code creates a subfolder in Dropbox; then it copies a file to that subfolder.
I installed the Dropbox.Api in my Visual Studio web app, but before I start messing things up, I thought I'd ask you smart folks if you can take the below code and tell me what to change it to so it works on Azure App Services.
Thank you very much!
string path = formatYYYY + @\ + formatMM + @\ + formatDD + @\;
long s1 = 0;
try
{
if (Directory.Exists(@D:\Dropbox\Jobisez LLC\Archive\Translation\ + path))
{
}
else
{
DirectoryInfo di = Directory.CreateDirectory(@D:\Dropbox\Jobisez LLC\Archive\Translation\ + path);
}
}
catch
{
DirectoryInfo di = Directory.CreateDirectory(@D:\Dropbox\Jobisez LLC\Archive\Translation\ + path);
}
File.Copy(sFileDir + Session.Contents["Id"].ToString() + "." + sFileName + "." + myActivityDtTm + ".TXT", @D:\Dropbox\Jobisez LLC\Archive\Translation\ + path + Session.Contents["Id"].ToString() + "." + sFileName + "." + myActivityDtTm + ".TXT");