ASP. NET настройки машинного ключа, вызывающие ошибку на Firefox, но работающие в Inte rnet Explorer - PullRequest
0 голосов
/ 16 марта 2020

Ранее мы сталкивались с частой ошибкой "Validation of viewstate MAC failed.". Наше приложение развернуто на веб-ферме, и мы обнаружили, что для исправления этого мы должны добавить machinekey settings в наш web.config.

После добавления настроек машинного ключа в нашу конфигурацию, при Firefox, теперь мы наблюдаем ошибку "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    

Наш сайт теперь работает ТОЛЬКО с Inte rnet Explorer.

Устранение неполадок выполнено:

  1. Добавить и удалить настройки машинного ключа в web.config. Когда машина удалена, сайт работает как с Firefox, так и с IE. Если машинный ключ существует в конфигурации, IE работает и Firefox выдает ошибку.
  2. Пробовал разные машинный ключ и ключ проверки, та же проблема.
  3. Изменен источник данных строки подключения на полное доменное имя вместо имени хоста, та же ошибка.

My other guess: машина связывается с сертификатом SSL, но я не уверен, как это исправить.

Если у кого-то есть опыт по устранению подобных проблем, пожалуйста, помогите. Заранее спасибо.

...