This is a migrated thread and some comments may be shown as answers.

Could not load file or assembly

1 Answer 254 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 24 Sep 2009, 02:42 AM
I have a small application using the radgrid that has work perfectly. I have re-published the application and now certain pages do not work. I re-created a page and found the exact line that is causing the error.

The error I am receiving is:

 

Server Error in '/necaadmin' Application.

Could not load file or assembly 'System, Version=1.0.7.30072, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. 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.IO.FileNotFoundException: Could not load file or assembly 'System, Version=1.0.7.30072, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. 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.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'System, Version=1.0.7.30072, Culture=neutral, PublicKeyToken=c5687fc88969c44d' could not be loaded.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Stack Trace:

[FileNotFoundException: Could not load file or assembly 'System, Version=1.0.7.30072, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.]
   System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) +0
   System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +64
   System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +58
   System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +65
   System.Security.Util.XMLUtil.GetClassFromElement(SecurityElement el, Boolean ignoreTypeLoadFailures) +119
   System.Security.Util.XMLUtil.CreatePermission(SecurityElement el, PermissionState permState, Boolean ignoreTypeLoadFailures) +1434
   System.Security.SecurityElement.ToPermission(Boolean ignoreTypeLoadFailures) +23
   System.Security.PermissionSet.CreatePerm(Object obj, Boolean ignoreTypeLoadFailures) +1042
   System.Security.PermissionSet.CreatePerm(Object obj, Boolean ignoreTypeLoadFailures) +941
   System.Security.PermissionSet.CreatePermission(Object obj, Int32 index) +17
   System.Security.PermissionSetEnumeratorInternal.MoveNext() +7515060
   System.Security.PermissionSet.ToXml(String permName) +207
   System.Security.PermissionSet.ToXml() +12
   System.Security.SecurityException..ctor(String message, AssemblyName assemblyName, PermissionSet grant, PermissionSet refused, MethodInfo method, SecurityAction action, Object demanded, IPermission permThatFailed, Evidence evidence) +146
   System.Security.SecurityException.MakeSecurityException(AssemblyName asmName, Evidence asmEvidence, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) +579
   System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) +143
   System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) +100
   System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, Boolean throwException) +318
   System.Security.PermissionSetTriple.CheckSetDemand(PermissionSet demandSet, PermissionSet& alteredDemandset, RuntimeMethodHandle rmh) +69
   System.Security.PermissionListSet.CheckSetDemand(PermissionSet pset, RuntimeMethodHandle rmh) +150
   System.Security.PermissionListSet.DemandFlagsOrGrantSet(Int32 flags, PermissionSet grantSet) +30
   System.Threading.CompressedStack.DemandFlagsOrGrantSet(Int32 flags, PermissionSet grantSet) +40
   System.Security.CodeAccessSecurityEngine.ReflectionTargetDemandHelper(Int32 permission, PermissionSet targetGrant, CompressedStack securityContext) +123
   System.Security.CodeAccessSecurityEngine.ReflectionTargetDemandHelper(Int32 permission, PermissionSet targetGrant) +54

