当我在服务器上上传我的网站时遇到此错误。即使当我在 Visual Studio 中的本地服务器上运行它时它工作正常。请帮助我解决这个问题。我正在使用 Visual Studio 2012 和 sql Server 2008 .项目文件夹外还有一个packages文件夹,可能我也需要上传数据..请帮忙
错误我收到:
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
这是我的 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>
最佳答案
直接放
<system.web>
<trust level="Full" />
关于c# - 获取错误 : Unable to load one or more of the requested types. 检索 LoaderExceptions 属性以获取更多信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23778669/