Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Download a intranet site from a windows form (401 error)

Download a intranet site from a windows form (401 error)

Scheduled Pinned Locked Moved C#
helpsysadminsecuritytoolsworkspace
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Succodimele
    wrote on last edited by
    #1

    Hello I've got once again a problem with an application of mine.. Im building and application which checks a defined list of links. This windows form application should be able to run from any computer within our company. We have different security zones and we use a proxy configurated by with a automatic configuration script. Now for internet website I haven't any problems. I just use the default proxy and fill the credentials with my user informations. But for the websites into the intranet it doesn't work like that. I just always get a 401 (unauthorized) error message. I know that it's possible to solve that problem without knowing our network security exactly but hopefully anybody has an idea anyway. :-) Thanks a lot and best reagrds

    V 1 Reply Last reply
    0
    • S Succodimele

      Hello I've got once again a problem with an application of mine.. Im building and application which checks a defined list of links. This windows form application should be able to run from any computer within our company. We have different security zones and we use a proxy configurated by with a automatic configuration script. Now for internet website I haven't any problems. I just use the default proxy and fill the credentials with my user informations. But for the websites into the intranet it doesn't work like that. I just always get a 401 (unauthorized) error message. I know that it's possible to solve that problem without knowing our network security exactly but hopefully anybody has an idea anyway. :-) Thanks a lot and best reagrds

      V Offline
      V Offline
      Vimalsoft Pty Ltd
      wrote on last edited by
      #2

      how does your application access the link ?

      Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

      S 1 Reply Last reply
      0
      • V Vimalsoft Pty Ltd

        how does your application access the link ?

        Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

        S Offline
        S Offline
        Succodimele
        wrote on last edited by
        #3

        Over the System.Net.WebRequest class WebRequest request = WebRequest.Create(Path); request.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials; (HttpWebResponse)request.GetResponse();

        V 1 Reply Last reply
        0
        • S Succodimele

          Over the System.Net.WebRequest class WebRequest request = WebRequest.Create(Path); request.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials; (HttpWebResponse)request.GetResponse();

          V Offline
          V Offline
          Vimalsoft Pty Ltd
          wrote on last edited by
          #4

          Remember the way you access your intranet is not the same way you access the internet. so i think you have to create a one function and detect if its internet or Intranet and extract the correct url for each

          Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

          S 1 Reply Last reply
          0
          • V Vimalsoft Pty Ltd

            Remember the way you access your intranet is not the same way you access the internet. so i think you have to create a one function and detect if its internet or Intranet and extract the correct url for each

            Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

            S Offline
            S Offline
            Succodimele
            wrote on last edited by
            #5

            hmm.. This I've already done. I was clear that I have to different between internet and intranet otherwise it had worked. But I dont know how can I access to the intranet.. Any idea? Thanks for your help!

            S 1 Reply Last reply
            0
            • S Succodimele

              hmm.. This I've already done. I was clear that I have to different between internet and intranet otherwise it had worked. But I dont know how can I access to the intranet.. Any idea? Thanks for your help!

              S Offline
              S Offline
              Succodimele
              wrote on last edited by
              #6

              Now I just trey by chance the way to read the site over the System.Net.WebClient class and it worked pretty well. :-) Actually I have no idea where's the difference but for the moment it's enough, when it works. I'll try to find out why later..

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups