locked
Simplest lightswitch App fail with redcross RRS feed

  • Question

  • Hi,

    I am fairly new to LS, and I did a test c# app to see the OData features.

    New LS silverlight C# app, added Odata source http://data.stackexchange.com/stackoverflow/atom/ (tried also with the Netflix one) and selected only one entity.

    Which mean that the OData source work since  I see entities, am I right ?

    Make e default editable grid screen, selecting my data source with no customization at all.

    Run the app in web app mode.

    I have the red cross error on every field (unable to load data, check your network blabla...)

    Enabling the trace I saw that

    EntitiesData.svc/Microsoft_LightSwitch_GetCanInformation AND

    EntitiesData.svc/Users() are both in 400 error Code and I found nothing interesting in the details.

    On the access controls option I checked "do not enable authentication"

    Using intellitrace I saw that after each User() request I have this exception :

    Exception:Thrown: "Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information." (System.Reflection.ReflectionTypeLoadException)
    A System.Reflection.ReflectionTypeLoadException was thrown: "Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information." 

    This exception is thrown somewhere in the constructor of the DataService<MyEntitiesContext> that is the base class of the generated class DataService

    Note that when I try to access client trace (http://localhost:1168/default.htm?LC=Microsoft.LightSwitch,V) I have this exception after the SL init :

    Load operation failed for query 'GetAuthenticationInfo'. Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

    I am using VS2012 update 1 on windows server 2012 Wcf Data Service 5.2 Tools(the msi) is installed (don't know if it relevant) 

    Anyone knows what could be wrong ?

    Thank

    Friday, January 18, 2013 1:37 PM

Answers

  • Well I found the problem, Lightswitch is NOT COMPATIBLE with Wcf Data Service 5.2 but is compatible with 5.0.

    • Marked as answer by Axel.C Thursday, January 24, 2013 4:01 PM
    Thursday, January 24, 2013 4:00 PM

All replies

  • Have you seen this article?

    Diagnosing Problems In A Deployed 3-Tier LightSwitch Application


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    Please click "Mark as Answer" if a reply answers your question. Please click "Vote as Helpful" , if you find a reply helpful.
     
    By doing this you'll help others to find answers faster.

    Friday, January 18, 2013 2:38 PM
    Moderator
  • Hi Yann,

    Yes I did and the problem is that the Trace information section in the trace details is empty that's why it is not very helpful

    Any ideas why ?

    Friday, January 18, 2013 5:16 PM
  • Anyone ?

    To help here are the screenshot of the traces when I just start the app:

    And when I click on detail for NetflixCatalogData.svc/People() :

    The Trace information is empty, but if it was not I guess that I would see someting like I can get in intellitrace :

    Exception:Thrown: "Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information." (System.Reflection.ReflectionTypeLoadException)
    A System.Reflection.ReflectionTypeLoadException was thrown: "Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."

    Dont know if it is relevant but in Intellitrace there is two other exception  :

    Just after the event ServiceHost starting :

    Exception:Thrown: "This element is not currently associated with any context" (System.Configuration.ConfigurationErrorsException)
    A System.Configuration.ConfigurationErrorsException was thrown: "This element is not currently associated with any context"

    When I access the trace.axd :

    Exception:Thrown: "Could not load file or assembly 'msshrtmi, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified." (System.IO.FileNotFoundException)
    A System.IO.FileNotFoundException was thrown: "Could not load file or assembly 'msshrtmi, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified."

    Please help using LS would save me days of coding.

    Thank

    Saturday, January 19, 2013 12:33 PM
  • Well I found the problem, Lightswitch is NOT COMPATIBLE with Wcf Data Service 5.2 but is compatible with 5.0.

    • Marked as answer by Axel.C Thursday, January 24, 2013 4:01 PM
    Thursday, January 24, 2013 4:00 PM