Jump to content
Justin Smith

"The page cannot be displayed because an internal server error has occurred."

Recommended Posts

I'm not sure what happened but all of a sudden the error "The page cannot be displayed because an internal server error has occurred." whenever we try and open our PasswordState site.  I've tried the usual rebooting, restarting IIS, etc, and nothing makes any difference.  I also tried to do the "aspnet_regiis -i" command but get the following error: 

 

PS C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319> .\aspnet_regiis -i
Microsoft (R) ASP.NET RegIIS version 4.0.30319.0
Administration utility to install and uninstall ASP.NET on the local machine.
Copyright (C) Microsoft Corporation.  All rights reserved.
Start installing ASP.NET (4.0.30319.0).
This option is not supported on this version of the operating system.  Administrators should instead install/uninstall A
SP.NET 4.5 with IIS8 using the "Turn Windows Features On/Off" dialog,  the Server Manager management tool, or the dism.e
xe command line tool.  For more details please see http://go.microsoft.com/fwlink/?LinkID=216771.
Finished installing ASP.NET (4.0.30319.0).
PS C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>


I'm assuming it has to do with the fact that it's Server 2016 but I'm not sure where to go from here.  Can someone give me a hand?

Share this post


Link to post
Share on other sites

Hi Justin,

 

Sorry you're having some issues, and this is quite strange for this to just have started happening for you. in IIS, if you click on the site and then double click on the 'Authentication' icon, does it report any errors in the web.config file? Also, in the application Event Log on your web server, does it report any additional error information - we're assuming this is a server 500 error, and there are multiple different types of these errors.

Let us know the results to the two questions above, and we'll see if we can figure this out.

Regards

Click Studios

Share this post


Link to post
Share on other sites

Alright so in the Authentication section, there's no errors and the settings are as follows:

 

  • Anonymous: Enabled
  • ASP.NET Impersonation: Disabled
  • Forms Authentication: Disabled
  • Windows Authentication: Enabled

I find that a bit weird because we usually use the webpage to login rather than the popup box, but after switching them (enabling forms-based and disabling Windows auth) and then restarting IIS, the error persisted.

 

There are no logs in the Event Log that refer to these events.

Share this post


Link to post
Share on other sites

Hi Justin,

You should not need to enable Forms Authentication at all - only Anonymous or Windows should be needed, and Anonymous always overrides Windows Authentication.

Since there are no errors in the application event log, and non when you browser settings in IIS, we're really not sure what has happened to your Windows environment - and Procmon.exe is not really a tool designed for troubleshooting IIS issues.

If you are unable to figure out what's changed which has cause this, all we can suggest is moving your install to a different server - if you're able to. The following instructions below will help with this:

 

https://www.clickstudios.com.au/documentation/move-new-database-server.html

https://www.clickstudios.com.au/documentation/move-new-web-server.html

 

Regards

Click Studios

Share this post


Link to post
Share on other sites

My current set up is both the IIS and DB servers are one and the same.  If I uninstall the PasswordState software from the server, remove the IIS site, and reinstall it allowing it to recreate the IIS site itself, will it still be able to re-connect to the DB server (since the name of the server won't be changing)?  All I need to do is backup the web.config file, correct?

Share this post


Link to post
Share on other sites

Hi Justin,

 

Yes, you just need to replace the web.config file after re-installing, and it should connect back to the database fine.

Regards

Click Studios

Share this post


Link to post
Share on other sites

Alright so I tried reinstalling and it still wasn't working but these events showed up in the Application Event Log:

 

ID: 0




Secret1 Encryption Key not found in web.config file.

ID: 0




Secret2 Encryption Key not found in web.config file.

ID: 0




An error has occurred executing the call 'QuerySystemSettings' - Specified key is not a valid size for this algorithm.&stacktrace=   at System.Security.Cryptography.SymmetricAlgorithm.set_Key(Byte[] value)



   at PasswordstateService.PasswordstateService.AES_Decrypt(Byte[] myByte)



   at PasswordstateService.PasswordstateService.QueryPrivilegedAccount(String PrivilegedAccountID, String Description, Boolean ExcludeNotRequiredRecord)



   at PasswordstateService.PasswordstateService.QuerySystemSettings()

ID: 0




An error has occurred executing the call 'QueryBackupSettings' - Specified key is not a valid size for this algorithm.&stacktrace=   at System.Security.Cryptography.SymmetricAlgorithm.set_Key(Byte[] value)



   at PasswordstateService.PasswordstateService.AES_Decrypt(Byte[] myByte)



   at PasswordstateService.PasswordstateService.QueryBackupSettings()

 

I confirmed that nowhere in the web.config file are there settings for Secret1 or Secret2.  I looked at the new web.config from the new install and saw that the entries were there but blank like this:




    <add key="Secret1" value="" />



    <add key="Secret2" value="" />

And so I copied them into my web.config.  After I reset the PasswordState, IISAdmin and W3SVC services, attempting to access the site gives me the same HTML and .NET(?) errors, but at least it's not complaining that Secret1 and Secret2 don't exist.

 

Any other suggestions?  Can someone please get in touch with me ASAP?  We need to get this up and running as soon as possible.

 

Share this post


Link to post
Share on other sites

Hi Justin,

 

It sounds like to me that you have installed a later version of Passwordstate, and not the current version you were using - is this correct? This is the only thing which would cause these secret key issues, as there is newer encryption in later versions of Passwordstate. What you will need to do to fix this is:

  • Using SQL Server Management Studio, look in the SystemSettings table for the BuildNo field
  • Now that you have the correct build number, download the appropriate build from here - https://www.clickstudios.com.au/previous-builds.html
  • Uninstall the current version of Passwordstate, and install the correct build above
  • Now copy your old web.config file into the Passwordstate folder, and restart the Passwordstate Windows Service - make sure you copy this old file in there, and don't try and edit the existing 'new' web.config file at all

If you still see this error page after doing this, then there is something corrupt on your server. You will need to follow the instructions provided previously to move your install to a new server - again installing the correct build here, not the latest build.

We hope this helps.

Regards
Click Studios

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×