Does current futures build support LINQ datasources ?

12 posts, 0 answers
  1. Norsten
    Norsten avatar
    53 posts
    Member since:
    Feb 2007

    Posted 28 Mar 2008 Link to this post


    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.
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 28 Mar 2008 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. mgutz
    mgutz avatar
    2 posts
    Member since:
    Aug 2007

    Posted 29 Mar 2008 Link to this post

    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.
  5. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 31 Mar 2008 Link to this post

    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
  6. Steele
    Steele avatar
    58 posts
    Member since:
    Jun 2006

    Posted 03 Apr 2008 Link to this post

    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.

  7. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 04 Apr 2008 Link to this post

    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
  8. Steele
    Steele avatar
    58 posts
    Member since:
    Jun 2006

    Posted 04 Apr 2008 Link to this post

    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.
  9. Steele
    Steele avatar
    58 posts
    Member since:
    Jun 2006

    Posted 04 Apr 2008 Link to this post

    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.
  10. Stas
    Stas avatar
    12 posts
    Member since:
    Jul 2007

    Posted 14 Apr 2008 Link to this post

    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.
  11. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 15 Apr 2008 Link to this post

    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
  12. Bob
    Bob avatar
    21 posts
    Member since:
    Mar 2008

    Posted 02 May 2008 Link to this post

    I viewed this source and it is not a LinqDataSource.  Can you put a corrected version on the site?
  13. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 07 May 2008 Link to this post

    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017