Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/319.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 获取错误:无法加载一个或多个请求的类型。有关详细信息,请检索LoaderExceptions属性_C#_Asp.net_Ajax - Fatal编程技术网

C# 获取错误:无法加载一个或多个请求的类型。有关详细信息,请检索LoaderExceptions属性

C# 获取错误:无法加载一个或多个请求的类型。有关详细信息,请检索LoaderExceptions属性,c#,asp.net,ajax,C#,Asp.net,Ajax,我在服务器上上载网站时遇到此错误。即使我在visual studio中的本地服务器上运行它,它也可以正常工作。请帮助我解决此问题。我正在将visual studio 2012与sql server 2008一起使用。项目文件夹外还有一个packages文件夹,可能我也需要上载dat。请帮助 错误我得到: Server Error in '/' Application. Unable to load one or more of the requested types. Retrieve the

我在服务器上上载网站时遇到此错误。即使我在visual studio中的本地服务器上运行它,它也可以正常工作。请帮助我解决此问题。我正在将visual studio 2012与sql server 2008一起使用。项目文件夹外还有一个packages文件夹,可能我也需要上载dat。请帮助

错误我得到:

Server Error in '/' Application.

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

    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.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

    Source Error: 


    Line 96:          
    Line 97: 
    Line 98:         <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>
    Line 99:      
    Line 100:<header>

    Source File: g:\pleskvhosts\hitchtechnologies.com\manshasweets.hitchtechnologies.com\MasterPage.master    Line: 98 

    Stack Trace: 


    [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() +4
       System.Reflection.Assembly.GetTypes() +61
       AjaxControlToolkit.ToolkitScriptManagerConfig..cctor() in ToolkitScriptManagerConfig.cs:32

    [TypeInitializationException: The type initializer for 'AjaxControlToolkit.ToolkitScriptManagerConfig' threw an exception.]
       AjaxControlToolkit.ToolkitScriptManager..ctor() in ToolkitScriptManager.cs:114
       ASP.masterpage_master.__BuildControlToolkitScriptManager1() in g:\pleskvhosts\hitchtechnologies.com\manshasweets.hitchtechnologies.com\MasterPage.master:98
       ASP.masterpage_master.__BuildControlform1() in g:\pleskvhosts\hitchtechnologies.com\manshasweets.hitchtechnologies.com\MasterPage.master:93
       ASP.masterpage_master.__BuildControlTree(masterpage_master __ctrl) in g:\pleskvhosts\hitchtechnologies.com\manshasweets.hitchtechnologies.com\MasterPage.master:1
       ASP.masterpage_master.FrameworkInitialize() in g:\pleskvhosts\hitchtechnologies.com\manshasweets.hitchtechnologies.com\MasterPage.master.cs:912308
       System.Web.UI.UserControl.InitializeAsUserControlInternal() +32
       System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +655
       System.Web.UI.Page.get_Master() +54
       System.Web.UI.Page.ApplyMasterPage() +14
       System.Web.UI.Page.PerformPreInit() +45
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +335

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18056
“/”应用程序中出现服务器错误。 无法加载一个或多个请求的类型。有关详细信息,请检索LoaderExceptions属性。 描述:执行当前web请求期间发生未处理的异常。请查看堆栈跟踪以了解有关错误的更多信息以及错误在代码中的起源。 异常详细信息:System.Reflection.ReflectionTypeLoadException:无法加载一个或多个请求的类型。有关详细信息,请检索LoaderExceptions属性。 源错误: 第96行: 第97行: 第98行: 第99行: 第100行: 源文件:g:\pleskvhosts\hitchtechnologies.com\manshasweets.hitchtechnologies.com\MasterPage.masterline:98 堆栈跟踪: [ReflectionTypeLoadException:无法加载一个或多个请求的类型。有关详细信息,请检索LoaderExceptions属性。] System.Reflection.RuntimeModule.GetTypes(RuntimeModule)+0 System.Reflection.RuntimeModule.GetTypes()+4 System.Reflection.Assembly.GetTypes()+61 ToolkitScriptManagerConfig.cs中的AjaxControlToolkit.ToolkitScriptManagerConfig..cctor():32 [TypeInitializationException:'AjaxControlToolkit.ToolkitScriptManagerConfig'的类型初始值设定项引发异常。] ToolkitScriptManager.cs:114中的AjaxControlToolkit.ToolkitScriptManager..ctor() ASP.masterpage\u master.\u BuildControlToolkitScriptManager1()位于g:\pleskvhosts\hitchtechnologies.com\manshasweets.hitchtechnologies.com\masterpage.master:98 g:\pleskvhosts\hitchtechnologies.com\manshasweets.hitchtechnologies.com\masterpage.master中的ASP.masterpage\u master.\u BuildControlform1():93 ASP.masterpage\u master.\u构建控制树(masterpage\u master\u ctrl),位于g:\pleskvhosts\hitchtechnologies.com\manshasweets.hitchtechnologies.com\masterpage.master:1 g:\pleskvhosts\hitchtechnologies.com\manshasweets.hitchtechnologies.com\masterpage.master.cs:912308中的ASP.masterpage\u master.FrameworkInitialize() System.Web.UI.UserControl.InitializeAsUserControlInternal()+32 CreateMaster(TemplateControl所有者、HttpContext上下文、VirtualPath主页面文件、IDictionary contentTemplateCollection)+655 System.Web.UI.Page.get_Master()+54 System.Web.UI.Page.ApplyMasterPage()+14 System.Web.UI.Page.PerformPreInit()+45 System.Web.UI.Page.ProcessRequestMain(布尔includeStagesBeforeAsyncPoint,布尔includeStagesAfterAsyncPoint)+335 版本信息:Microsoft.NET Framework版本:4.0.30319;ASP.NET版本:4.0.30319.18056 这是我的web.config。如果我做错了一件事,请帮助我:

<?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <connectionStrings>
    <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
  </connectionStrings>
  <appSettings>

    <add key="connectionString" value="Data Source=Node-6-PC;Initial Catalog=dbMansha;user id=sa; password=hitch@123;"/>

    <add key="SiteFileFolder" value=""/>
  </appSettings>
  <system.web>
    <sessionState cookieless="false" regenerateExpiredSessionId="true" timeout="129600" />
    <globalization culture="en-GB"/>
    <compilation debug="true" targetFramework="4.5">

    </compilation>
    <httpRuntime maxRequestLength="12000" useFullyQualifiedRedirectUrl="true" executionTimeout="45"/>
    <authentication mode="Forms">

      <forms timeout="129600"/>
    </authentication>
    <membership>
      <providers>
        <clear/>
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>
      </providers>
    </membership>
    <profile>
      <providers>
        <clear/>
        <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
      </providers>
    </profile>
    <roleManager enabled="false">
      <providers>
        <clear/>
        <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/>
        <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/>
      </providers>
    </roleManager>
  </system.web>

</configuration>

需要将ajax 4.5更改为4.0。而且成功了。

只要把



尝试将另一个模拟应用程序上载到使用ajax control toolkit的服务器,并验证其是否有效……它给出了相同的错误。您的web.config应该有如下所示的条目:如果在设计模式下将toolscriptmanager拖到aspx页面上,这些条目应该自动显示。