ASP.NET machinekey settings causing error on Firefox but working on Internet Explorer


Previously we are experiencing frequent "Validation of viewstate MAC failed." error. Our app is deloyed on a web farm, and we found out that to fix this we should add machinekey settings on our web.config.

After adding machinekey settings to our config, On Firefox, we are now experiencing an error "The system cannot find the file specified".

Server Error in '/' Application.
The system cannot find the file specified
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.ComponentModel.Win32Exception: The system cannot find the file specified

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:

[Win32Exception (0x80004005): The system cannot find the file specified]

[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.)]
   System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +345
   System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +156

Our site is now ONLY working with Internet Explorer.

Troubleshooting done:

  1. Add and remove machinekey settings in web.config. When machinekey is removed, site is working with both Firefox and IE. If machinekey exists in config, IE is working and Firefox throwing the error.
  2. Tried different machinekey and validationkey, same issue.
  3. Changed connectionstring datasource to FQDN instead of hostname, same error.

My other guess: machinekey is messing with the SSL certificate, but I'm not sure how to fix this.

If anyone have any experience on fixing this kind of issue, please help. Thank you in advance.
asked on Stack Overflow Mar 16, 2020 by jomsk1e

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0