mattgrimley Posted November 1, 2011 Posted November 1, 2011 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: 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)
nickbro Posted November 2, 2011 Posted November 2, 2011 In the browser navigate to /hap/api/bookingsystem/help. Check you are logged in.
nickbro Posted November 2, 2011 Posted November 2, 2011 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
mattgrimley Posted November 2, 2011 Author Posted November 2, 2011 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} 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
nickbro Posted November 2, 2011 Posted November 2, 2011 Can you try the dll attached, and try accessing the booking system again
mattgrimley Posted November 2, 2011 Author Posted November 2, 2011 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
nickbro Posted November 2, 2011 Posted November 2, 2011 If you wouldn't mind trying firebug, I'll be out of the office now until ~1.30pm
mattgrimley Posted November 2, 2011 Author Posted November 2, 2011 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/BookingSystem/Booking/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="
mattgrimley Posted November 2, 2011 Author Posted November 2, 2011 The expanded "response|Text" from the error is: " 401 - Unauthorized: Access is denied due to invalid credentials. Server Error 401 - Unauthorized: Access is denied due to invalid credentials. You do not have permission to view this directory or page using the credentials that you supplied.
nickbro Posted November 2, 2011 Posted November 2, 2011 Double check the permissions on the app_data folder
mattgrimley Posted November 2, 2011 Author Posted November 2, 2011 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?
mattgrimley Posted November 2, 2011 Author Posted November 2, 2011 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
nickbro Posted November 2, 2011 Posted November 2, 2011 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?
nickbro Posted November 2, 2011 Posted November 2, 2011 Have you edited the ~/bookingsystem/web.config file changing the user access rules?
mattgrimley Posted November 2, 2011 Author Posted November 2, 2011 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:
mattgrimley Posted November 2, 2011 Author Posted November 2, 2011 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 FYI (and as a complete aside, not wishing to derail my own thread): That hap.web.dll seems to break file downloads for me. I get a browser message of: Server Error in '/hap2' Application. -------------------------------------------------------------------------------- Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. Exception Details: System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [securityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security.] System.Diagnostics.EventLog.FindSourceRegistration(String source, String machineName, Boolean readOnly, Boolean wantToCreate) +714 System.Diagnostics.EventLog.SourceExists(String source, String machineName, Boolean wantToCreate) +460 System.Diagnostics.EventLog.SourceExists(String source) +22 HAP.Web.Logging.EventViewer.Log(String source, String message, EventLogEntryType type) +37 RangeRequestHandlerBase.LogRequestHttpHeaders(HttpRequest Request) +494 RangeRequestHandlerBase.ProcessRequest(HttpContext context) +182 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +625 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +270 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.237
nickbro Posted November 2, 2011 Posted November 2, 2011 Can you download the HAP Logging Setup Utility and run it on the server
mattgrimley Posted November 2, 2011 Author Posted November 2, 2011 Can you download the HAP Logging Setup Utility and run it on the server Okay, downloaded "Logging Setup.exe" and run it. It created a "Home Access Plus+" Event Log under "Applications and Services Logs" but it is empty. Do i need to do anything to get it to receive data?
nickbro Posted November 2, 2011 Posted November 2, 2011 HAP+ will start writing stuff to it when an error occurs
mattgrimley Posted November 2, 2011 Author Posted November 2, 2011 HAP+ will start writing stuff to it when an error occurs Okay, i'm getting some stuff written from the file browser, but nothing is getting written from the errors in bookingsystem.
mattgrimley Posted November 3, 2011 Author Posted November 3, 2011 This may be a complete distraction, but some of the odd behaviour i experienced when "creating" tickets (such as the page not refreshing and an "internal server error" pop-up) are solved by disabling the SMTP server. Unfortunately this has no impact on the deletion of a booking which still behaves as described above (with nothing written to the log). I suspect that is a different problem best left to a subsequent thread! Matt
nickbro Posted November 3, 2011 Posted November 3, 2011 I will double check the delete routine checks to see what happens when SMTP is disabled
nickbro Posted November 3, 2011 Posted November 3, 2011 Can you try the attached DLL, it will perform additional logging in the HAP+ Event Viewer
mattgrimley Posted November 3, 2011 Author Posted November 3, 2011 Still not playing. The only things being written to the log are file downloads from hap/download. I have tried it both with SMTP Server enabled and disabled..
nickbro Posted November 3, 2011 Posted November 3, 2011 This is for the booking system now, when you run the booking system and remove a booking it should write some events to the HAP+ Event Log, some debug information
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now