Contents | (Visit Preferences to set your user name.) | Related To You Are Not Authorized To View This Page Error From IIS When Using Perl And LWP To Browse Localhost | RecentChanges | Preferences | Index | Login | Logout
Search For Books About:
Search The Net:
"You Are Not Authorized To View This Page Error" From IIS
When Using Perl And LWP To Browse Localhost
Subjects > Tech Tips
See also Internet > Web
Q. I have IIS 5.0 setup on a laptop with Windows XP, and I use it for a development when I am not connected to the net. It provides a quick place to check out develop front page sites, and even to test perl programs to make sure they will run with IIS. The site works fine for browsing via http://localhost
Yesterday I was looking at writing a spider to access some websites, and I found that when I pointed the spider at localhost, it was unable to read pages off my local machine. Didn't matter whether the webpage was being produced by a perl script, or was a static HTML, instead of content, I got this error:
Status line: 401 Access Denied
You are not authorized to view this page
You do not have permission to view this directory or page using the credentials you supplied.
HTTP 401.1 - Unauthorized: Logon Failed
Internet Information Services
This only happened from the perl script using LWP. When using a webbrowser on my machine to browse the same URLs, everything was ok.
A. I verified this users problem, and then went to work to find a solution.
Turns out that this problem has to do with access rights. Go to the security event log viewer, and you'll see a whole bunch of access denied messages about not being able to log in the user. In this case, IIS had been setup to use the Administrator account for anonymous web access. Somehow the browser had been authenticating properly, but the accesses originating from the DOS prompt were not.
So the fix is to go into the computer management console, and select IIS. The right click the properties for the default website, go to security, enable anonymous access, then edit the settings, and choose an actual user of the machine to be the user that IIS uses for anonymous access.
- Some google searches that I tried:
- "you are not authorized to view this page" perl localhost lwp
- Similar problem related here, but no solution given: www.iis-resources.com/modules/newbb/viewtopic.php?topic_id=1298&forum=5&post_id=6020
- Problem described as: "ASP PAGES Won’t Load / IIS 6.0" - "The interesting thing is when I use a browser to go to http://localhost/, it does allow me to view my asp pages, however, when I force IIS to use the IP for the site I get the 401.3 relating to access control."
- No one on this thread had any solutons to offer.
- Similar problem, again, no solution: forums.devshed.com/showthread.php?p=676117#post676117
- I am using PHP 4.3.7, IIS, win 2000.... The problem is that when I am trying to access web page *.html on local machine then everything works fine, but when pressed links directing to *.php files then error occurs "You are not authorized to view this page: HTTP Error 403 - Forbidden ".... This only happens to *.php files in one specific folder. Other *.php files located in my machine run fine in browser.... And anonymous access is enabled.
- Someone here in a thread "LocalHost Browsing Problems" was having problems using localhost, but not their local machine name. Someone else mentioned getting 'Permission Denied' on call to GetObject?Create and it turned out to be Norton Antivirus' Script Blocking feature. As long as Script Blocking was enabled they would get the error, but disabling Script Blocking on Norton would make the site work.
- Probably not on topic
- mailman.lyra.org/pipermail/viewcvs/2004q2/002769.html - regarding installing a CVS system, and saying how spaces in directory paths break Gnu tools.
- Totally off topic:
- www.iis-resources.com/modules/newbb/viewtopic.php?viewmode=flat&order=ASC&topic_id=1212&forum=14&move=prev&topic_time=1084522751
- forums.techguy.org/showthread. php?goto=lastpost&t=237784
- www.tech-archive.net has a very persistent "You must install Unlimited Free IE Games Click Yes by Wild Media LLC" popup. Avoid this site like the plague!.... Update July 6 2004: The site seems to be free of the horrible spyware. The owner of Tech-Archive.Net wrote in with the following:
- One of my ad networks showed those spyware ads to my visitors.
- The ad network who showed these ads was immediately removed from my site, because forcing users into installing useless software/spyware on their pc's is the last thing I want support.
- I you ever see similar ads on my site, don't hesiate to contact me, so that I can take action against this.
- Kind regards, Ulrich Keil
See more of Garnet's Tech Tips ...
Did This Solve Your Problem?
Tech Tips By Garnet ...
If so, I'd like to hear from you.
I spend a lot of time tracking down solutions to many problems and questions, and it takes a lot of time to write about the answers so you can benefit from them. But I hope this page helped you solve your problem, or answered your question, clearly and quickly.
If you'd like to donate a buck or two via paypal, that would be nice too! For any size donation, I'll send you an Internet Guide on the topic of your choice to include on your website. You can see my new site for [Guides To The Internet].
Please also consider making a link to this page from your website.
You can also reach me privately with your questions at [my contact page]!
- Garnet
Check out [Facts About Trees]
Bobsgear - Get A Free
Enterrpise Wiki Space!
Review: The Bobsgear Project was
started to develop a variety of Confluence
plugins. This installation of
the Confluence Enterprise wiki includes flexible
attachments, many Confluence plugins, personal blogs,
interesting articles, and more. Bobsgear already has spaces related to
politics, art and
photography wiki,
technical issues wiki,
ediscovery wiki, health,
Christian theology and Sabbath
School wiki, the
bible, book reviews,
and quotations. Bobsgear
allows free signup, and invites anyone to create a
free hosted Confluence wiki space.
NEW
USERS CLICK HERE! for a quick introduction to
Wiki.
Interested in Stretching FAQ 3.1 - Ballistic Stretching?