asp.net - 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
System.Data.ProviderBase.DbConnectionFactory.TryGetConnec
Our site is now ONLY working with Internet Explorer.
Troubleshooting done:
- 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.
- Tried different machinekey and validationkey, same issue.
- 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.
解决方案
推荐阅读
- google-bigquery - BigQuery:如何进行半左连接?
- python - 如何使用从python中的tkinter askdirectory获得的路径作为原始路径?
- ios - 如何在 React Native 中处理屏幕上 1000 个组件的性能?
- blockchain - 将数据存储到区块链中
- java - 有没有可能使用 CompositeDisposable 导致 OOM?
- javascript - 在 MarkLogic Javascript 中删除重复的元素父名称
- ruby-on-rails - 如何在 Rails 中将标识符设置为整数?
- php - 是否可以在 PHP 中翻译“试图获取非对象的属性”错误?
- php - 如何将下拉列表中选择的值传递给控制器然后保存
- r - 针对 4 个列表检查 data.frame 列(字符)