#1
  1. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Nov 2007
    Posts
    2
    Rep Power
    0

    HTTP Error 401.1 - Unauthorized: Access is denied due to invalid credentials.


    Hi,

    When I try to access an SQL Server 2005 database using ASP pages, it works fine on one PC when the ASP pages are on the local machine and the database on the server. However, when the ASP pages and the database are both on the server, where I want them to be, it displays the error message below:

    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)
    Technical Information (for support personnel)
    • Go to Microsoft Product Support Services and perform a title search for the words HTTP and 401.
    • Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for topics titled Authentication, Access Control, and About Custom Error Messages.


    Can someone please tell me what I need to do on the IIS? I am using IIS Ver. 5.2. There are other services using the IIS and don’t want to mess things up.

    Thanks
  2. #2
  3. No Profile Picture
    Grumpier Old Moderator
    ASP Mastermind (5000+ posts)

    Join Date
    Sep 2003
    Posts
    10,143
    Rep Power
    189
    First problem, there is no IIS Ver 5.2.

    Apparently you have incorrect permission settings on the web server. Review the IIS online help and you'll find extensive documentation on IIS authentication and security settings.
    ======
    Doug G
    ======
    I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain
  4. #3
  5. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Nov 2007
    Posts
    6
    Rep Power
    0
    ITs security problem, try to make the website again..
    delete it from IIS, make website or virtual directory..browse the folder, and make the first page as default page in IIS, the n try,first try by html page if its working the try to browse another server script page
  6. #4
  7. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Nov 2007
    Posts
    2
    Rep Power
    0
    Thanks guys,

    I have deleted the website from the IIS, recreated it and made a simple default.htm to run. This works fine and the default.htm comes up as expected. However, when I did the same thing again, but, this time tried to access default.asp which connects to SQL Server 2005 database and display data, error 'HTTP/1.1 500 Server Error' is generated.

    All the permission on the web site is set to 'Full Control' and the 'Intergrated Windows Authentication' is checked.

    Any ideas of where I am getting it wrong?

    Thanks
  8. #5
  9. No Profile Picture
    Grumpier Old Moderator
    ASP Mastermind (5000+ posts)

    Join Date
    Sep 2003
    Posts
    10,143
    Rep Power
    189
    If you're testing with IE, turn off "show friendly http errors" in IE and you should get more detail about your 500 error.
  10. #6
  11. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Mar 2008
    Posts
    3
    Rep Power
    0
    Change the Application pool of the Web Site same as the default web site application pool

Similar Threads

  1. Permission denied when access excel obj
    By aspasp in forum ASP Development
    Replies: 0
    Last Post: December 5th, 2003, 03:29 AM
  2. Access Denied error while downloading..
    By Swaroop in forum ASP Development
    Replies: 0
    Last Post: December 4th, 2003, 07:19 AM
  3. MS SQL Server 7 access is denied in EM after SP4
    By Hawkinpaul in forum Microsoft SQL Server
    Replies: 1
    Last Post: October 30th, 2003, 05:45 PM
  4. Access Denied Error
    By Steve Schofield in forum ASP Development
    Replies: 1
    Last Post: June 23rd, 2002, 11:31 AM
  5. "Access Denied" Launching Word with ASP.net
    By Steve Schofield in forum .NET Development
    Replies: 1
    Last Post: January 25th, 2002, 07:02 AM

IMN logo majestic logo threadwatch logo seochat tools logo