[MethodAccessException: System.Runtime.CompilerServices.StrongBox`1..ctor(System.__Canon)]
   System.Reflection.MethodBase.PerformSecurityCheck(Object obj, RuntimeMethodHandle method, IntPtr parent, UInt32 invocationFlags) +0
   System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +470
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +1051
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +111
   System.Linq.Expressions.ExpressionCompiler.AddGlobal(Type type, Object value) +75
   System.Linq.Expressions.ExpressionCompiler.GenerateConstant(ILGenerator gen, Type type, Object value, StackType ask) +946
   System.Linq.Expressions.ExpressionCompiler.GenerateConstant(ILGenerator gen, ConstantExpression c, StackType ask) +20
   System.Linq.Expressions.ExpressionCompiler.Generate(ILGenerator gen, Expression node, StackType ask) +193
   System.Linq.Expressions.ExpressionCompiler.GenerateArgs(ILGenerator gen, ParameterInfo[] pis, ReadOnlyCollection`1 args) +157
   System.Linq.Expressions.ExpressionCompiler.GenerateMethodCall(ILGenerator gen, MethodInfo mi, ReadOnlyCollection`1 args, Type objectType) +71
   System.Linq.Expressions.ExpressionCompiler.GenerateMethodCall(ILGenerator gen, MethodCallExpression mc, StackType ask) +365
   System.Linq.Expressions.ExpressionCompiler.Generate(ILGenerator gen, Expression node, StackType ask) +358
   System.Linq.Expressions.ExpressionCompiler.GenerateLambda(LambdaExpression lambda) +206
   System.Linq.Expressions.ExpressionCompiler.CompileDynamicLambda(LambdaExpression lambda) +74
   System.Linq.Expressions.ExpressionCompiler.Compile(Expression`1 lambda) +89
   System.Linq.EnumerableExecutor`1.Execute() +84
   System.Linq.EnumerableExecutor`1.ExecuteBoxed() +23
   System.Linq.EnumerableQuery`1.System.Linq.IQueryProvider.Execute(Expression expression) +83
   Telerik.Web.UI.GridDynamicQueryable.Count(IQueryable source) +143
   Telerik.Web.UI.GridDataTableFromEnumerable.FillData35() +216
   Telerik.Web.UI.GridDataTableFromEnumerable.FillData() +626
   Telerik.Web.UI.GridResolveEnumerable.Initialize() +32
   Telerik.Web.UI.GridResolveEnumerable.EnsureInitialized() +20
   Telerik.Web.UI.GridEnumerableFromDataView..ctor(GridTableView owner, DataView dataView, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields) +158
   Telerik.Web.UI.GridDataSourceHelper.CreateGridEnumerable(GridTableView owner, IEnumerable enumerable, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields) +76
   Telerik.Web.UI.GridDataSourceHelper.GetResolvedDataSource(GridTableView owner, Object dataSource, String dataMember, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields) +98
   Telerik.Web.UI.GridTableView.get_ResolvedDataSource() +141
   Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +33
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +57
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +114
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
   Telerik.Web.UI.GridTableView.PerformSelect() +4
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
   Telerik.Web.UI.GridTableView.DataBind() +239
   Telerik.Web.UI.RadGrid.DataBind() +80
   eventgrid.GridDataLoad(Boolean blnWantDataBind) +153
   eventgrid.Page_Load(Object sender, EventArgs e) +65
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

 


 

Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

 

 

 

 

 

My code is as follows:

 

<?

 

xml version="1.0"?>

 

<!--

 

 

Note: As an alternative to hand editing this file you can use the

web admin tool to configure settings for your application. Use

the Website->Asp.Net Configuration option in Visual Studio.

A full list of settings and comments can be found in

machine.config.comments usually located in

\Windows\Microsoft.Net\Framework\v2.x\Config

 

 

 

 

-->

<

 

configuration>

 

<

 

configSections>

 

<

 

sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

 

<

 

sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

 

<

 

section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />

 

<

 

sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

 

<

 

section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />

 

<

 

section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />

 

<

 

section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />

 

<

 

section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />

 

</

 

sectionGroup>

 

</

 

sectionGroup>

 

</

 

sectionGroup>

 

</

 

configSections>

 

<

 

appSettings />

 

<

 

connectionStrings />

 

<

 

system.web>

 

<!--

 

 

Set compilation debug="true" to insert debugging

symbols into the compiled page. Because this

affects performance, set this value to true only

during development.

 

 

-->

 

<

 

compilation debug="true">

 

<

 

assemblies>

 

<

 

add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

 

<

 

add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

 

<

 

add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

 

<

 

add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

 

<

 

add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

 

<

 

add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

 

<

 

add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

 

<

 

add assembly="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

 

<

 

add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

 

<

 

add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

 

<

 

add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

<

 

add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

 

<

 

add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

 

<

 

add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

</

 

assemblies>

 

</

 

compilation>

 

<!--

 

 

 

 

The <authentication> section enables configuration

of the security authentication mode used by

ASP.NET to identify an incoming user.

 

 

-->

 

<

 

authentication mode="Windows" />

 

<!--

 

 

 

 

The <customErrors> section enables configuration

of what to do if/when an unhandled error occurs

during the execution of a request. Specifically,

it enables developers to configure html error pages

to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">

<error statusCode="403" redirect="NoAccess.htm" />

<error statusCode="404" redirect="FileNotFound.htm" />

</customErrors>

 

 

-->

 

<

 

pages>

 

<

 

controls>

 

<

 

add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

<

 

add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

</

 

controls>

 

</

 

pages>

 

<

 

httpHandlers>

 

<

 

remove verb="*" path="*.asmx" />

 

<

 

add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

<

 

add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

<

 

add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />

 

<

 

add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />

 

</

 

httpHandlers>

 

<

 

httpModules>

 

<

 

add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

</

 

httpModules>

 

</

 

system.web>

 

<

 

system.codedom>

 

<

 

compilers>

 

<

 

compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

 

<

 

providerOption name="CompilerVersion" value="v3.5" />

 

<

 

providerOption name="WarnAsError" value="false" />

 

</

 

compiler>

 

<

 

compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

 

<

 

providerOption name="CompilerVersion" value="v3.5" />

 

<

 

providerOption name="OptionInfer" value="true" />

 

<

 

providerOption name="WarnAsError" value="false" />

 

</

 

compiler>

 

</

 

compilers>

 

</

 

system.codedom>

 

<!--

 

 

The system.webServer section is required for running ASP.NET AJAX under Internet

Information Services 7.0. It is not necessary for previous version of IIS.

 

 

-->

 

<

 

system.webServer>

 

<

 

validation validateIntegratedModeConfiguration="false" />

 

<

 

modules>

 

<

 

remove name="ScriptModule" />

 

<

 

add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

</

 

modules>

 

<

 

handlers>

 

<

 

remove name="WebServiceHandlerFactory-Integrated" />

 

<

 

remove name="ScriptHandlerFactory" />

 

<

 

remove name="ScriptHandlerFactoryAppServices" />

 

<

 

remove name="ScriptResource" />

 

<

 

add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

<

 

add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

<

 

add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

<

 

add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />

 

</

 

handlers>

 

</

 

system.webServer>

 

<

 

runtime>

 

<

 

assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

 

<

 

dependentAssembly>

 

<

 

assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" />

 

<

 

bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />

 

</

 

dependentAssembly>

 

<

 

dependentAssembly>

 

<

 

assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" />

 

<

 

bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />

 

</

 

dependentAssembly>

 

</

 

assemblyBinding>

 

</

 

runtime>

 

<

 

location path="Telerik.Web.UI.WebResource.axd">

 

<

 

system.web>

 

<

 

authorization>

 

<

 

allow users="*"/>

 

</

 

authorization>

 

</

 

system.web>

 

</

 

location>

 

</

 

configuration>

 

 

 

 

<%

@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>

 

<%

@ Register src="wucHeader.ascx" tagname="wucHeader" tagprefix="uc1" %>

 

<%

@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

 

 

 

 

<!

 

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<

 

html xmlns="http://www.w3.org/1999/xhtml">

 

<

 

head runat="server">

 

 

 

 

 

 

<title>Untitled Page</title>

 

 

 

 

 

 

<link href="necaadmin.css" rel="stylesheet" type="text/css" />

 

</

 

head>

 

<

 

body>

 

 

 

 

 

 

<form id="form1" runat="server">

 

 

 

 

 

 

<div>

 

 

 

 

 

 

 

<table align="left" cellpadding="0" cellspacing="0" class="classTblMain">

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

<td></td>

 

 

 

 

 

 

<td>

 

 

 

 

 

 

<telerik:RadScriptManager ID="RadScriptManager1" Runat="server">

 

 

 

 

 

 

</telerik:RadScriptManager>

 

 

 

 

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

 

 

 

 

<AjaxSettings>

 

 

 

 

 

 

<telerik:AjaxSetting AjaxControlID="RadGrid1">

 

 

 

 

 

 

<UpdatedControls>

 

 

 

 

 

 

<telerik:AjaxUpdatedControl ControlID="RadGrid1"

 

 

LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

 

 

 

 

</UpdatedControls>

 

 

 

 

 

 

</telerik:AjaxSetting>

 

 

 

 

 

 

</AjaxSettings>

 

 

 

 

 

 

</telerik:RadAjaxManager>

 

 

 

 

 

 

</td>

 

 

 

 

 

 

<td></td>

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

<td class="classTblMain_TL"></td>

 

 

 

 

 

 

<td class="classTblMain_TC"></td>

 

 

 

 

 

 

<td class="classTblMain_TR"></td>

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

<td class="classTblMain_ML"></td>

 

 

 

 

 

 

<td class="classTblMain_MC">

 

 

 

 

 

 

<uc1:wucHeader ID="wucHeader1" runat="server" />

 

 

 

 

 

 

</td>

 

 

 

 

 

 

<td class="classTblMain_MR"></td>

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

<td class="classTblMain_ML"></td>

 

 

 

 

 

 

<td class="classTblMain_MC"></td>

 

 

 

 

 

 

<td class="classTblMain_MR"></td>

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

<td class="classTblMain_ML"></td>

 

 

 

 

 

 

<td class="classTblMain_MC">

 

 

 

 

 

 

<table align="left" cellpadding="0" cellspacing="0" class="classTblWork">

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

<td class="classTblWork_TL"></td>

 

 

 

 

 

 

<td class="classTblWork_TC"></td>

 

 

 

 

 

 

<td class="classTblWork_TR"></td>

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

<td class="classTblWork_ML"></td>

 

 

 

 

 

 

<td class="classTblWork_MC">

 

 

 

 

 

 

<asp:Label ID="Label1" runat="server" CssClass="mytxt Large Bold" Text="Events"></asp:Label>

 

 

 

 

 

 

</td>

 

 

 

 

 

 

<td class="classTblWork_MR"></td>

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

<td class="classTblWork_ML"></td>

 

 

 

 

 

 

<td class="classTblWork_MC">

 

 

 

 

 

 

<telerik:RadGrid ID="RadGrid1" runat="server" AllowMultiRowSelection="True"

 

 

AllowSorting="True" GridLines="None" Height="350px" Skin="Gray" Width="900px">

 

 

 

 

 

 

<HeaderContextMenu>

 

 

 

 

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

 

 

 

 

</HeaderContextMenu>

 

 

 

 

 

 

<MasterTableView ClientDataKeyNames="id" CommandItemDisplay="Top"

 

 

DataKeyNames="id">

 

 

 

 

 

 

<CommandItemTemplate>

 

 

 

 

 

 

<asp:ImageButton ID="cmdSpace0" runat="server" CausesValidation="False"

 

 

Height="16px" ImageUrl="~/images/spacer_10.png" />

 

 

 

 

 

 

<asp:ImageButton ID="cmdNew" runat="server" CausesValidation="False"

 

 

CommandName="cmdNew" ImageUrl="~/images/page_white.png" ToolTip="New" />

 

 

 

 

 

 

<asp:ImageButton ID="cmdEdit" runat="server" CausesValidation="False"

 

 

CommandName="cmdEdit" Height="16px" ImageUrl="~/images/Edit.png"

 

 

ToolTip="Edit" />

 

 

 

 

 

 

<asp:ImageButton ID="cmdSpace2" runat="server" CausesValidation="False"

 

 

Height="16px" ImageUrl="~/images/spacer_10.png" />

 

 

 

 

 

 

<asp:ImageButton ID="cmdDelete" runat="server" CausesValidation="False"

 

 

CommandName="cmdDelete" Height="16px" ImageUrl="~/images/Delete.png"

 

 

ToolTip="Delete" />

 

 

 

 

 

 

</CommandItemTemplate>

 

 

 

 

 

 

</MasterTableView>

 

 

 

 

 

 

<HeaderStyle Font-Bold="True" Font-Names="Arial" Font-Size="8pt" />

 

 

 

 

 

 

<ClientSettings>

 

 

 

 

 

 

<Selecting AllowRowSelect="True" />

 

 

 

 

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="True" />

 

 

 

 

 

 

</ClientSettings>

 

 

 

 

 

 

<FilterMenu>

 

 

 

 

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

 

 

 

 

</FilterMenu>

 

 

 

 

 

 

<CommandItemStyle Height="30px" />

 

 

 

 

 

 

</telerik:RadGrid>

 

 

 

 

 

 

</td>

 

 

 

 

 

 

<td class="classTblWork_MR"></td>

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

<td class="classTblWork_ML"></td>

 

 

 

 

 

 

<td class="classTblWork_MC">

 

 

 

 

 

 

<asp:LinkButton ID="btnDeleteHide" runat="server" CssClass="myhyp Small"

 

 

OnClick="btnDeleteHide_Click"></asp:LinkButton>

 

 

 

 

 

 

</td>

 

 

 

 

 

 

<td class="classTblWork_MR"></td>

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

<td class="classTblWork_ML"></td>

 

 

 

 

 

 

<td class="classTblWork_MC"></td>

 

 

 

 

 

 

<td class="classTblWork_MR"></td>

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

<td class="classTblWork_BL"></td>

 

 

 

 

 

 

<td class="classTblWork_BC"></td>

 

 

 

 

 

 

<td class="classTblWork_BR"></td>

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

</table>

 

 

 

 

 

 

</td>

 

 

 

 

 

 

<td class="classTblMain_MR"></td>

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

<td class="classTblMain_ML"></td>

 

 

 

 

 

 

<td class="classTblMain_MC"></td>

 

 

 

 

 

 

<td class="classTblMain_MR"></td>

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

<td class="classTblMain_BL"></td>

 

 

 

 

 

 

<td class="classTblMain_BC"></td>

 

 

 

 

 

 

<td class="classTblMain_BR"></td>

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

<td></td>

 

 

 

 

 

 

<td>

 

 

 

 

 

 

<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Behavior="Move"

 

 

Behaviors="None" Height="320px" Modal="True" onclientclose="closeRadWindow"

 

 

ReloadOnShow="True" ShowContentDuringLoad="False" Skin="Black"

 

 

VisibleStatusbar="False" Width="780px">

 

 

 

 

 

 

</telerik:RadWindowManager>

 

 

 

 

 

 

</td>

 

 

 

 

 

 

<td></td>

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

<td></td>

 

 

 

 

 

 

<td>

 

 

 

 

 

 

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server"

 

 

BackColor="Yellow" height="75px" MinDisplayTime="500" Transparency="50"

 

 

width="75px">

 

 

 

 

 

 

<br />

 

 

 

 

 

 

<br />

 

 

 

 

 

 

<br />

 

 

 

 

 

 

<br />

 

 

 

 

 

 

<img alt="Loading..."

 

 

src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'

 

 

style="border:0px;" />

 

 

 

 

 

 

</telerik:RadAjaxLoadingPanel>

 

 

 

 

 

 

</td>

 

 

 

 

 

 

<td></td>

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

</table>

 

 

 

 

 

 

 

</div>

 

 

 

 

 

 

</form>

 

</

 

body>

 

</

 

html>

 




 

 

Partial

 

Class Default2

 

 

Inherits Telerik.Web.UI.RadAjaxPage

 

 

Private MySess As New classSession

 

 

Private MySql As New classSql("necadata", "necadata", False)

 

 

Private MyUtil As New classUtil("necadata", "necadata")

 

 

 

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

 

MySess.SiteProcess(

"root", "eventgrid", True)

 

 

If Not Page.IsPostBack Then

 

 

 

 

 

GridDataLoad(

True)

 

 

End If

 

 

 

 

 

 

End Sub

 

 

 

 

 

 

 

Public Sub GridDataLoad(ByVal blnWantDataBind As Boolean)

 

MySess.SiteProcess(

"root", "eventgrid", True)

 

MySql.sSql =

"SELECT * FROM vNecaEventGrid; "

 

 

 

 

 

MySql.SqlSelect(

"griddata")

 

RadGrid1.DataSource = MySql.ds.Tables(

"griddata")

 

 

'If blnWantDataBind Then RadGrid1.DataBind()

 

 

 

 

 

 

End Sub

 

 

 

 

 

 

 

Protected Sub RadGrid1_ColumnCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridColumnCreatedEventArgs) Handles RadGrid1.ColumnCreated

 

 

Dim MyGridColumn As Object

 

 

 

 

 

 

Dim s As String

 

 

 

 

 

 

Select Case UCase(e.Column.ColumnType)

 

 

Case "GRIDEXPANDCOLUMN" : Exit Sub

 

 

 

 

 

 

Case "GRIDBOUNDCOLUMN" : MyGridColumn = New Telerik.Web.UI.GridBoundColumn

 

 

Case "GRIDDATETIMECOLUMN" : MyGridColumn = New Telerik.Web.UI.GridDateTimeColumn

 

 

Case "GRIDNUMERICCOLUMN" : MyGridColumn = New Telerik.Web.UI.GridNumericColumn

 

 

End Select

 

 

 

 

 

MyGridColumn = e.Column

 

With MyGridColumn

 

s = UCase(.UniqueName)

 

Select Case s

 

 

Case "ID"

 

 

 

 

 

.Visible =

False

 

 

 

 

 

 

Case "EDATE"

 

 

 

 

 

.DataType = System.Type.GetType(

"System.DateTime") : .DataFormatString = "{0:MM/dd/yyyy h:mmt}"

 

 

 

 

 

.ItemStyle.Width = 100 : .ItemStyle.HorizontalAlign = HorizontalAlign.Left

.HeaderStyle.Width = 100 : .HeaderStyle.HorizontalAlign = HorizontalAlign.Left

.HeaderText =

"Date"

 

 

 

 

 

 

Case "LOCATION"

 

 

 

 

 

.ItemStyle.HorizontalAlign = HorizontalAlign.Left

.HeaderStyle.HorizontalAlign = HorizontalAlign.Left

.HeaderText =

"Location"

 

 

 

 

 

 

Case "TOPIC"

 

 

 

 

 

.ItemStyle.HorizontalAlign = HorizontalAlign.Left

.HeaderStyle.HorizontalAlign = HorizontalAlign.Left

.HeaderText =

"Topic"

 

 

 

 

 

 

Case "SPEAKER"

 

 

 

 

 

.ItemStyle.HorizontalAlign = HorizontalAlign.Left

.HeaderStyle.HorizontalAlign = HorizontalAlign.Left

.HeaderText =

"Speaker"

 

 

 

 

 

 

Case "ATTACHFILE"

 

 

 

 

 

.ItemStyle.HorizontalAlign = HorizontalAlign.Left

.HeaderStyle.HorizontalAlign = HorizontalAlign.Left

.HeaderText =

"Attach"

 

 

 

 

 

 

Case Else

 

 

 

 

 

.ReadOnly =

True

 

 

 

 

 

.Visible =

False

 

 

 

 

 

 

End Select

 

 

 

 

 

 

End With

 

 

 

 

 

 

End Sub

 

 

 

 

 

 

 

Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand

 

 

Select Case UCase(e.CommandName)

 

 

Case "CMDEDIT"

 

 

 

 

 

 

'Session("sessJhaAdmin_contacts_code") = RadGrid1.SelectedItems(0).OwnerTableView.DataKeyValues(RadGrid1.SelectedItems(0).ItemIndex)("ID")

 

 

 

 

 

 

'Response.Redirect("contactsopen.aspx")

 

 

 

 

 

 

End Select

 

 

 

 

 

 

End Sub

 

 

 

 

 

 

 

Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource

 

 

'GridDataLoad(False)

 

 

 

 

 

 

End Sub

 

 

 

 

 

 

 

Protected Sub RadGrid1_PageIndexChanged(ByVal source As Object, ByVal e As Telerik.Web.UI.GridPageChangedEventArgs) Handles RadGrid1.PageIndexChanged

 

 

'GridDataLoad(True)

 

 

 

 

 

 

End Sub

 

 

 

 

 

 

 

Protected Sub RadGrid1_SortCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridSortCommandEventArgs) Handles RadGrid1.SortCommand

 

 

'GridDataLoad(True)

 

 

 

 

 

 

End Sub

 

 

 

 

 

 

 

'Protected Sub RadAjaxPanel1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxPanel1.AjaxRequest

 

 

 

 

 

 

' RadGrid1.Rebind()

 

 

 

 

 

 

'End Sub

 

 

 

 

 

 

 

Protected Sub btnDeleteHide_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnDeleteHide.Click

 

 

'Dim iDataValue As Int32

 

 

 

 

 

 

'Dim i As Int32

 

 

 

 

 

 

'MySql.sSql = ""

 

 

 

 

 

 

'For i = 0 To RadGrid1.SelectedItems.Count - 1

 

 

 

 

 

 

' iDataValue = RadGrid1.SelectedItems(i).OwnerTableView.DataKeyValues(RadGrid1.SelectedItems(i).ItemIndex)("id")

 

 

 

 

 

 

' MySql.sSql &= "DELETE FROM Event WHERE id=" & iDataValue & "; "

 

 

 

 

 

 

'Next i

 

 

 

 

 

 

'If Len(MySql.sSql) > 0 Then MySql.ExecuteNonQuery()

 

 

 

 

 

 

'GridDataLoad(True)

 

 

 

 

 

 

End Sub

 

 

End

 

Class

 






The line that throws the error is: RadGrid1.DataSource = MySql.ds.Tables("griddata")



Thanks for any help
Ryan

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 24 Sep 2009, 08:08 AM
Hi Ryan,

Please review the following online resources which elaborate how to avoid this error:
http://blogs.telerik.com/atanaskorchev/posts/09-03-06/Meet_Telerik_Web_Design_dll.aspx
http://www.telerik.com/help/aspnet-ajax/troubleshooting.html (the bottom section of the article)

I hope this information helps.

Kind regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Ryan
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or