i beg for your help with this...
We need to upload videos to Youtube Channel, with a WebForms application. So, this is the main lines of the code i d like to show you:
var folder = System.Web.HttpContext.Current.Server.MapPath("~/App_Data/GoogleData");
UserCredential credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
new ClientSecrets
{
ClientId = ConfigInfo.YouTubeApiClient_id,
ClientSecret = ConfigInfo.YouTubeAppClient_secret,
},
new[] { YouTubeService.Scope.YoutubeUpload },
"user",
CancellationToken.None,
new FileDataStore(folder,true)).Result;
The error i have is: System.ComponentModel.Win32Exception: Access is denied.
Some additional information if it s helpfull:
- I've created the clientId and the credential in console.developers.google.com as an Application.
- It works fine on my localhost if i debug the application, but it does not work on the Arvixe shared hosting server.
This is what i ve already tried:
- The first thing came to my mind was giving Read/Write Permissions on that folder (GoogleData), so i done that but still same error.
- I ve also asked Arvixe support team to give Everyone-Full Control access to that folder (they say they ve already done that, but not sure)
- I ve also tried to remove the FileDataSource parameter and use GoogleWebAuthorizationBroker.Folder, but same error.
- I ve read all the Google Examples, and codes, but all of them are for console or desktop application, and i have a web application with a web server.
Please, any help you can give us will be really appreciated ! Thanks again !