KYS Posted January 22, 2014 Posted January 22, 2014 Hey all, Wondering if I could get some help please. Overcame a few issues trying to get a fresh install working on Server 2012 R2 (mainly services activated had a Cross against it and the tabs weren't allowing access) However, resolved these issues and now struggling with the following. All setup pages are completed (using the currently in use setup on an old server) but two things; Firstly, after changing the web.config file (as instructed) to restrict access to the setup.aspx page it wont allow any access to it at all. At the moment it is still set to allow * until I figure out what is going wrong. Secondly, when going to the HAP in the normal manner (not via the setup), I get multiple issues. Home page - !Token Cookie Missing, user not logged in correctly. !Invalid Administrator Credentials, you may need to get your administrator to reset the HAP+ Settings for Active Directory (x2). My Files - !Token Cookie Missing, user not logged in correctly (x2). How can I resolve the login issues? This version is not live yet until I have it running without issues. However, I am excited about moving over to the latest version. Currently using version 8 and have been for quite a while. I look forward to your responses. I want to get this up and running ASAP! Thank you in advance. KYS
nickbro Posted January 22, 2014 Posted January 22, 2014 On the setup page, reenter the administrators password and save, it could be an out of date password
KYS Posted January 22, 2014 Author Posted January 22, 2014 Hey, I have tried this but no success I am afraid. Still same errors throughout. It is as though it is not correctly linked with AD. It would only show the AD tree on the setup page if the domain account admin password was present. Seemed a little bit buggy. Maybe I have missed a change or something the config file? Regards, KYS
nickbro Posted January 22, 2014 Posted January 22, 2014 Security policy means that the AD tree is only loaded when the admin password is entered. Check you have enabled local logon rights on that server for all users to log in, apart from that I'm a bit stumped, it doesn't seem to be loading correctly
KYS Posted January 23, 2014 Author Posted January 23, 2014 I have done all that now and made a few other changes which instead of accessing the application straight away it prompts for login. However - Ive set the authorisation for deny ? and allow IT Staff (the group I defined in the AD setup section) but I now get the following error when I try log in (with and without an admin account): [h=1]Server Error in '/HAP' Application. [/h] [h=2]Object reference not set to an instance of an object.[/h]Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Source Error: [TABLE=width: 100%] [TR] [TD]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. [/TD] [/TR] [/TABLE] Stack Trace: [TABLE=width: 100%] [TR] [TD] [NullReferenceException: Object reference not set to an instance of an object.] HAP.Data.SQL.WebEvents.Log(WebTrackerEvent Event) +122 HAP.Web.Login.login_Click(Object sender, EventArgs e) +2202 System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +152 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3803[/TD] [/TR] [/TABLE] Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.33440
nickbro Posted January 23, 2014 Posted January 23, 2014 Ok, 1st one, check the anonumous user identity is set to application pool identity in IIS 2nd, make sure the provider for the tracker is set to XML or a sql connection string's name in the web.config file, needs to be left as XML by default
KYS Posted February 11, 2014 Author Posted February 11, 2014 Hi Nick, Sorry for the delayed response. I have made sure that both of the above settings are set as suggested and they are. I am using a SQLConnectionString rather than XML. Not sure where to go from here. Below is the error: [h=1]Server Error in '/HAP' Application.[/h][h=2]Method is only supported if the user name parameter matches the user name in the current Windows Identity.[/h] Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Configuration.Provider.ProviderException: Method is only supported if the user name parameter matches the user name in the current Windows Identity. 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: [ProviderException: Method is only supported if the user name parameter matches the user name in the current Windows Identity.] System.Web.Security.WindowsTokenRoleProvider.GetCurrentWindowsIdentityAndCheckName(String userName) +3564836 System.Web.Security.WindowsTokenRoleProvider.GetCurrentTokenAndCheckName(String userName) +49 System.Web.Security.WindowsTokenRoleProvider.GetRolesForUser(String username) +143 HAP.AD.RoleProvider.GetRolesForUser(String username) +94 System.Web.Security.RolePrincipal.IsInRole(String role) +12035032 HAP.Web.Default.Page_Load(Object sender, EventArgs e) +692 System.Web.UI.Control.LoadRecursive() +71 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.33440 Regards, KYS
nickbro Posted February 11, 2014 Posted February 11, 2014 Are you using standard forms authentication or Windows authentication inside HAP? What's the connection string you are now using?
KYS Posted February 11, 2014 Author Posted February 11, 2014 Forms authentication is set up in IIS for HAP. The connection on HAP under tracking - Provider is set to: SQLConnectionString and the string is: Server=sqlserver\itservices;Database=hap;User ID=homeaccessplus;Password=●●●●●●●●●●●●●● Please let me know if I can provide you with any further info. Regards, KYS
nickbro Posted February 11, 2014 Posted February 11, 2014 (edited) ok, that's correct, that's like the one I'm using Server=cri-svr-002;Database=hap;User Id=hap;Password=x Which page do you get this error on? Edited February 11, 2014 by nickbro
KYS Posted February 11, 2014 Author Posted February 11, 2014 This is when I am just starting out - I can access the setup.aspx page fine. When I go to the default page I get the login screen - I put in my credentials and click 'Login' and thats when this error occurs. I have not changed the setup.aspx age to just allow domain admins as of yet, but this shouldn't affect the accessibility via the default page?
nickbro Posted February 11, 2014 Posted February 11, 2014 Nope it shouldn't. Can you try switching back to the XML provider and see if it works
KYS Posted February 11, 2014 Author Posted February 11, 2014 I have tried this before. But just changed it back to XML and the error is similar/same: [h=1]Server Error in '/HAP' Application.[/h][h=2]Method is only supported if the user name parameter matches the user name in the current Windows Identity.[/h] Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Configuration.Provider.ProviderException: Method is only supported if the user name parameter matches the user name in the current Windows Identity. 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: [ProviderException: Method is only supported if the user name parameter matches the user name in the current Windows Identity.] System.Web.Security.WindowsTokenRoleProvider.GetCurrentWindowsIdentityAndCheckName(String userName) +3564836 System.Web.Security.WindowsTokenRoleProvider.GetCurrentTokenAndCheckName(String userName) +49 System.Web.Security.WindowsTokenRoleProvider.GetRolesForUser(String username) +143 HAP.AD.RoleProvider.GetRolesForUser(String username) +94 System.Web.Security.RolePrincipal.IsInRole(String role) +12035032 HAP.Web.Default.Page_Load(Object sender, EventArgs e) +692 System.Web.UI.Control.LoadRecursive() +71 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.33440
nickbro Posted February 11, 2014 Posted February 11, 2014 Can you try replacing the web.config file with a fresh copy from main v9.7 release, looks like something has become corrupt, also try backing up your hapconfig.xml file and then delete it, hopefully HAP+ will recreate it
KYS Posted February 12, 2014 Author Posted February 12, 2014 Hey, I replaced the web.config file and commented out the bit for IIS 8. Still then got the same error. I then backed up and removed the hapconfig.xml file. This then defaulted to a blank setup page and indicated that services were not activated. I returned the hapconfig file and left the new web.config and again this then indicated services were not activated. The services only appear to be activated using my original hapconfig.xml and web.config files together. Regards, KYS
KYS Posted February 12, 2014 Author Posted February 12, 2014 Service - Endpoint not found! I thought this had been resolved with help from another member of staff as it stumped me.. Maybe my config and xml files make the services appear activated but actually they are not which could be causing the underlying problem?
nickbro Posted February 12, 2014 Posted February 12, 2014 Check /hap/api/setup/help, service endpoint not found is a good sign, if it was 404 then that's bad
KYS Posted February 13, 2014 Author Posted February 13, 2014 What should I be looking for on the help. All of the Post/Get when click on state 'Cannot infer schema. The request body is wrapped.'
nickbro Posted February 13, 2014 Posted February 13, 2014 If you get a page, that is all, shows it's working
KYS Posted February 13, 2014 Author Posted February 13, 2014 Hey, Sorry. The /hap/api/setup and /hap/api/setup/help do not work using a new web.config or hapconfig.xml. (They working with my existing files) The error refers to binding: Could not find a base address that matches scheme http for the endpoint with binding WebHttpBinding. Registered base address schemes are [https]. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: Could not find a base address that matches scheme http for the endpoint with binding WebHttpBinding. Registered base address schemes are [https]. Also an alternate error appears: Line 250: Line 251: Line 252: Line 253: Line 254: These errors are resolved in my edited files but not the new ones.
nickbro Posted February 13, 2014 Posted February 13, 2014 Make sure to use HTTPS, if that fails, remove the HTTP binding from IIS
KYS Posted February 14, 2014 Author Posted February 14, 2014 Hi Nick, We don't have any HTTP binding set. It is only set to HTTPS
KYS Posted February 14, 2014 Author Posted February 14, 2014 Hi Nick, I have managed to get it working intermittently. I am trying to add mappings and if I put them in one by one and save it appears t work. However, if I then wish to make changes to that mapping or even delete it - I am faced with the following error 'The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter HAP:Web.API:origunc. The InnerException message was 'There was an error deserializing the object of type System.String. Encountered unexpected character 'h'.'. Please see InnerException for more details. I am determined to get this fixed an running for after half term. Regards,
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