+ Post New Thread
Page 1 of 3 123 LastLast
Results 1 to 15 of 40
Home Access Plus+ Thread, JSON troubleshooting in Projects:; Hi Nick - sorry to start another thread - but my queries were cluttering up and getting lost in another ...
  1. #1
    mattgrimley's Avatar
    Join Date
    Jun 2011
    Location
    Bedfordshire
    Posts
    316
    Thank Post
    35
    Thanked 21 Times in 19 Posts
    Blog Entries
    1
    Rep Power
    10

    JSON troubleshooting

    Hi Nick - sorry to start another thread - but my queries were cluttering up and getting lost in another conversation..

    I noticed a problem with the old v6.5 site today in that it didn't skip a week for half-term and reported this week as week 1 instead of 2 (7.6 reports as week 2 with the same data). So, i have hurriedly switched over to 7.6 on the live site and corrected all my booking clashes.

    My problem is that certain operations just aren't working for me with the 7.x versions and from previous discussions i think you thought it may be JSON related.

    Description:
    Trying to delete my own booking as an admin user. I get a pop-up "Question, are you sure..." I click "Yes", the pop-up vanishes and nothing else happens.
    The booking remains undeleted.

    A previous thread that you directed me too suggested installing firefox/firebug. Which i did.. The info i got was:
    Quote Originally Posted by mattgrimley View Post
    Firebug shows:
    "NetworkError: 401 Unauthorized - https://portal.site.sch.uk/hap/api/BookingSystem/Booking/1-11-2011"
    Any suggestions what i can do next to establish the cause of my issue?

    Cheers in advance!

    (P.S. Myfiles is looking really nice)

  2. #2
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,541
    Thank Post
    38
    Thanked 504 Times in 435 Posts
    Rep Power
    114
    In the browser navigate to /hap/api/bookingsystem/help.

    Check you are logged in.

  3. #3
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,541
    Thank Post
    38
    Thanked 504 Times in 435 Posts
    Rep Power
    114
    Can you replace the HAP.Web.dll file with the one I've attached, and try the booking system again. HAP+ should show as running v7.6.1101

  4. #4
    mattgrimley's Avatar
    Join Date
    Jun 2011
    Location
    Bedfordshire
    Posts
    316
    Thank Post
    35
    Thanked 21 Times in 19 Posts
    Blog Entries
    1
    Rep Power
    10
    Quote Originally Posted by nickbro View Post
    In the browser navigate to /hap/api/bookingsystem/help.
    Operations at https://portal.site.org.uk/hap/api/bookingsystem
    This page describes the service operations at this endpoint.

    Uri Method Description
    /Booking/{Date} DELETE Service at https://portal.site.org.uk/hap/api/bookingsystem/Booking/{DATE}
    POST Service at https://portal.site.org.uk/hap/api/bookingsystem/Booking/{DATE}
    /Initial/{Date}/{Username} GET Service at https://portal.site.org.uk/hap/api/bookingsystem/Initial/{DATE}/{USERNAME}
    /LoadRoom/{Date}/{Resource} GET Service at https://portal.site.org.uk/hap/api/bookingsystem/LoadRoom/{DATE}/{RESOURCE}


    Quote Originally Posted by nickbro
    Check you are logged in.
    I have logged in and the system does recognise me as such.. is there a particular way that you want me to check this? Should something be displayed on the link above?

    Cheers again for your patience!

    Matt


    Sorry - our posts crossed in the ether! - Will replace that DLL when i get in to work (in a couple of hours) and post back

  5. #5
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,541
    Thank Post
    38
    Thanked 504 Times in 435 Posts
    Rep Power
    114
    Can you try the dll attached, and try accessing the booking system again

  6. #6
    mattgrimley's Avatar
    Join Date
    Jun 2011
    Location
    Bedfordshire
    Posts
    316
    Thank Post
    35
    Thanked 21 Times in 19 Posts
    Blog Entries
    1
    Rep Power
    10
    Hey Nick,

    Replaced the dll and now I get some pop-up errors
    On creating a booking, I get an "Internal Server Error" - the booking is created, just not displayed.

    On deleting a booking I now get an "Unauthorised" error.

    I can repeat the above with a firebug view, but I won't be back in the office till lunch time.

    Cheers,
    Matt

  7. #7
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,541
    Thank Post
    38
    Thanked 504 Times in 435 Posts
    Rep Power
    114
    If you wouldn't mind trying firebug, I'll be out of the office now until ~1.30pm

  8. #8
    mattgrimley's Avatar
    Join Date
    Jun 2011
    Location
    Bedfordshire
    Posts
    316
    Thank Post
    35
    Thanked 21 Times in 19 Posts
    Blog Entries
    1
    Rep Power
    10
    Okay, i'll focus on the "delete a booking" issue.

    So, in firefox i get a pop-up box which says "Unauthorised".

    Firebug shows:
    DELETE https://portal.freman.org.uk/hap/api...king/2-11-2011 401 Unauthorized 62ms
    [X] "NetworkError: 401 Unauthorized - https://portal.freman.org.uk/hap/api/BookingSystem/Booking/2-11-2011"
    Unauthorized /hap/b...system/ (Line 365)
    error /hap/b...system/ (Line 366)
    Object { readyState=4, responseText="<!DOCTYPE html PUBLIC "...iv>\r\n</body>\r\n</html>\r\n", status=401, more...} /hap/b...system/ (line 367)

    JSON troubleshooting-booking-firebug.png

  9. #9
    mattgrimley's Avatar
    Join Date
    Jun 2011
    Location
    Bedfordshire
    Posts
    316
    Thank Post
    35
    Thanked 21 Times in 19 Posts
    Blog Entries
    1
    Rep Power
    10
    The expanded "response|Text" from the error is:
    "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <title>401 - Unauthorized: Access is denied due to invalid credentials.</title> <style type="text/css"> <!-- body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE} fieldset{padding:0 15px 10px 15px;} h1{font-size:2.4em;margin:0;color:#FFF} h2{font-size:1.7em;margin:0;color:#CC0000} h3{font-size:1.2em;margin:10px 0 0 0;color:#000000} #header{width:96%margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF background-color:#555555} #content{margin:0 0 0 2%;position:relative;} .content-container{background:#FFFwidth:96%;margin-top:8px;padding:10px;position:relative;} --> </style> </head> <body> <div id="header"><h1>Server Error</h1></div> <div id="content"> <div class="content-container"><fieldset> <h2>401 - Unauthorized: Access is denied due to invalid credentials.</h2> <h3>You do not have permission to view this directory or page using the credentials that you supplied.</h3> </fieldset></div> </div> </body> </html>

  10. #10
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,541
    Thank Post
    38
    Thanked 504 Times in 435 Posts
    Rep Power
    114
    Double check the permissions on the app_data folder

  11. #11
    mattgrimley's Avatar
    Join Date
    Jun 2011
    Location
    Bedfordshire
    Posts
    316
    Thank Post
    35
    Thanked 21 Times in 19 Posts
    Blog Entries
    1
    Rep Power
    10
    Permissions on c:\inetpub\wwwroot\hap:
    SYSTEM - Full Control
    Domain Admins - Full Control
    IIS AppPool\HAP - Read & Excecute, List, Read


    Permissions on c:\inetpub\wwwroot\hap\App_Data
    SYSTEM - Full Control
    Domain Admins - Full Control
    IIS AppPool\HAP - Modify, Read & Execute, List, Read, Write


    Inheritance from wwwroot is not enabled - so only permissions listed above are inherited through the HAP folder and subs.

    I reset all permissions and even removed / re-added the IIS AppPool\HAP user permissions (and rebooted the server)..

    What on earth am i missing?

  12. #12
    mattgrimley's Avatar
    Join Date
    Jun 2011
    Location
    Bedfordshire
    Posts
    316
    Thank Post
    35
    Thanked 21 Times in 19 Posts
    Blog Entries
    1
    Rep Power
    10
    I have just set-up a completely new install on the same server in the folder HAP2 with the AppPool "HAP2".
    Set it up from scratch without any imported data and getting the same problem

  13. #13
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,541
    Thank Post
    38
    Thanked 504 Times in 435 Posts
    Rep Power
    114
    How odd, this shouldn't be happening, as the booking system does no impersonation, just file system access. Were you able to complete the setup.aspx page using just the browser?

  14. #14
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,541
    Thank Post
    38
    Thanked 504 Times in 435 Posts
    Rep Power
    114
    Have you edited the ~/bookingsystem/web.config file changing the user access rules?

  15. #15
    mattgrimley's Avatar
    Join Date
    Jun 2011
    Location
    Bedfordshire
    Posts
    316
    Thank Post
    35
    Thanked 21 Times in 19 Posts
    Blog Entries
    1
    Rep Power
    10
    Quote Originally Posted by nickbro View Post
    How odd, this shouldn't be happening, as the booking system does no impersonation, just file system access. Were you able to complete the setup.aspx page using just the browser?
    Completed the setup.aspx very smoothly (the changes since the first release of it have made a tremendous difference!).
    I didnt have to make any manual changes.

    I had forgotton to alter the bookingsystem/web.config file - it still had CHS Staff - but even with that changed back to Staff (which is what mine is) it still errors.
    I am getting this issue with all user accounts including my own, which is a member of domain admins.

    The web.config file looks like this now:

    Code:
    <?xml version="1.0"?>
    <configuration>
      <system.web>
        <authorization>
          <allow users="*" />
          <deny users="?" />
        </authorization>
      </system.web>
      <location path="Default.aspx">
        <system.web>
          <authorization>
            <allow roles="Staff, Domain Admins" />
            <deny users="*" />
          </authorization>
        </system.web>
      </location>
      <location path="New.aspx">
        <system.web>
          <authorization>
            <allow roles="Staff, Domain Admins" />
            <deny users="*" />
          </authorization>
        </system.web>
      </location>
    </configuration>

SHARE:
+ Post New Thread
Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 6
    Last Post: 27th October 2010, 04:42 PM
  2. Replies: 8
    Last Post: 23rd January 2008, 11:11 AM
  3. Replies: 0
    Last Post: 31st May 2007, 09:53 AM
  4. SCSI Troubleshooting
    By Ric_ in forum Hardware
    Replies: 6
    Last Post: 1st December 2006, 10:02 AM
  5. Mark Minasi Pocast on Network Troubleshooting
    By ChrisH in forum Wireless Networks
    Replies: 3
    Last Post: 5th July 2006, 12:38 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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