Answer
PROBLEM
Affected users are being prompted for credentials when logging in to MailArchiver, even though Windows Authentication is selected. The following errors might be displayed when loading the web interface:
Failed to initialize. Non controlled 500 error. Please try test again manually!
Or...
Server Error in '/MailArchiver' Application.
Or...
Server Error in '/MailArchiver' Application.
Root element is missing.
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.Xml.XmlException: Root element is missing.
Or...
"System.Xml.XmlException: Unexpected end of file has occurred. Line xx, position xx" (xx value may vary in different cases)
ENVIRONMENT
- GFI MailArchiver 2014 or older
- In GFI Archiver 2015 functionality was introduced to add resilience in this area. ASPNET should detect a corrupt ASPNET profile file, rename it to .CORRUPT and create a fresh one automatically.
- All supported environments
SOLUTION
Perform the following for the users having this issue:
- Browse to ..\GFI\MailArchiver\ASPNET\UI\Profiles
- Delete the profile file of users who are having issues (the cookie files are named "Domain_username")
- If the files cannot be deleted, stop/start the WWW service
- Log in to the GFI MailArchiver website with this user again. The user's profile file will be automatically recreated in the Profiles folder
CAUSE
The user's ASPNET profile is corrupt (for example the XML content of the file is invalid or the file is blank).