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 8107631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:50:18+00:00 2026-06-06T00:50:18+00:00

When I attempt to connect to an intranet web service from a web application

  • 0

When I attempt to connect to an intranet web service from a web application running on IIS Express that web service returns a 403 Forbidden. The service works correctly when I access via unit tests or from the same site running on Cassini or on under IIS 7.5 on my server. My gut tells me this is a configuration issue, but I’m not sure where to begin looking.

What would cause a remote web service to return a 403 Forbidden when that service is accessed from a site running on IIS Express?

To clarify the service I am accessing is not SOAP based. I am setting up a specific network credential and passing it along with my request which the below code illustrates.

protected XDocument Search(Uri requestUri)
{
    var nc = new NetworkCredential(this.config.ServiceUserName,
        this.config.ServicePassword);
    var cCache = new CredentialCache();
    cCache.Add(requestUri, "Basic", nc);

    var request = (HttpWebRequest)HttpWebRequest.Create(requestUri);
    request.Credentials = cCache;
    request.PreAuthenticate = true;
    request.Method = WebRequestMethods.Http.Get;

    var response = (HttpWebResponse)request.GetResponse();
    return XDocument.Load(new StreamReader(response.GetResponseStream()));
}
  • 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-06-06T00:50:22+00:00Added an answer on June 6, 2026 at 12:50 am

    I do not have time to dig into the why right now, but I can say that it had something to do with my proxy settings. Switching to a different proxy provider for my box alleviated the issue. This internal transaction should have been bypassing the proxy all together and why IIS would behave differently than other mechanisms is beyond me. Begrudgingly I am going to mark this as the answer and hope the small notice to check your proxy settings helps someone. Sorry this isn’t more specific.

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

Sidebar

Related Questions

I am running into myriad problems with my attempt to connect to a secure
I have to develop a small application that will connect to a Linux server
I'm creating a web application that requires the use of the perl module Crypt-SSLeay.
When I attempt to connect to SQL server using enterprise manager I get the
Recentely, I deploy a worker role that it will connect to internet and attemp
I attempt to use webservice return POCO class generated from entity data model as
I have implemented a client-server transferring from Windows desktop application to iPhone App. I
I am attempting to test a WCF web service I'm developing by accessing it
My application runs under tomcat. It is using GSS API (JNDI) to connect to
I kept recieving error 12029 (ERROR INTERNET CANNOT CONNECT, The attempt to connect to

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.