Как исправить проблему хостинга Windows Hostgator ToolkitScriptManager? - PullRequest
0 голосов
/ 22 мая 2019

Я пытаюсь разместить свой сайт на общедоступном сервере Windows Hostgator.in.Я использовал .Net 4.6.1 Framework для разработки.Поддержка Hostgator .Net Framework 4.7.03062.Я получаю ошибку Ajax ToolkitScriptManager как «Невозможно загрузить один или несколько запрошенных типов. Получите свойство LoaderExceptions для получения дополнительной информации».

Я попытался изменить .Net framework на 4.0, а также попытался добавить конфигурацию полного доверияно это не сработало.


<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.web.extensions>
    <scripting>
      <webServices>
        <jsonSerialization maxJsonLength="2147483647" />
      </webServices>
    </scripting>
  </system.web.extensions>
  <appSettings>
    <add key="IsServer" value="0" />
    <add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />
  </appSettings>
  <system.web>

    <customErrors mode="Off"></customErrors>
    <compilation debug="true" targetFramework="4.6.1"/>
    <httpRuntime maxRequestLength="1048576" targetFramework="4.6.1"/>
  </system.web>
</configuration>

Сообщение об ошибке

[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
   System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0
   System.Reflection.RuntimeModule.GetTypes() +9
   System.Reflection.Assembly.GetTypes() +61
   AjaxControlToolkit.ToolkitScriptManagerConfig..cctor() +68

[TypeInitializationException: The type initializer for 'AjaxControlToolkit.ToolkitScriptManagerConfig' threw an exception.]
   AjaxControlToolkit.ToolkitScriptManager..ctor() +62
   ASP.masterpage_mainmaster_master.__BuildControlToolkitScriptManager1() in d:\inetpub\vhosts\mywebsite.org\httpdocs\MasterPage\MainMaster.Master:112
   ASP.masterpage_mainmaster_master.__BuildControlform1() in d:\inetpub\vhosts\mywebsite.org\httpdocs\MasterPage\MainMaster.Master:111
   ASP.masterpage_mainmaster_master.__BuildControlTree(masterpage_mainmaster_master __ctrl) in d:\inetpub\vhosts\mywebsite.org\httpdocs\MasterPage\MainMaster.Master:1
   ASP.masterpage_mainmaster_master.FrameworkInitialize() in App_Web_csfjdume.0.cs:0
   System.Web.UI.UserControl.InitializeAsUserControlInternal() +36
   System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +672
   System.Web.UI.Page.get_Master() +55
   System.Web.UI.Page.ApplyMasterPage() +14
   System.Web.UI.Page.PerformPreInit() +51
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +296

Если я установил уровень доверия = "Полный" в web.config, я получаю следующую ошибку

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

Parser Error Message: This configuration section cannot be used at this path.  This happens when the site administrator has locked access to this section using <location allowOverride="false"> from an inherited configuration file.

Source Error: 

An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Source File: D:\INETPUB\VHOSTS\mywebsite.org\httpdocs\web.config    Line: 19 

...