You must Sign In to post a response.
  • Category: ASP.NET

    The remote server returned an error: (403) Forbidden.

    how to solve the error
    my code is:
    if (!string.IsNullOrEmpty(Request.QueryString["code"]))
    {
    string code = Request.QueryString["code"];
    string json = GoogleConnect.Fetch("me", code);
    GoogleProfile profile = new JavaScriptSerializer().Deserialize<GoogleProfile>(json);
    lblId.Text = profile.Id;
    lblName.Text = profile.DisplayName;
    lblEmail.Text = profile.Emails.Find(email => email.Type == "account").Value;
    lblGender.Text = profile.Gender;
    lblType.Text = profile.ObjectType;
    ProfileImage.ImageUrl = profile.Image.Url;
    pnlProfile.Visible = true;
    btnLogin.Enabled = false;
    }
  • #767899
    Hi,

    You will need to enable Google Plus API in your Console Application.
    Then it wont throw issue.

    Thanks,
    Mani


  • Sign In to post your comments