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

Does current futures build support LINQ datasources ?

11 Answers 282 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Norsten
Top achievements
Rank 1
Norsten asked on 28 Mar 2008, 11:05 AM

I come accross a bug (or at least i think it is)

First I need to ask -does the latest RagGrid 2008 Q1 'futures build' support LINQ datasources   -or code linq generated queries from codebehind?

If not then when binding a RadGrid to LINQ datasource -an error occurs when paging...


The state information is invalid for this page and might be corrupted.

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.Web.HttpException: The state information is invalid for this page and might be corrupted.

Source Error:

[No relevant source lines]

Source File: c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\b7fbaab6\a8202dcc\App_Web_0goxrvq9.0.cs    Line: 0

Assembly Load Trace: The following information can be helpful to determine why the assembly 'DynamicClasses, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' 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 'DynamicClasses, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' 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) +78
   System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +58
   System.Type.GetType(String typeName, Boolean throwOnError) +57
   System.Web.UI.ObjectStateFormatter.DeserializeType(SerializerBinaryReader reader) +175
   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +732
   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +363
   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +363
   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +363
   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +1283
   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +198
   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +363
   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +210
   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +363
   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +210
   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +210
   System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader) +198
   System.Web.UI.ObjectStateFormatter.Deserialize(Stream inputStream) +142

[ArgumentException: The serialized data is invalid.]
   System.Web.UI.ObjectStateFormatter.Deserialize(Stream inputStream) +206
   System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +342
   System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState) +4
   System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) +37
   System.Web.UI.HiddenFieldPageStatePersister.Load() +136

[ViewStateException: Invalid viewstate. 
	Client IP: 127.0.0.1
	Port: 
	User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; .NET CLR 3.5.21022; InfoPath.2)
	ViewState: /wEPDwUJLTQwNDg2NzM0D2QWAgIDD2QWBAIDDzwrAA0CABQrAAIPFggeF0VuYWJsZUFqYXhTa2luUmVuZGVyaW5naB4LRWRpdEluZGV4ZXMWAB4LXyFJdGVtQ291bnQCAR4LXyFEYXRhQm91bmRnZBcBBQ9TZWxlY3RlZEluZGV4ZXMWAAEWAhYKDwIMFCsADBQrAAUWBB4Eb2luZAICHghEYXRhVHlwZRkrAWRkZAULRXJyb3JOdW1iZXIUKwAFFgQfBAIDHwUZKwFkZGQFDEVycm9yTnVtYmVyMhQrAAUWAh8EAgRkZGQFDFJlcG9ydGVkRGF0ZRQrAAUWAh8EAgVkZGQFDURpc2NvdmVyeURhdGUUKwAFFgQfBAIGHwUZKwJkZGQFD0Vycm9yQnJlYWNoVHlwZRQrAAUWBB8EAgcfBRkrAmRkZAUMRXJyb3JEZXRhaWxzFCsABRYCHwQCCGRkZAUIQ2xvc2VkWU4UKwAFFgIfBAIJZGRkBQ1Fc3RpbWF0ZWRDb3N0FCsABRYCHwQCCmRkZAUKQWN0dWFsQ29zdBQrAAUWBB8EAgsfBRkrAmRkZAUSQ29tcGFueVJlc3BvbnNpYmxlFCsABRYEHwQCDB8FGSsCZGRkBQZDbGllbnQUKwAFFgQfBAINHwUZKwJkZGQFC0NvbXBsZXRlZEJ5ZGUUKwAACyl5VGVsZXJpay5XZWIuVUkuR3JpZENoaWxkTG9hZE1vZGUsIFRlbGVyaWsuV2ViLlVJLCBWZXJzaW9uPTIwMDguMS4zMjUuMzUsIEN1bHR1cmU9bmV1dH...]

[HttpException (0x80004005): The state information is invalid for this page and might be corrupted.]
   System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +267
   System.Web.UI.HiddenFieldPageStatePersister.Load() +218
   System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +83
   System.Web.UI.Page.LoadAllState() +35
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7350
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +213
   System.Web.UI.Page.ProcessRequest() +86
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.modules_errors_errorsloglist_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\b7fbaab6\a8202dcc\App_Web_0goxrvq9.0.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64


-however -it works fine for other datasources.

11 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 28 Mar 2008, 11:52 AM
Hello Norsten,

