"You are not authorized to view this page" WHY? [Answered]RSS

14 replies

Last post Oct 20, 2009 10:33 PM by sean-is-in-the-building

  • "You are not authorized to view this page" WHY?

    Oct 03, 2007 03:07 AM|madaxel|LINK

    Im trying to put my ASP.Net application online but I just keep getting "You are not authorized to view this page" errorpage (error 401.1). The same thing actually happens with normal HTML pages.

    Heres what i have done:

    -Placed the complied ASP.net application and its files to C:\mypage\

    -Created a virtual folder in IIS 5.1 called mypage and selected correct ASP.Net version (2.0.50727)

    -Directory security is set to anonymous access (using IUSR_machinename). No integrated windows logon is selected.

    Now when i try to open http://localhost/mypage/ i get "You are not authorized to view this page" (the same thing happens of course when i try to connect from another PC).

    I've tried to give access rights to users IUSR_computername, IWAM_computername, ASPNET and even NETWORK SERVICE to the mypage folder, but nothing seems to help!

    Im out of ideas. When I did the same on my other PC (also Win XP with SP 2 and IIS 5.1, everthing worked fine).

    I can access the pages when i enable Integrated Windows Authentication in IIS, but i dont want to promt for password, i need anonymous access.

    Should i re-install IIS or something? I´ve heard that installing IIS, ASP.net and Framework in wrong order can cause errors like this..

     

    Thanks in advance,
    -Madaxel

  • Re: "You are not authorized to view this page" WHY?

    Oct 03, 2007 03:22 AM|qbernard|LINK

    How about a normaly hello.htm? if same, most likely anonymous user password out of sync, anything in event log?

    can you reset it - iusr_computername account at computer management, then go the web site property, directory security tab, access.... then reselect the iusr account and type in the new password.

    Cheers,
    Bernard Cheah
  • Re: "You are not authorized to view this page" WHY?

    Oct 03, 2007 03:39 AM|madaxel|LINK

    I unchecked "Allow IIS to control password" checkbox - and now both HTML and ASP.Net pages are working!

    But i would like to know why =)

    Btw, where is the event log?
     

  • Re: "You are not authorized to view this page" WHY?

    Oct 03, 2007 03:54 AM|qbernard|LINK

    Mm... take a look at
    Password Synchronization/Allow IIS to Control Password May Cause Problems
    http://support.microsoft.com/default.aspx/kb/216828

    event log is at administrative tools - event viewer.

    Cheers,
    Bernard Cheah
  • Re: "You are not authorized to view this page" WHY?

    Oct 06, 2007 05:07 PM|BGriffin_TPA|LINK

    Can you provide a link to where I can get specific instructions on

    setting up IIS and access rights when using an Access 2003 DB as

    a backend to a website? Did most of the IIS 5.1 setup already with a host

    who didn't have any experience with Access backends.

    Do you have a working website with an Access backend? I have

    a site that works fine in Vis Studio 2005 Pro, but problems getting

    it to run. It publishes fine using XP Pro, but I get 403 (not authorized) and

    404 (page not found) errors. Do you know what I'm doing wrong?

    Using Integrated windows security, not using IIS controls PW

     using port 80, published to port 80, no host header name,

    local path = C:\Inetpub\wwwroot\AJAX  

    I'm allowing read, log visits, index resource..what else?

    Thanks for any help..

  • Re: "You are not authorized to view this page" WHY?

    Oct 07, 2007 08:43 AM|steve schofield|LINK

    This article explains the 401.1 a bit more

    http://technet2.microsoft.com/windowsserver/en/library/35d4445b-5440-4dc8-80f3-cea51b23abbc1033.mspx?mfr=true

    Do you see anything in the event log, make sure to enable local security policy auditing object failure item so file / folder denied access is logged.  In situations like this, I would run filemon / regmon to rule out any access denied errors.  Verify the ASPX script mappings are present.  Once you have verified the basic setup, It helps troubleshoot deeper issues, in my experience anyway. 

    Steve Schofield
    Windows Server MVP - IIS
    http://iislogs.com/steveschofield
    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget

  • Re: "You are not authorized to view this page" WHY?

    Oct 07, 2007 08:44 AM|steve schofield|LINK

    I forgot to mention if your asp.net script mappings are not present, you can type aspnet_regiis to install the script mappings.  Here is an article on this tool.

    http://msdn.microsoft.com/en-us/library/k6h9cz8h(VS.80).aspx

    Steve Schofield
    Windows Server MVP - IIS
    http://iislogs.com/steveschofield
    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget

  • Re: "You are not authorized to view this page" WHY?

    Oct 08, 2007 12:25 AM|qbernard|LINK

    You need to give detail error msgs ? 403 because of ?

    404 is page not found ? path valid or ?  Access MDB and Asp work fine with any version of IIS..... so you need to give more detail on your eror msgs.

    BGriffin_TPA

    Can you provide a link to where I can get specific instructions on

    setting up IIS and access rights when using an Access 2003 DB as

    a backend to a website? Did most of the IIS 5.1 setup already with a host

    who didn't have any experience with Access backends.

    Do you have a working website with an Access backend? I have

    a site that works fine in Vis Studio 2005 Pro, but problems getting

    it to run. It publishes fine using XP Pro, but I get 403 (not authorized) and

    404 (page not found) errors. Do you know what I'm doing wrong?

    Using Integrated windows security, not using IIS controls PW

     using port 80, published to port 80, no host header name,

    local path = C:\Inetpub\wwwroot\AJAX  

    I'm allowing read, log visits, index resource..what else?

    Thanks for any help..

    Cheers,
    Bernard Cheah
  • Re: "You are not authorized to view this page" WHY?

    Oct 08, 2007 01:22 PM|BGriffin_TPA|LINK

    Bernard Cheah:

    Thanks for helping, I can browse the .htm pages in the folder from IIS, but not the .aspx...?????

    Here is the event log (APP) error message:

    Failed to initialize the AppDomain:/LM/W3SVC/1/ROOT
    Exception: System.Configuration.ConfigurationErrorsException
    Message: Exception of type 'System.Configuration.ConfigurationErrorsException' was thrown.
    StackTrace: at System.Web.Configuration.ErrorRuntimeConfig.ErrorConfigRecord.System.Configuration.Internal.IInternalConfigRecord.GetLkgSection(String configKey)
    at System.Web.Configuration.RuntimeConfigLKG.GetSectionObject(String sectionName)
    at System.Web.Configuration.RuntimeConfig.GetSection(String sectionName, Type type, ResultsIndex index)
    at System.Web.Configuration.RuntimeConfig.get_HostingEnvironment()
    at System.Web.Hosting.HostingEnvironment.StartMonitoringForIdleTimeout()
    at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters)
    at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters)
    at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)
    at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)

    BGriffin_TPA

  • Re: "You are not authorized to view this page" WHY?

    Oct 08, 2007 02:44 PM|BGriffin_TPA|LINK

    Steve :

    Are you good?..or are you GOOD? Not a complete answer, but we're making

    progress. I get a new (different) event viewer (APP) message:

    A content scan could not be completed on c:\windows\help\iishelp\.

    I get this for several relevant folders..I forgot to mention that the Access 2003

    DB it has in the app_data folder is linked to another Access DB outside the

    domain in My_documents..(in my defense it works fine inside of VS 2005 Pro..so..)

    here is the warning (also in the APP of the event viewer)

    Application information:
        Application domain: /LM/W3SVC/1/Root-1-128363406254825328
        Trust level: Full
        Application Virtual Path: /
        Application Path: C:\Inetpub\wwwroot\AJAX\
        Machine name: OWNER-73588ED50
     
    Process information:
        Process ID: 3444
        Process name: aspnet_wp.exe
        Account name: OWNER-73588ED50\ASPNET
     
    Exception information:
        Exception type: OleDbException
        Exception message: The Microsoft Jet database engine cannot open the file 'C:\Documents and Settings\Owner\My Documents\Admin.mdb'.

        It is already opened exclusively by another user, or you need permission to view its data.

    Thanks again..and regards,

    BGriffin_TPA  

    PS: Peter and Stewie said say hello..


     

  • Re: "You are not authorized to view this page" WHY?

    Oct 09, 2007 12:10 AM|qbernard|LINK

    Steve says......

    PRB: Error 80004005 "The Microsoft Jet Database Engine cannot open the file '(unknown)'"
    http://support.microsoft.com/kb/306269

    Cheers,
    Bernard Cheah
  • Re: "You are not authorized to view this page" WHY?

    Oct 09, 2007 09:43 PM|steve schofield|LINK

    The IUSR or Application Pool needs rights as the article Bernard pointed out.

    Steve Schofield
    Windows Server MVP - IIS
    http://iislogs.com/steveschofield
    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget

  • Re: "You are not authorized to view this page" WHY?

    Oct 20, 2009 04:38 PM|Sean-is-in-the-building|LINK

    Where did you go to find that "Allow IIS to control password"?

  • Re: "You are not authorized to view this page" WHY?

    Oct 20, 2009 05:03 PM|tomkmvp|LINK

    This thread is about IIS 5.1 (Windows XP Pro).

    Go to the Directory Security tab for the site and click the Edit button under Anonymous access and authentication control. 

  • Re: "You are not authorized to view this page" WHY?

    Oct 20, 2009 10:33 PM|Sean-is-in-the-building|LINK

    Hey, Thanks!