New call-to-action
Results 1 to 19 of 19

Thread: 401 Unauthorized; the sequel

  1. #1
    Member
    Real Name
    Steve Layton
    Join Date
    Oct 2007
    Posts
    64

    Default 401 Unauthorized; the sequel

    Having chronicled my endless attempts to get past the 401 Unauthorized error, I will share the simplistic fix I employed and invite reactions.

    I had been instructed to publish my components and pages to c:\a5\A5Webroot and my database files to c:\a5\data. I had done that, and every variant of security and other settings, with no success. I finally copied all files and components to each of the areas c:\a5\data, c:\a5\A5Webroot and c:\a5\.

    That works to get me into my application where I have access to all my pages and all of my navigation works.

    The issues now: Even though all of my dbf tables appear on my web server, I get the message "Error 3 - Error loading [PathAlias.ADB_Path]\customer.dbf: The system cannot find the path specified. \[PathAlias.ADB_Path]\customer.dbf" or its equivalent for every table. I use the Alias, "[PathAlias.ADB_Path] = c:\a5\data". "c:\a5\data" is the address given me by my host as the appropriate target and this is what I enter as my profile Alias in Define Path and Connection Aliases for Web Projects. Any suggestions?

    Also, the style that I have chosen for all of my components does not consistently appear on my site. On some pages it is just as I intended, but, on others, the style just doesn't show up.

  2. #2
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,656

    Default Re: 401 Unauthorized; the sequel

    Quote Originally Posted by willobeth View Post
    I finally copied all files and components to each of the areas c:\a5\data, c:\a5\A5Webroot and c:\a5\.
    Copying your data files is one thing, but copying your A5 pages and components won't work. That's why you are getting the path error message. When you "publish" those objects, A5 automatically substitutes the actual target path for the PathAlias.ADB_Path. You do have to publish your files using Alpha's publish function (i.e. button).

  3. #3
    Member
    Real Name
    Steve Layton
    Join Date
    Oct 2007
    Posts
    64

    Default Re: 401 Unauthorized; the sequel

    That's been my dilemma. When I "publish" I get the 401 error. The first time I got to see any of my work on the internet was when I copied as noted. That, to me, was extraordinary progress.

    I will go back and start again, publish everything (though I had done this countless times before doing the copying) and see if I get a better result.

  4. #4
    Volunteer Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,849

    Default Re: 401 Unauthorized; the sequel

    It's really impossible for anyone here to diagnose this, all we can do is make stabs in the dark. There is something you are doing or not doing that has not been part of the discussion*. The thing that is troubling is if you are following instructions properly, then the instructions are flawed or incomplete, and that's a different issue that your host needs to resolve. You are not the first person to have trouble in this area, with the same host. Regarding publishing, I have seen all of the following incorrect methods:

    • Publishing to the development area, overwriting the development files with published files, ruining the development files.
    • Publishing the above ruined development files back to the publishing location, ruining the published files.
    • Publishing web files to the data location.
    • Publishing data files to the web files location.
    • Publishing the data to the place where the data was already coming from.
    • Publishing everything to the C: root folder.
    • Making the Document Root about nine folders deep with long folder names with embedded spaces.
    • Copying rather than publishing.
    • Not selecting the right boxes and options during publishing.
    • Copying everything everywhere.


    * When you are in this situation it is always the one thing you are overlooking (or don't understand, or misunderstand) and not the dozen things you keep retrying.
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  5. #5
    Member
    Real Name
    Clive Swanepoel
    Join Date
    Apr 2006
    Location
    Johnston, Iowa
    Posts
    119

    Default Re: 401 Unauthorized; the sequel

    Steve says: "You are not the first person to have trouble in this area, with the same host."

    The implication seems to be that it is a hosting issue and in particular a ZebraHost issue.

    When we set a VPS up we load the WAS and activate it. We then publish a "Future Home" page with some test data. This confirms that the server and WAS have been correctly setup.

    We provide the user with login information including the location of the A5Webroot and the datafolders.

    If we are able to publish successfully using Alpha Five's internal ftp engine then the customer should also be able to do so.

    We have many Alpha Five customers who have absolutely no problem in this area. Their VPS have been set up in exactly the same manner.

    If willobeth is in agreement I would happily provide Steve with access to the server so that he can review the setup.
    Affordable Alpha Five, PHP, MySQL Hosting.
    Serving Webmasters since 2000.ZebraHost

  6. #6
    Member
    Real Name
    Steve Layton
    Join Date
    Oct 2007
    Posts
    64

    Default Re: 401 Unauthorized; the sequel

    Clive, I will agree to give Steve access provided that he agrees that all data and design are confidential.

  7. #7
    Volunteer Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,849

    Default Re: 401 Unauthorized; the sequel

    This not the place to negotiate another person's time. I decline to look at the setup and assume it is fine. If you want to contract me, you need to contact me directly. And as I have said many times up here, ZebraHost is a fine establishment.
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  8. #8
    Member
    Real Name
    Steve Layton
    Join Date
    Oct 2007
    Posts
    64

    Default Re: 401 Unauthorized; the sequel

    Nonetheless, your comment about others having problems with this host has given me some concern.

  9. #9
    Volunteer Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,849

    Default Re: 401 Unauthorized; the sequel

    Steve, I overstated. It's like one other guy. And I have always said that YOU are the one making the mistake(s) here.
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  10. #10
    Member
    Real Name
    Steve Layton
    Join Date
    Oct 2007
    Posts
    64

    Default Re: 401 Unauthorized; the sequel

    And I have never doubted or denied that I am making mistakes. This is why I turned to the A5 community.

    I would to like close this discussion by saying that Zebra, Clive specifically, has been more than patient and responsive. If others have had problems, they may not have commuinicated their issues effectively to Zebra.

  11. #11
    Member
    Real Name
    Clive Swanepoel
    Join Date
    Apr 2006
    Location
    Johnston, Iowa
    Posts
    119

    Default Re: 401 Unauthorized; the sequel

    I have just double-checked the setup. I can't see anything wrong with it.

    The structure is:

    c:\a5\A5Webroot
    c:\a5\data

    Currently there are files in the a5 folder, the A5Webroot folder as well as the data folders (all uploaded via an external ftp engine I presume.)

    Getting back to basics, willobeth needs to resolve why he can't publish using the Internal Alpha Five engine.

    Figure that out, then delete everything from the folders and republish using the internal ftp engine.
    Affordable Alpha Five, PHP, MySQL Hosting.
    Serving Webmasters since 2000.ZebraHost

  12. #12
    Former Alpha Employee JerryBrightbill's Avatar
    Real Name
    Jerry Brightbill
    Join Date
    Apr 2000
    Posts
    5,173

    Default Re: 401 Unauthorized; the sequel

    The 401 Unauthorized error can only occur in a few limited ways.

    The most likely is that security is enabled, but the security data files were not published. The publish dialog has a check box to publish the security data files. It is NOT checked by default to prevent overwriting security data already on the server. They MUST be published at least once. If publish all files is selected, a warning dialog opens telling the user to publish the data. If the warning dialog is turned off, the message does not appear and it is easy to forget to publish the data.

    The data can be published by checking the box from the publish dialog, or by selecting Publish from the Web Security Menu.

    The message will also appear if some of the other security files do not exist on the server. These are normally published automatically, but can be also be published from the Publish option on the Web Security Menu. These two are the minimum files that must always exist, even if security is set to off.

    guid.SecuritySettings
    project.SecuritySettings

    If security is enabled, this file must also exist

    pages.SecuritySettings

    Enabled security must also have a number of files starting with "websecurity_". The actual files will vary depending on the security configuration.

  13. #13
    Member René Stout's Avatar
    Real Name
    René Stout
    Join Date
    Oct 2003
    Location
    Tiendeveen, The Netherlands, Europe
    Posts
    529

    Default Re: 401 Unauthorized; the sequel

    Allthough I did not take the time to really check it, I suspect the following issue:

    When using more than one web project on a database, publishing the security settings in one project, results in the 401 error in the other.

    It can be overcome by really exiting the WAS and running it again. (restarting is not enough).

    It happens also when publishing to local host. Than you have to exit A5 and restart it again.

    It happened to me a couple of times lately.

    Can anyone confirm this?
    René
    Windows 7, V11

  14. #14
    Former Alpha Employee JerryBrightbill's Avatar
    Real Name
    Jerry Brightbill
    Join Date
    Apr 2000
    Posts
    5,173

    Default Re: 401 Unauthorized; the sequel

    The security data is identified in the system by the security GUID in guid.SecuritySettings. The system is designed to allow only one application location to use a given GUID. Any other application linked to the same GUID value will return an error. In current builds, you will get

    "403 The security settings for this server are missing or incomplete."

    I earlier builds, this might come back with the same text but be identified as a 401 error

    If you inadvertently publish to the wrong location on the server and open a page, the GUID will be linked to that location. If you republish to a different location on the same server, it will show the 403 error as the GUID is already linked to a different folder. Only the first location will operate correctly. The second location will return an error.

    The only solution is to clear the original security data. This can only be done by shutting down and restarting Alpha Five or the Application Server in a server only install. If you are using a hosting company, you will have to contact them to shut down and restart the program. Stopping and restarting the server will not clear the original data. The files in the original location should be removed or it is possible to open a page from that wrong location, which will now give an error as the GUID is linked to the new location.

  15. #15
    Member René Stout's Avatar
    Real Name
    René Stout
    Join Date
    Oct 2003
    Location
    Tiendeveen, The Netherlands, Europe
    Posts
    529

    Default Re: 401 Unauthorized; the sequel

    Quote Originally Posted by JerryBrightbill View Post
    The security data is identified in the system by the security GUID in guid.SecuritySettings. The system is designed to allow only one application location to use a given GUID. Any other application linked to the same GUID value will return an error.
    Thanks, Jerry, for your explanation. I am a little bit disappointed now. When I understand you correctly, this means that:
    1. You can run different projects on a database,
    2. But you can only have one security environment.

    This seems very awkward to me: I defined a project for employees and a project for members. There are over 500 members. I do not want to end up with members and emplyoees in one table and I want to separate the environments. I think that's what is project thing is designed for.

    Now I understrand that the security cannot follow this logic. What now? I really don't like to merge the to projects...
    René
    Windows 7, V11

  16. #16
    Former Alpha Employee JerryBrightbill's Avatar
    Real Name
    Jerry Brightbill
    Join Date
    Apr 2000
    Posts
    5,173

    Default Re: 401 Unauthorized; the sequel

    Security is by project, not database, and each project has its own security and its own GUID value. Therefore, you can have multiple projects from the same source database publishing to the same server as long as each project publishes to a different target folder. Each will have its own unique security environment. What won't work is publishing from the same project to 2 locations on the same server. In that case, only the first instance opened will work. What will also not work is publishing 2 projects to the same folder on the server. In that case, the security applied is the last security published.

    All security is tied to the folder under the webroot defined as the application root for that project. Security settings are initially loaded when the first page request tied to that application root is called. The security loads with the GUID from that folder and saves the folder location. When the next page request comes in, it uses the security GUID value from the new page's application root to check the appropriate security settings. Part of that security check is a verification that the current root folder matches the original application root for that GUID. If they don't match, you will get the 403 message.

  17. #17
    Member René Stout's Avatar
    Real Name
    René Stout
    Join Date
    Oct 2003
    Location
    Tiendeveen, The Netherlands, Europe
    Posts
    529

    Default Re: 401 Unauthorized; the sequel

    Thanks Jerry, now I understand. I checked it and found out that on local host all projects ended up in the same folder...
    Thanks again for the explanation!
    René
    Windows 7, V11

  18. #18
    Former Alpha Employee JerryBrightbill's Avatar
    Real Name
    Jerry Brightbill
    Join Date
    Apr 2000
    Posts
    5,173

    Default Re: 401 Unauthorized; the sequel

    When you are publishing to "local webroot" for testing, it is always a good idea to specify a target folder in the profile to keep each project separated.

  19. #19
    Member cptutrecht's Avatar
    Real Name
    Ger Kurvers
    Join Date
    Feb 2010
    Location
    Netherlands, Utrecht
    Posts
    526

    Default The security settings for this server are missing or incomplete Back in a5v10?

    I got the message "The security settings for this server are missing or incomplete" and was glad to find this tread. Stopping, exiting and starting the WAS cured the issue after a 2 hours search to my mistake.

    My setup: have 1 project, which runs on serveral client databases, so they are correctly published to appropriate subdirs of the webroot (separate dubdirs for each client database)

    Just to inform others

Similar Threads

  1. 401 Unauthorized
    By Mike Parks in forum Application Server Version 8
    Replies: 25
    Last Post: 10-19-2007, 04:23 AM
  2. Sequel Server Based?
    By walhoney in forum Alpha Five Version 5
    Replies: 1
    Last Post: 06-21-2005, 08:29 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •