Error 401 for my ASP.NET app on IIS 6.0 - asp.net

I've just wrote a legacy app on IIS 6.0 (.NET 1.0, don't even ask why!). One of the requirements is to have "Integrated Windows Authentication" disabled on the Virtual directory.
http://localhost/test.html
When I disable that, I get a error 401.1 on the IIS root's test.html, which consists of "Hello World"
You are not authorized to view this page You do not have permission to
view this directory or page using the credentials that you supplied.
Please try the following:
•Contact the Web site administrator if you believe you should be able
to view this directory or page. •Click the Refresh button to try again
with different credentials. HTTP Error 401.1 - Unauthorized: Access is
denied due to invalid credentials. Internet Information Services (IIS)
When IWM is enabled, the website works like a gem.
Does anyone know what is the root cause? This doesn't appear to be an issue with my app since even the default test.html fails with authentication

You will most likely need to set the correct folder permissions for the 'Anonymous' user on the folder you are accessing.
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/f594e137-e2da-4b22-ab58-f8edba938802.mspx?mfr=true
edit: this is the more relevant link:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/9ded7af2-fcb7-4ed2-b007-e19f971f6e13.mspx?mfr=true

Issue was resolved with removing Guest and Anonymous restriction from the local security policy

Related

Unauthorized error on control F5

I have hosted single html page in IIS. When I open it using url (http:myipaddress/test.html) it works fine but when I press Ctrl + F5 it gives me error.
HTTP Error 401.3 - Unauthorized
You do not have permission to view this directory or page because of
the access control list (ACL) configuration or encryption settings for
this resource on the Web server.
also it doesn't open in other PCs in domain server. I have given read/write permission to few users in network and added IIS_IUSRS user as well.
My issue was around the identity used in the app pool. I changed the site's Authentication to "Application pool identity" as well as giving the directory the appropriate permissions.
Copied from here

Unable to upload asp.net website

i recently uploaded an asp.net website to web server and the publish fails.
Now when i open the site on internet it says 403 - Forbidden: Access is denied.i don't have permission to view this.. i tried filezilla to uplaod the files again. they uploaded but again the same message is displayed on browser.can you tell me where am i doing something wrong?i am using framework v4.0.
403 is a forbidden error.
Try checking the authentication settings for the website, you may need to enable Anonymous access in IIS for the website, otherwise it will just deny access.

Why do I need Windows Authentication? my Anonymous Authentication is broken

Even default ASPNET websites seem to require Windows Authentication enabled on my machine when Anonymous Authentication should do, what could be wrong with my IIS7/ASP.NET install?
I've ran aspnet_regiis /i but it still does not not fix it!
I get 401.3
Access is denied.
Description: An error occurred while accessing the resources required to serve this request. You might not have permission to view the requested resources.
Error message 401.3: You do not have permission to view this directory or page using the credentials you supplied (access denied due to Access Control Lists). Ask the Web server's administrator to give you access.
Ensure that the web user has access to the files. File/folder permissions will override the anonymous option you pick in IIS.
It looks like the issue is with Basic Authentication being disabled, by default.
Enabling this fixes the issue!

You are not authorized to view this page

I am getting the following error while browsing the my webpage
i checked and seen anaymous access has been enabled and integrated aunthentication has been turned off ...
Could you please help?
You are not authorized to view this page
You do not have permission to view this directory or page using the credentials that you supplied.
--------------------------------------------------------------------------------
Please try the following:
Contact the Web site administrator if you believe you should be able to view this directory or page.
Click the Refresh button to try again with different credentials.
HTTP Error 401.1 - Unauthorized: Access is denied due to invalid credentials.
Internet Information Services (IIS)
Open in New WindowSelect All
Tags:
Add Tags
Add Tags
Zones:
Microsoft IIS Web Server, .Net Application Servers, Programming for
My web.conf look like below:
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
You should also check the NTFS permissions on the directory and files in your web site itself. The easiest way to determine if this is the problem is by giving Everyone READ access. Test it. Then remove the Everyone entry. If that had solved the problem, find out what user account the IIS application pool hosting your web app uses, and add that user account to the NTFS permissions list giving that user Read access.

authentication mode=Forms - so why am I getting a Windows Login prompt?

I have authentication mode set to forms in my asp.net web.config but am still getting a windows login prompt when i browse to the website.
Could authentication mode be set elsewhere, in IIS for example? My site runs on IIS 6.
Thanks.
This could be because the permissions on the folder that is being served is not allowed to be accessed by the user running the web site
I have had issues where the authentication was set to forms and the directory security was set to allow anonymous, but some resources (images in my particular case) did not have the proper permissions to allow the anonymous user to read them.
The effect is that the user was prompted to login so that the graphics could be displayed, after which the form was displayed and the user logged in (again) with the intended form.
Sounds like windows permissions problem.
Windows permissions will always override anything that you have set up in aspnet.
I would start by looking at "anonymous access" permissions in IIS admin, then work your way through the file system.
You have configured anonymous access in IIS Administrator, but the IIS user does not have permission to access the filesystem, defaulting to the login dialog to authenticate as Windows user.
As it happens a colleague updated my machine to .NET Framework 3.5 SP1 whilst I was away. So I compiled my project and released onto the server which does not have SP1 installed and the above happened.
I've installed SP1 on the server and it's working fine now.
Thanks for all your input.
Just to clarify : the login popped up because the application was unable to load a file due to the problem described in the following: Link

Resources