Please open a support ticket and send us small example which demonstrates this exception. I will review your scenario and I will get back to you with more info.

Greetings,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
mgutz
Top achievements
Rank 1
answered on 29 Mar 2008, 03:05 PM
Same issue here. Seems to happen when a subset of columns are checked in the LinqDataSource control. If all the fields, i.e. '*' is selected, it works for me.
0
Vlad
Telerik team
answered on 31 Mar 2008, 07:40 AM
Hi guys,

Unfortunately you are right. We corrected the problem immediately and you can open a formal support ticket to get the latest Telerik.Web.UI build.

Sincerely yours,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Steele
Top achievements
Rank 1
answered on 03 Apr 2008, 09:46 PM

I also needed to turn off the ImageButton in the EditColumn and use LinkButton instead.

Then I still got  different error and had to set EnableEventValidation="False" at the page level.  This causes some security holes that I hope can be fixed in the full release.

Lastly, when Updating items, Read-Only fields are refreshed empty when the editform closes.

0
Vlad
Telerik team
answered on 04 Apr 2008, 06:49 AM
Hi Steele,

I have attached small example with automatic updates, read only columns, various edit buttons, LinqDataSource and latest Telerik.Web.UI. As to the edit column as ImageButton I'm not sure about the issue - can you clarify?

Greetings,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Steele
Top achievements
Rank 1
answered on 04 Apr 2008, 07:18 AM
Sorry, I think it was related to troubleshooting n the page...  I had turned off ViewState for troubleshooting and when I turned it back on the Automatic updates work perfectly fine...

I don't know what was causing the ImageButton problem, It seem to be OK now.  It seems to only have been happening when Select="New {stuff} existed in the LinqDataSource. (same thing Norsten reported, but at one point I did get a secong similar but diffeerent error and jumped the gun on my reply, I read in another post it was related to image buttons) I will load the new DLL and see if that helps.  I don't really need all the data columns back, but in most cases they aren't that big and I can just set visible and display to false on the ones I don't want.

I do however have a refresh problem still...  when I do an Update, some (not all) ReadOnly=True fields refresh empty.
0
Steele
Top achievements
Rank 1
answered on 04 Apr 2008, 07:22 AM
Also, I WAS using a UserControl on the page, I have since removed it for he particular page that was having a problem, I don't know if that had anything to do with the error, but the page is now working as expected except for the aforementioned errors.
0
Stas
Top achievements
Rank 2
answered on 15 Apr 2008, 04:58 AM

I just want say Thank You to mgutz.
I've spent the whole day on reseach for this problem.



When I cleared all the  Select="new (NoteID, pkUID,...) in the .aspx the error disappears. 
Where from code behind .cs all works fine for now.

protected void LinqNote_Selecting(object sender, LinqDataSourceSelectEventArgs e)
{

int pkuid = Int32.Parse(e.WhereParameters["PKuID"].ToString());

FYDEvlDataContext db = new FYDEvlDataContext();
e.Result =
from n in db.tblpkNotes
where n.pkUID == pkuid
select new { pkUID = n.pkUID, NoteID = n.NoteID, Note = n.tblNote.Note };

}
Also, I'm wondering what is the Grid property EnableLinqExpressions for?

When I cleared all the   in the .aspx the error disappears. Where from code behind .cs all works fine for now.
0
Sebastian
Telerik team
answered on 15 Apr 2008, 05:53 AM
Hello Stas,

The EnableLinqExpressions property of RadGrid Prometheus 2008.1.325.35+ (i.e. only for the ASP.NET 3.5 build of the product) determines whether the control will use native linq expressions when performing sorting/filtering/etc. operations or the old logic inherited from the Classic grid control. The default value of this property is true.

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Bob
Top achievements
Rank 1
answered on 02 May 2008, 05:13 AM
I viewed this source and it is not a LinqDataSource.  Can you put a corrected version on the site?
0
Vlad
Telerik team
answered on 07 May 2008, 07:08 AM
Hi Bob,

Can you please recheck the attachment in my previous reply?

All the best,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Norsten
Top achievements
Rank 1
Answers by
Vlad
Telerik team
mgutz
Top achievements
Rank 1
Steele
Top achievements
Rank 1
Stas
Top achievements
Rank 2
Sebastian
Telerik team
Bob
Top achievements
Rank 1
Share this question
or