2012-11-29 44 views
1

我對檢索使用ASP.NET谷歌驅動器的文檔列表中的一個項目工作,但我得到一個錯誤:如何檢索使用谷歌驅動器SDK文檔中Asp.Net

An error occurred: Google.Apis.Requests.RequestError Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup. [403]

這是我的網站(獲取此鏈接上的錯誤):http://www.netdesklive.com/

我正在嘗試DrEdit代碼爲此,但無法正常工作。

我設置的所有憑證按https://developers.google.com/drive/examples/dotnet,但仍然即時得到一個錯誤

所以,請給我建議

代碼:

- >我越來越狀態和空值碼

public ActionResult Index(string state, string code) 
{ 
    try 
    { 
     IAuthenticator authenticator = Utils.GetCredentials(code, state); 
     // Store the authenticator and the authorized service in session 
     Session["authenticator"] = authenticator; 
     Session["service"] = Utils.BuildService(authenticator); 
    } 
    catch (CodeExchangeException) 
    { 
     if (Session["service"] == null || Session["authenticator"] == null) 
     { 
      Response.Redirect(Utils.GetAuthorizationUrl("", state)); 
     } 
    } 
    catch (NoRefreshTokenException e) 
    { 
     Response.Redirect(e.AuthorizationUrl); 
    } 

    DriveState driveState = new DriveState(); 

    if (!string.IsNullOrEmpty(state)) 
    { 
     JavaScriptSerializer jsonSerializer = new JavaScriptSerializer(); 
     driveState = jsonSerializer.Deserialize<DriveState>(state); 
    } 

    if (driveState.action == "open") 
    { 
     return OpenWith(driveState); 
    } 
    else 
    { 
     return CreateNew(driveState); 
    } 
} 
+0

請張貼相關的代碼。 – sshow

+0

喜sshow,我穿上這http://www.netdesklive.com/download/DrEdit.rar – Kaushik

+0

relavent代碼請我幫我解決這個 – Kaushik

回答

相關問題