Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7182877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:51:51+00:00 2026-05-28T17:51:51+00:00

The gitWebRequest.GetResponse() line is returning a 403 error from the server and I can’t

  • 0

The gitWebRequest.GetResponse() line is returning a 403 error from the server and I can’t seem to figure out why. Any help appreciated.

            var address = new Uri(verifyUrl + _apiKey);

            HttpRequest request = HttpContext.Current.Request;

            var gitWebRequest = WebRequest.Create(address) as HttpWebRequest;
            gitWebRequest.Method = "POST";
            gitWebRequest.ContentType = "application/json";

            var requestReader = new StreamReader(request.InputStream);

            var requestBody = requestReader.ReadToEnd();

            var myRequestUri = string.Format("{0}://{1}{2}",request.Url.Scheme,request.Url.Authority.TrimEnd('/'), request.RawUrl);

            var verifyRequestData = new { requestUri = myRequestUri, postBody = requestBody };

            var gitRequestData = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(verifyRequestData));

            using (var stream = gitWebRequest.GetRequestStream())
            {
                stream.Write(gitRequestData, 0, gitRequestData.Length);
            }

            using (var response = gitWebRequest.GetResponse() as HttpWebResponse)
            {
                // Get the response stream  
                if (response != null)
                {
                    var responseReader = new StreamReader(response.GetResponseStream());
                    result = responseReader.ReadToEnd();
                }
            }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T17:51:52+00:00Added an answer on May 28, 2026 at 5:51 pm

    It was using http instead of https, which is what goole requires.

    Thanks for making me look at the url.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created a simple orchestration to call a WCF service and get response from
I'm developing simple Windows Service sending and receiving data from remote web service. I
I'm attempting to get the content-length of a remote file so that I can
HELP ! I'm trying to upgrade may program to support the new oAuth that
In the project I'm on we want to upgrade from Wicket 1.4 to 1.5.
I want to consume Java based web service with c#.net client. The problem is,
I've previously used a CookieContainer with HttpWebRequest and HttpWebResponse sessions, but now, I want
I'm trying to log onto a website by providing my (correct) username and password.
I'm playing with Silverlight 4, and I when my page loads, I call beginGet(my/people/,
I often use webservice this way public void CallWebservice() { mywebservice web = new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.