Site is asking for Login and Password 0r throwing "You are not authorized to view this page": error on main page.

Question: When users visit the site anonymously, why it is asking for username and password?

Answer:
When a user attempts to connect to a public Web or FTP site, your Web server assigns the user a Windows NT anonymous, or guest user account. Typically, this guest account has security restrictions, imposed by your Windows NT Files System (NTFS) permissions that designate the level of access and the type of content available to public users.

This error is most probably due to disabled anonymous access. You may resolve this problem by enabling and then properly configuring your Web server's anonymous access account.

Solution:
Enable Anonymous Authentication in the IIS Web Server. To enable Anonymous Authentication, follow these steps:

  1. Open Internet Services Manager. To open Internet Services Manager, click Start, point to Settings, and then click Control Panel. Double-click Administrative Tools, and then double-click Internet Services Manager.
  2. In the Internet Information Services console, click to expand your server name, and then click to expand the Web site. Right-click your Web site name, click Properties.
    Click the Directory Security tab, and then click Edit in the Anonymous access and authentication control box.
  3. Enable the Anonymous Access check box, click Edit, click Browse and select DomainName_Web User (e.g. PizzaSite_Web is anonymous user for PizzaSite.com).
    Note: This user is created by default when a site is created with HC.
  4. Enable the check box Allow IIS to control password and click Ok.
    Note: After clicking Ok button, if you get any prompt, click Yes button.
  5. Enable the check box Integrated Windows authentication. Clear the check box Basic authentication (password is sent in clear text). Click Ok.
    Note: After clicking Ok button, if you get any prompt, click Yes button.
  6. Click Ok to apply changes.
  7. Add HCGroup/IWAM_MachineName/IUSR_MachineName in your local security policies at administrator tools :: local security settings :: Local policies :: User rights assignment :: Access this computer from the network.