locked
"You are not authorized to view this page" WHY? RRS feed

  • Question

  • User1092894435 posted

    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

    Wednesday, October 3, 2007 3:07 AM

Answers

  • User1073881637 posted

    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. 

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Sunday, October 7, 2007 8:43 AM
  • User1073881637 posted

    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

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Sunday, October 7, 2007 8:44 AM
  • User989702501 posted

    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.

    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..

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Monday, October 8, 2007 12:25 AM
  • User601971297 posted

    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..


     

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Monday, October 8, 2007 2:44 PM

All replies

  • User989702501 posted

    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.

    Wednesday, October 3, 2007 3:22 AM
  • User1092894435 posted

    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?
     

    Wednesday, October 3, 2007 3:39 AM
  • User989702501 posted

    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.

    Wednesday, October 3, 2007 3:54 AM
  • User601971297 posted

    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..

    Saturday, October 6, 2007 5:07 PM
  • User1073881637 posted

    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. 

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Sunday, October 7, 2007 8:43 AM
  • User1073881637 posted

    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

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Sunday, October 7, 2007 8:44 AM
  • User989702501 posted

    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.

    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..

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Monday, October 8, 2007 12:25 AM
  • User601971297 posted

    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

    Monday, October 8, 2007 1:22 PM
  • User601971297 posted

    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..


     

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Monday, October 8, 2007 2:44 PM
  • User989702501 posted

    Steve says......

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

    Tuesday, October 9, 2007 12:10 AM
  • User1073881637 posted

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

    Tuesday, October 9, 2007 9:43 PM
  • User-1001196798 posted

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

    Tuesday, October 20, 2009 4:38 PM
  • User-823196590 posted

    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. 

    Tuesday, October 20, 2009 5:03 PM
  • User-1001196798 posted

    Hey, Thanks!

    Tuesday, October 20, 2009 10:33 PM