none
Just get blank screen

    Question

  • Ok - I've just installed the trial version of LightSwitch, tried creating a "hello world" application, i.e. a desktop deployed search screen for a single table in a development SQL server 2008 database, and all I get on running it is a blank white screen saying "Loading...",  then - just a blank white screen.

    Reading the similar issue someone found in the beta (although they at least saw some buttons I believe):

    http://social.msdn.microsoft.com/Forums/en-US/lightswitchgeneral/thread/4aeccc5d-40bf-43c4-884a-b6f9f2d3a6f8

    I tried uninstalling SilverLight 3 and installing the SilverLight 4 Tools for VS only for the installer to tell me I needed VS2010 (or a couple of the express products) installed to continue. A bit odd since I have VS2010 Ultimate installed and have been using it happily for quite a while.

    Pretty unimpressive trial so far. Any ideas anyone?

     

     

    Friday, July 29, 2011 4:46 AM

Answers

  • Hi all,

     

    @Yann - After reviewing some possible solutions with some other folks, the conclusion is there is no way to keep the runtime from saving the settings it does today (mainly the screen column sort order)

    @Mike (with the redirected MyDocs) - After doing some review thru the product, I beleive I have a something else for you to try. In your desktop LightSwitch app navigate to the ClientGenerated project, and there under the properties folder go to the OutofBrowserSettings.xml and change <SecuritySettings ElevatedPermissions="Required" /> to <SecuritySettings ElevatedPermissions="NotRequired" />. Then at F5 (and publish) your app should work.

    Also in a basic console and/or sliverlight app could you tell me what is return from the following line of code?

    Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
    

    Thanks in advance!

    --Bill R

    • Marked as answer by MikeNZ2 Tuesday, September 20, 2011 12:09 AM
    Friday, September 9, 2011 8:08 AM

All replies

  • Sorry to hear that you're having issues.  What you describe sounds like its probably a version mismatch of some sort.  Could you try switch the project to run in the browser? To switch to running in the browser, double-click on the Properties node in Solution Explorer.  Click on the Application Type tab and change it to be Web.

    Running the app at that point may result in a little more information shown to help debug what's going on.


    Eric Gruber, LightSwitch Test Manager
    Friday, July 29, 2011 11:31 PM
  • Ok thanks - that got me a bit further, when running it in the browser I could see the Save/Refresh buttons, Design button and the menu. However I still had to "design" the screen to add the data in, so maybe I hadn't hooked it up properly in the first place.

    However still nothing appears when running it in desktop mode.

    Sunday, July 31, 2011 10:39 PM
  • Can you download one of the starter kits and get those to load... This will help you find out if it is actually lightswitch or the way you have put your application together.
    http://www.virtualrealm.com.au - XNA Game Programming News and Resources from Downunder.
    Sunday, July 31, 2011 11:22 PM
  • Good idea - installed the Time Tracker starter kit, it runs fine in the browser but has the same problem running it in desktop mode.
    Sunday, July 31, 2011 11:50 PM
  • So has anyone else had this problem with the RTM version?

    Browser mode is fine.

    Desktop mode is a blank form after the load message.

    OS is Win7 Professional 64 bit SP1.

    cheers

     

     

    Monday, August 1, 2011 10:21 PM
  • No, I use OOB apps exclusively, & I definitely haven't seen this problem in any of mine in RTM.

    Yann

    (plus ça change, plus c'est la même chose!)

    Monday, August 1, 2011 11:38 PM
    Moderator
  • Thanks for the question Mike. I belive that you are likely suffering from 2 different issues and I want to see if I can help track them down.

     

    For the blank desktop app problem could you let me know what version number of Silverlight 4 you have installed. I want to make sure it matches the one from RTM. As well the version of the RIA bits you have isntalled would be great to know.

     

    For the Browser issue where the shell loads but you don't see a screen you indicated that you can hit the Design Screen button in the running app and after designing the screen you can see it. What shows up in the screen designer when you first enter it? One of the common problems we have seen people run into is that the first screen they design is a Details screen. By default Details screens don't show up in wither the menu or as the default screen since they are parameterized and require some other action to provide them an initial value. Unfortunately your ability to design the screen from the initial state you describe doesn't fit this typical problem pattern.

     

    Would it be possible for you to provide me the project that you are seeing the issue with?

    Thanks,


    Kris Langohr | SDET Lead | LightSwitch QA
    Tuesday, August 2, 2011 12:22 AM
  • Hi Kris

    Yes I think they are two completely unrelated problems, I'm not too worried about the second one as it was a one off issue, i.e. after I went through the "design screen" during runtime it hasn't happened again. The screen is actually a search screen as I did read about the Details screen behaviour so changed my project.

    So anyway that issue didn't happen when I ran the Time Tracker starter kit so I figured I did something wrong - I may try and recreate it at some point.

    The problem with Desktop mode not rendering is more concerning, my SilverLight version is 4.0.60531.0

    Thanks for the help.

    Mike

     

     

    Tuesday, August 2, 2011 1:03 AM
  • That's the same version of Silverlight that I have installed, so it shouldn't be that.

    What about the version of the Silverlight SDK? I can't remember if that's required, or not. The version I currently have installed is 4.0.60310.0


    Yann

    (plus ça change, plus c'est la même chose!)

    Tuesday, August 2, 2011 3:10 AM
    Moderator
  • Mike, I see that you have VS 2010 Ultimate also installed on the same box. Can you try creating a Silverlight Application (File ->New Project -> Visual Basic ->Silverlight ->Silverlight  Application) and in the New Silverlight Application wizard, go with defaults except ensure you select Silverlight 4 as your target (this should be hosted by a web app....). Then add some controls (button for example) from the Toolbox to this application and then F5 the app?  If this works, end debugging and open the properties of the Silverlight application and on the "Silverlight" tab of the property page, check the checkbox for "enable running application out of browser".  Then F5 the application again and see what happens. 

    With the above, I am just checking on the health of the other features not LightSwitch specific to see what also might be impacted here....

     

    Thanks

    Robert Schoen

     

     

    Tuesday, August 2, 2011 4:20 PM
  • Couple of additional things to try as well with the LightSwitch project and running in Desktop mode

    1. Are you running under "Debugging" (F5)?  Can you try under a non-debugging scenario (Cntrl+F5)?

    2. When the running application launches, can you maximize it if it is not already?  Then stop running and again restart the app (hopefully in maximized mode).

    3.  Also when you run the application in Desktop mode, can you open up the Task Manager and go to the Processes tab and right click on sllauncher.exe and select "Properties"?  On the sllauncher Properties dialog, go to the Details tab and review the file version. Is it 4.0.60531.0?

     

    thanks

    Robert Schoen

    Tuesday, August 2, 2011 5:17 PM
  • Another comment (Sorry).  I noticed in your original post that you tried installing SilverLight 4 Tools for VS and found that it would not allow you due to "missing VS stuff".  This is a bit concerning.  These tools should have no problem installing so there could be a larger issue happening here. 

     

    thanks

    Robert Schoen

    Tuesday, August 2, 2011 5:20 PM
  • Thanks guys, answers in order:

     

    Yann - yep, my SDK version is the same as yours

    Robert -

    I tried a normal SilverLight app in VS (C# BTW not that I think that makes a difference)  and it runs fine no matter how I host/launch it, whether in/out of browser, debug/not debug.

    I now only have SilverLight 4 installed so no choice needed there.

    The LightSwitch apps (i.e. both mine and the Time Tracker) behave the same regardless of debug options - they will run and display the "loading" message then a blank white form, they can be maximised/minimised and treated like a normal window. If maximised then restarted they will not be maximised on the second start.

    My slllauncher.exe version is 4.0.60531.0.

    I agree the install issue is a bit strange, particularly since this is a brand new Win7 SP1 box so doesn't have the usual accumulated developer rubbish.

    I suspected some kind of permissions issue and tried setting slllauncher.exe to run as administrator with no result.

    My other thought was a graphics card incompatability but enabling/disabling GPU acceleration didn't have an effect, and also I would have thought this would affect normal SilverLight apps as well.

    Curiouser and curiouser.

    cheers

    Mike

    Tuesday, August 2, 2011 9:31 PM
  • This is the actual message I get when trying to install the Tools.

    The main message is that my computer doesn't meet the requirements with the detailed message:

    "Installation Requirements:

    Visual Studio 2010 or Visual Web Developer Express 2010 or Visual Phone Developer Express 2010 that matches the language version of Silverlight Tools 4 must be installed before installation of Silverlight Tools can continue.  Silverlight Tools is available in other languages at <A HREF="http://go.microsoft.com/fwlink/?LinkId=177432">http://go.microsoft.com/fwlink/?LinkId=177432</A>. "

     

    - I have VS2010 with Web Developer installed, and it's definitely the English version

    - I re-downloaded the English version of the tools in case I had accidentally picked up a non-English version previously, no effect

    - I even tried changing my PC to English (US) from English (NZ) but no effect.

    cheers

    Mike

    Tuesday, August 2, 2011 9:43 PM
  • Very strange indeed...

    Can you try this...

    1. Launch a brand new visual studio (devenv) process --> Create a new VB lightswitch project -->Add a new table with a single field (string) added --> Add a List and Details screen with attached datasource the previously created table. 
    2. Now go to the visual studio's menu "Tools-->Options-->Debuggin-->General" and uncheck "Enable Just My Code (Managed Only)".
    3. Now F5 (debug) your application (this by default should be the "desktop" app and should repro your issue. 
    4. Does the app repro?  Or do you encounter some errors?

    Let me know what you encounter here.

     

    BTW, I am very curious about that mismatched language detection issue.  Will see if I find something about that too....

    Thanks

    Robert Schoen

     

    Wednesday, August 3, 2011 2:58 PM
  • Followup regarding the Silverlight Tools "Mismatched language" issue.  I am able to reproduce this too.  Looks like there is an issue in what the Silverlight Tools setup is reporting here.  In other words, when you install VS2010 SP1, this Sp1 installation "INCLUDES" the Silverlight tool components. (see http://msdn.microsoft.com/en-us/library/cc838244(VS.95).aspx).  So what I think is happening here is the Silverlight tools setup is detecting that its components are already installed and it is "blocking" setup and is displaying this "incorrect" message for this particular scenario.

    Ill let folks know about this odd behavior....

     

    -Robert Schoen

    Wednesday, August 3, 2011 7:26 PM
  • Thanks - that explains the install issue, though I guess it makes it less likely the main problem is anything to do with the tools.

     

    I tried the new VB project as above and it reproduces the issue just the same as the other projects, it didn't break on any exceptions.

    cheers

    Mike

     

     

    Wednesday, August 3, 2011 10:27 PM
  • Great find Robert!

    Yann

    (plus ça change, plus c'est la même chose!)

    Thursday, August 4, 2011 4:39 AM
    Moderator
  • Yeah - it's quite interesting and should clear up a lot of confusion for people but I've still essentially got nowhere with the original problem of desktop apps not rendering.
    Sunday, August 7, 2011 9:56 PM
  • I wish I knew what to suggest!

    Yann

    (plus ça change, plus c'est la même chose!)

    Sunday, August 7, 2011 10:10 PM
    Moderator
  • Let me ping few more of my Lightswitch coworkers and see any of them have any ideas what to try next.  This is very strange that the "Desktop/Out Of Browser) runtime instance does not work when running from within VS (F5 or Cntrl+F5 scenarios).  However switching to 3-tier web app does work.

     

    Mike, in the mean time, could you try something else (ie. does a published app work)?

    1. Launch a brand new visual studio (devenv) process --> Create a new VB lightswitch project -->Add a new table with a single field (string) added --> Add a List and Details screen with attached datasource the previously created table. 
    2. Now F5 (debug) your application - this again by default should be the "desktop" app and should repro your issue.
    3. (NEW) Now right click on your solution node in the Solution Explorer, and select "Publish" and run through the publishing wizard going with all the "defaults".  (this should publish and update your local SQLExpress database with the appropriate database info to run your app)
    4. Now in Windows Explorer and open up the folder location of the application you are working on.  In that folder, you should see a "publish" folder.  Drill into this publish folder and find the "setup.exe".  Run this setup.exe and this should install your a single user instance of your application on your local box.  After it fiinishes installing it should also launch your just built app.  Does this "pubished" app correctly bring up the application and the screen?

    -Robert Schoen

     

    Monday, August 8, 2011 3:46 PM
  • Hi Robert - nope, a published app behaves exactly the same. blank form.

    cheers

    Mike

    Tuesday, August 9, 2011 5:06 AM
  • Mike,

    Can you check to see if you have any additional Lightswitch "extensions" installed?  To do this, with your created Lightswitch project open in visual studio, right click on the project node and select "Properties".  Navigate to the "Extensions" tab of this designer.  Be default you should should only have 1 extension listed there and its name is "Microsoft Lightswitch Extensions".   If you see others, uncheck them for use in "new projects" and then create a new project again and see if it reproduces still.   You might even try "unchecking" the Microsoft Lightswitch Extensions for new projects and see what happens also just in case.

     

    Looking above in the thread, looks like it was not asked if you have had any "beta" Lightswitch products installed prior on this machine.  Can you confirm if you have had?

     

    If the above "extension" check does nothing (and you have not had Beta installed), I might suggest the following.  Try uninstalling some components and letting Lightswitch install them again.  Here is the order in which I suggest:

    1. Go to Control Panel - Uninstall Programs dialog
    2. In the Uninstall dialog, uninstall in this order:
    3. Microsoft Visual Studio Lightswith 2011
    4. WCF Ria Services v1.0 Sp1
    5. Microsoft Silverlight
    6. Microsoft Silverlight 4 SDK

    Now reinstall Lightswitch...  This reinstall should go pretty quickly for you hopefully.

    -Robert Schoen

     

    Tuesday, August 9, 2011 3:48 PM
  • Hi Robert

    No luck unfortunately

    • I've never had any other version of LightSwitch installed other than the RTM
    • The only extension I see is "Microsoft Lightswitch Extensions" v1.0
    • I tried the reinstall as you listed and it made no difference.

    thanks

    Mike 

     

    Thursday, August 11, 2011 3:51 AM
  • Mike, did you try happen to try the suggested item from above of

     "You might even try "unchecking" the Microsoft Lightswitch Extensions for new projects and see what happens also just in case."  Uncheck this option and again create that basic vb LS app and see if it comes up correctly.  I suspect this also fails but want to make sure.

     

    Well, last thing to do (in my arsenal anyway) is to do that debug thing again but this time turn on all "common language runtime "exceptions.  Here are those familar steps... 

    1. Launch a brand new visual studio (devenv) process --> Create a new VB lightswitch project -->Add a new table with a single field (string) added --> Add a List and Details screen with attached datasource the previously created table.
    2. Now go to the visual studio's menu "Tools-->Options-->Debuggin-->General" and uncheck "Enable Just My Code (Managed Only)".
    3. (NEW STEP) Under the menu, select "Debug -->Exceptions...".  In this Exceptions dialog, check the checkbox next to "Common Language Runtime Exceptions".
    4. Now F5 (debug) your application (this by default should be the "desktop" app and should repro your issue).
    5. I expect while in the "debug" mode that the first exception you should see is the following:

    Could not load file or assembly 'msshrtmi, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

    Do you see this as your "first" exception while debugging under this config?  If not, what is the exception seen? 

     

    -Robert Schoen

     

     

    Thursday, August 11, 2011 9:01 PM
  • Hi Robert,

    "You might even try "unchecking" the Microsoft Lightswitch Extensions for new projects and see what happens also just in case."  Uncheck this option and again create that basic vb LS app and see if it comes up correctly."

    My understanding was that the Microsoft LightSwitch Extensions was actually *required*. Is that not the case? Does it just provide the business types etc? What else does it do?


    Yann

    (plus ça change, plus c'est la même chose!)

    Thursday, August 11, 2011 11:42 PM
    Moderator
  • Dear Mike,

       What I suggest is to go to your control panel-> Add & remove Program-> Show/Hide windows programs

    Find Internet Information Services & check all check boxes under

    Management Services

    Application Data & Security headers.

    Restart the machine 

    Restart The IIS & try opening the Application again.

    Off course I am assuming you are doing a Desktop Deployment over IIS.

    Hope this helps.

    Regards 

     


    Supreet
    Friday, August 12, 2011 4:06 PM
  • Yann,  that should essentially "hide" them from the Entity Designer (table designer) so you will not see them in the "type" dropdowns...That is essentially it. 

     

    BTW, I really appreciate all your forum involvement. That is so awesome to see!

    -Robert Schoen

    Friday, August 12, 2011 7:04 PM
  • Hi Robert,

    Thanks for the explanation, & the kind words. I love LightSwitch, & I love helping people, so the two just go well together in the forum.


    Yann

    (plus ça change, plus c'est la même chose!)

    Sunday, August 14, 2011 12:45 AM
    Moderator
  • Hi Robert

    As expected unchecking the extensions had no effect.

    Yes - I see the exception as above as the first one thrown when I enable all Runtime exceptions, I then get a whole lot of exceptions after that when trying to continue.

    cheers

    Mike

    Wednesday, August 17, 2011 3:47 AM
  • Hi Supreet

    I can't see any of those under IIS in the control panel/Programs and Features - this is Windows 7, i.e. IIS 7.5 so all the feature names seem to be different.

    thanks

     

    Mike

     

    Wednesday, August 17, 2011 3:56 AM
  • Hey Mike,

        I am not sure about the options available in IIS 7.5 but the specifications I mentioned are also from win7 machine. You should definitely get it when u go to add/remove programs on ur control panel.

    Regards


    Supreet
    Wednesday, August 17, 2011 5:34 AM
  • Ok Supreet - then I'm confused, unless I'm missing something there is no add/remove programs in the control panel on a Win7 machine.

    I'm looking at Control Panel\All Control Panel Items\Programs and Features\Turn Windows features on or off

    Is that where you're looking? Because I see nothing in there under the Internet Information Services node that says "Management Services" or "Application Data and Security headers"

    cheers

    Mike

    Wednesday, August 17, 2011 9:32 PM
  • Hi Mike,

       You can navigate to 

    Control Panel\Programs\Programs and Features

    There u should see something like this 


    You need to click on "Turn Windows Features on & OFF" in left panel to get the popup.

    Expand Internet Information Services & mark as I told before.

    Hope this helps

    Supreet

    Thursday, August 18, 2011 6:49 AM
  • Sorry, I am currently at a loss regarding the behavior you are seeing.  Yes you will see a lot of other exceptions after this first expected one.  I will see about listing them out and see if you have some that are not expected (it is a long list).  I will continue to search out other options as well and see what comes from reviewing settings mentioned by Supreet. 

    -Robert Schoen

    Thursday, August 18, 2011 3:04 PM
  • Yes thanks Supreet - as I said, under "Turn Windows Features On and Off", but you are saying check all boxes under

    Management Services

    Application Data & Security headers.

    These nodes don't exist - do you mean Web Management Tools and something else???

    I know where you are looking but I don't see the settings you are referring to, and in fact they are not on your screenshot either.

    cheers

    Mike

    Thursday, August 18, 2011 8:22 PM
  • Thanks Robert - yes I am at a loss as well, at this point I will try Supreet's suggestions (when I finally figure out exactly what they are) and if that doesn't help since my trial is coming to an end I will probably just uninstall and wait for SP1.

    cheers

    Mike

    Thursday, August 18, 2011 8:25 PM
  • Hi Mike,

      I am sorry Its my Mistake I pointed out wrong headers & did not cross check. Following 2 screenshots will show you the options that I've selected in my Windows 7 Machine.

    When I got the blank screen at first place..I came back to IIS & selected all these options here, also I made sure that My LS application (Desktop type running in IIS) is running under DefaultAppPool & the dot net version for DefaultAppPool is set to v 4.0 

    Then just restart the IIS-> Select Your Website Folder in IIS Manager-> Click Browse:80 from Action pane in IIS Manager

    Yoy should be able to see a button to Install your app.

    Hope I am clear this time & it helps.

    Rehards

     


    Supreet
    Thursday, August 18, 2011 8:35 PM
  • Thanks Supreet - I'll try this out.

    cheers

    Mike

    Thursday, August 18, 2011 8:52 PM
  • Mike, please try uninstalling your LS installation and then reinstalling it.  The uninstall and reinstall should be pretty quick at this point.

    Also, when you are creating these LS projects, are all paths being used on the "local" machine and are under the standard path of something like this?   "C:\Users\<username>\Documents\Visual Studio 2010\Projects\"

     

    thanks

    Robert Schoen

    Thursday, August 18, 2011 10:23 PM
  • Hi Robert

    The uninstall/install didn't work, my projects are being created in a folder directly on my C: drive (where I work our My Documents folders are mapped to an external server share), the local My Documents folder path you have above is not accessible.

    Thanks

     

    Mike

     

     

     

     

     

     

    Friday, August 19, 2011 1:54 AM
  • And that didn't male any difference either.

    Thanks

    Mike

     

    Friday, August 19, 2011 1:55 AM
  • Mike, I'm wondering that may not be your problem, opening projects on a network share..

    Yann

    (plus ça change, plus c'est la même chose!)

    Friday, August 19, 2011 2:00 AM
    Moderator
  • I am dealing with this issue right now as well.  I am using the trial version connected to SQL2008.  I can see my tables but when I try to generate a screen I get nothing.
    Friday, August 19, 2011 2:06 AM
  • Hi Yann

    The projects I'm creating are actually on the local C drive, i.e. we don't use our Documents folders for projects.

    Markk63 - do you have this problem only with a desktop app, and not with a web deployed app?

    cheers

    Mike

     

     

     

    Friday, August 19, 2011 4:33 AM
  • Hello Mike

    Hope you are still hanging in there in trying to see what is happening with the Desktop version of the apps.  As mentioned earlier, here is the "full" list of what I would expect as "exceptions" that will occur when you have "break on Common Language Runtime" exceptions turned on.

     

    So from the begining, please try the following:

    1. Launch a brand new visual studio (devenv) process --> Create a new VB lightswitch project -->Add a new table with a single field (string) added --> Add a "List and Details" screen with attached datasource the previously created table.
    2. Now go to the visual studio's menu "Tools-->Options-->Debuggin-->General" and uncheck "Enable Just My Code (Managed Only)".
    3. Under the menu, select "Debug -->Exceptions...". In this Exceptions dialog, check the checkbox next to "Common Language Runtime Exceptions".
    4. Now F5 (debug) your application (this by default should be the "desktop" app and should repro your issue).
    5. I expect while in this "debug" mode you should see the following exceptions in order as seen below. (note - you will want to click "continue" on the exception dialog pretty quickly to go through these exceptions otherwise non-related timing exceptions will creep in).

     

    Exceptions expected in the following order below. If you see others beside these please let me know. Again, please click "continue" on the exception dialog and push through those exception faily quickly.

    1. Could not load file or assembly 'msshrtmi, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
    2. Could not load file or assembly 'msshrtmi, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
    3. The type initializer for 'Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment' threw an exception.
    4. This element is not currently associated with any context
    5. No channel should ever be opened with this host.
    6. This element is not currently associated with any context
    7. No channel should ever be opened with this host.
    8. Object reference not set to an instance of an object.
    9. The incoming HTTP request's URI 'http://localhost:54355/Services/LightSwitchApplication-Implementation-ApplicationDataDomainService.svc/binary/__Dummy' does not match any service   (Note - this will be for your apps specific info)
    10. The content type text/html; charset=UTF-8 of the message is not supported by the encoder.

           NOTE - on my machine config, at this point my app will finish loading correctly....

     

    thanks

    Robert Schoen

     

    Monday, August 22, 2011 5:51 PM
  • Thanks Robert - been at TechEd NZ for the last few days hence why I've been so quiet. Will give this a go when I've caught up with other work and let you know.

    cheers

    Mike

    Sunday, August 28, 2011 9:04 PM
  • Ok, a bit of progress. I haven't tried your suggestion above Robert but what I did instead was uninstall the trial version of Lightswitch and downloaded and installed the full version from the iso on MSDN downloads.

    This now produces the following errors running a fresh project (showed below as dismiss each error) for a desktop deployed app, the third error is the same as the second and after dismissing all I get the basic form displayed will all buttons inactive. Web deployment still works fine.

     

     

     

    Tuesday, August 30, 2011 9:24 PM
  • I see Yann encountered this in the beta as well - Microsoft Developer Network > Forums Home > Archived Forums Forums > Visual Studio LightSwitch - General (Beta) > New Error: Unable to find any implementation of the contract: 'Microsoft.LightSwitch.Runtime.Shell.View.IUserSettingsService'.

    We also have My Document folders redirected to network shares here so that may be related to this issue, but somehow I doubt I will be able to persuade our sysadmins to change that policy...

    Tuesday, August 30, 2011 9:31 PM
  • When I got the notification for your previous post, I thought to myself "wow, I haven't seen errors like that since the early days of B2", lol. Oh those days were NOT fun!

    I don't do redirection any more, so I haven't seen errors like that any more.

    The other thing I remember was causing errors was that I had "Offline Files" disabled. Maybe something for you to check?


    Yann

    (plus ça change, plus c'est la même chose!)

    Wednesday, August 31, 2011 12:00 AM
    Moderator
  • Well I tried enabling Offline files, it made no difference to seeing the output as above with the error messages but thanks for the suggestion Yann.

    What is really bizarre is that I booted my PC overnight (it's a desktop so usually stays on) because of needing to install some updates, and now I've lost even the error output, and I'm back to square one, which incidentally looks like this below. This happens whether running a new solution or an old one.


    Mike
    Wednesday, August 31, 2011 9:02 PM
  • Hi Robert

    Carried out the steps as per your last suggestion, the errors were:

    1. Could not load file or assembly 'msshrtmi, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
    2. Could not load file or assembly 'msshrtmi, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
    3. The path is not of a legal form.
    4. The type initializer for 'Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment' threw an exception.
    5. File operation not permitted. Access to path 'Microsoft\LightSwitch\Settings\LightSwitchAppNew2.1.0.0.0.a171eeb5-22ba-4a87-95e0-f38562e38158' is denied.
    6. This element is not currently associated with any context
    7. The path is not of a legal form.
    8. No channel should ever be opened with this host.
    9. File operation not permitted. Access to path '' is denied.
    10. Object reference not set to an instance of an object.
    11. The path is not of a legal form.
    12. This element is not currently associated with any context
    13. File operation not permitted. Access to path 'Microsoft\LightSwitch\Manifests\LightSwitchAppNew2.1.0.0.0' is denied.
    14. No channel should ever be opened with this host.
    15. The path is not of a legal form.
    16. Object reference not set to an instance of an object.
    17. File operation not permitted. Access to path 'Microsoft\LightSwitch\Manifests\LightSwitchAppNew2.1.0.0.0' is denied.
    18. The incoming HTTP request's URI 'http://localhost:1665/Services/LightSwitchApplication-Implementation-ApplicationDataDomainService.svc/binary/__Dummy' does not match any service operation.

    Several repeats of these 4 in sequence

    1. The path is not of a legal form.
    2. The content type text/html; charset=UTF-8 of the message is not supported by the encoder.
    3. File operation not permitted. Access to path 'Microsoft\LightSwitch\Manifests\LightSwitchAppNew2.1.0.0.0' is denied.
    4. The incoming HTTP request's URI 'http://localhost:1665/Services/LightSwitchApplication-Implementation-ApplicationDataDomainService.svc/binary/__Dummy' does not match any service operation.

    Several repeats of this error, which seems to be what isshowing in the screenshots above:

    1. The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.

    1) Unable to find any implementation of the contract: 'Microsoft.LightSwitch.Runtime.Shell.View.IUserSettingsService'


    Mike
    Wednesday, August 31, 2011 9:21 PM
  • I am SO sorry to see that you're continuing to have so much trouble with LS. But I promise you, if you hang in there & get it sorted out, LS can be a *wonderful* experience!

    When it works, it works brilliantly, but in some siutations (& believe me I've been there) it's hard to get a problem sorted.

    I know it's not an ideal working environment, but could you maybe test it out in a VM, away from whatever your sysadmins impose on you? At least then you'd know.


    Yann

    (plus ça change, plus c'est la même chose!)

    Wednesday, August 31, 2011 11:30 PM
    Moderator
  • I know what you are saying Yann, and I agree it has huge potential. The problem is that unless I can get a fix and an explanation for what is happening then I don't have a hope in Hades of convincing the powers that be that it is worth adopting.

    For something which is designed to be a "pick up and go" tool for non-professional developer users to fail so completely straight out of the box means that all I will face is the usual "Typical Microsoft, wait till they release SP1 then maybe we'll look at it..." kind of attitude. Which is a shame because I can see this being a major productivity boost for our development team as well as for some select business users.

    And to be honest I can't really disagree with them - it seems I have almost the most favourable deployment environment possible (i.e. a brand new desktop, the latest OS and SP, clean install without having the beta previously on it, local admin etc.) and it still fails completely with virtually no feedback from the software as to why.

    Anyway  - thanks for your help and keep up the good work.

    cheers

     

     


    Mike
    Thursday, September 1, 2011 9:11 PM
  • Hey folks

    Sorry, I have been OOF for the last week+. 

    I  will review this info posted above and see what I can drag out of it today/tomorrow.

    However in the mean time, just to clarify...Mike, can you confirm you have tried creating your new Lightswitch projects and setting the new project's file path to a non-redirected folder path at the time of creating the project?  Sorry, it was not obvious to me that you have tried this.   The redirected folder path I believe is a known limitation...but need to drag up more info on this.

    In other words, when creating a new LS project and the New Project dialog is open, try setting the "Location" path to something under "<systemdrive>:\LightSwitchProjects\<your app name>" and attempt to repeat your repro of the issue.

     

    thanks!

    -Robert Schoen

     

     

     

     

     

     

     

     

     

    Tuesday, September 6, 2011 9:23 PM
  • Hi Robert

    All of the LightSwitch projects I have created have been under a folder "C:\ProjectsLocal" - I've never created one under a redirected folder.

    cheers

    Mike

     


    Mike
    Tuesday, September 6, 2011 9:39 PM
  • So Mike, this is what I have found…

     

    First, the “work around” if you can call it, is for you to NOT use “OOB” (Desktop) apps.  As you noticed, when you ran your application as a “web” app mode it worked fine. 

     

    Now to the “guts” of the issue as I understand it.

     

    With the errors and behaviors you have seen, Lightswitch Desktop apps are attempting to access certain files/app settings programmatically that are “app” specific that are available under the “MyDocuments” location.   With Silverlight Out-Of-Browser trusted applications, Silverlight limits access to only certain folders, specifically the MyDocuments, MyMusic, MyPictures, and MyVideos folders (see http://msdn.microsoft.com/en-us/library/ee721082(v=VS.95).aspx).  Since in your case the “MyDocuments” is a redirected unc path, this “trusted location” does not hold true so we get those access denied exceptions….

     

    Additional note - Silverlight does support isolated storage( http://msdn.microsoft.com/en-us/magazine/dd458794.aspx) which gets mapped to something like ...AppData\LocalLow\Microsoft\Silverlight\.  But since Lightswitch desktop apps change identities constantly (we identify a free port on each launch to use), accessing this storage location is not a viable option.

     

    Sorry, this is not the best news.  However the behavior as you are seeing it is expected for users who have redirected My Documents folders and are attempting to run in the Desktop mode. Hopefully now with this knowledge, you can proceed with more confidence in your investigation into the LightSwitch product while using the Web app type.

     

    Thanks for all the detailed information and persistence while getting to the bottom of this issue Mike and Yann.   

     

    -Robert Schoen

    Wednesday, September 7, 2011 4:39 PM
  • Additional note here.

    The "App" settings that we are trying to write and access are related to storing info regarding the last used state of the app.   Our "LS shell" is apparently responsible for loading and saving this last used state info. 

    Another work around a coworker has mentioned to allow the OOB (Desktop) apps to work is a person could create their own "Lightswitch shell extension" that could be used instead of our built in shell.  This new shell could avoid this saving/loading of app settings thus eliminating this issue.  Please see http://code.msdn.microsoft.com/LightSwitch-Shell-1869646f regarding how to create your own shell extension.

     

    -Robert Schoen

    Wednesday, September 7, 2011 10:40 PM
  • Hi Robert

    Well it's relief to have it explained, a couple of observations:

    - Having a "My Documents" location that is redirected to a UNC path within the domain by a group policy not considered as a trusted location seems to be quite a limitation for using LightSwitch for LOB applications. I don't claim to be an expert in the area but i would have though this was quite common.

    - It would be _really_ nice if the shell was a bit more explicit about failing to write the state info...

    Thanks for all your help - and to Yann and the others. I'll let you know if I manage to solve this another way (or using the Shell extension idea above)

    cheers

    Mike

     

     


    Mike
    Wednesday, September 7, 2011 10:52 PM
  • @Robert - no problem, any time!

    @Mike - I'm glad you now have some info to work with. I also now have some info on why I was having so much trouble when B2 came out. I don't redirect any more, but I think you're right that this will be a common scenario in the enterprise space especially.


    Yann

    (plus ça change, plus c'est la même chose!)

    Thursday, September 8, 2011 12:15 AM
    Moderator
  • Robert,

    I've been investigating custom shell extensions myself lately (both for our book, & for shells to release to the community). I know how to add/save *new* settings, but I haven't seen any way to "avoid" what the shell currently saves.


    Yann

    (plus ça change, plus c'est la même chose!)

    Thursday, September 8, 2011 12:17 AM
    Moderator
  • Yann, I'll ping our extension expert on the team and see what he says regarding this "save settings" question in a "shell extension".

    Mike, I totally hear you regarding this limitation.  Being that I am not familiar with all the discussions that occured regarding saving app settings,  I have pinged a few folks regarding this to see if there is something we can do to improve this in the future. 

    BTW - I hope in the cases where group policy is configured like this that usage of the "web app" would the perfered LS app type.  However If this is a large adobption blocker for many folks, please let us know...

    I will also continue to poke around and monitor this thread ...

     

    thanks!

    -Robert Schoen

    Thursday, September 8, 2011 4:07 PM
  • Mike, I too had a LOT of problems with my initial install.  I had a red X where my data should have been on my search screen, and after troubleshooting I I reached the point where it wouldn't even bring up a screen.  The first thing I did was to download and install Lightswitch to a fresh machine that (unlike my development machine) didn't have ANY developer tools.  No Visual Studio, no Express editions.  It had Office, but that was about it.  The good news is it worked, I liked Lightswitch, and it motivated me to get back to solving it on my development box.

    Do you have SP1 for Visual Studio?  I think that is required.  What I did was go to Add or Remove programs and lobotomize my Silverlight.  I got rid of Silverlight, Silverlight 4 SDK, and Silverlight Tools for Visual Studio 2010.  I also removed Lightswitch.  I then reloaded Lightswitch and let it prompt/load everything it needed (I might have did base Silverlight first, that part I don't recall, but I know I let LS do the rest).

    You mentioned reloading Silverlight as Robert suggested but I don't know if that included the SDK and Tools for VS 2010.  Doing that post VS 2010 SP1 which I assume you have might get you around the mismatch language issue that you and Robert also discussed.  I think I am echoing a lot of what I've already read here.  I just wondered if your Silverlight uninstall was complete (all components).  I will also echo the positives which are that after only a few days of using Lightswitch I am really impressed.

    Good luck - Mike

    Thursday, September 8, 2011 5:41 PM
  • Hi all,

     

    @Yann - After reviewing some possible solutions with some other folks, the conclusion is there is no way to keep the runtime from saving the settings it does today (mainly the screen column sort order)

    @Mike (with the redirected MyDocs) - After doing some review thru the product, I beleive I have a something else for you to try. In your desktop LightSwitch app navigate to the ClientGenerated project, and there under the properties folder go to the OutofBrowserSettings.xml and change <SecuritySettings ElevatedPermissions="Required" /> to <SecuritySettings ElevatedPermissions="NotRequired" />. Then at F5 (and publish) your app should work.

    Also in a basic console and/or sliverlight app could you tell me what is return from the following line of code?

    Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
    

    Thanks in advance!

    --Bill R

    • Marked as answer by MikeNZ2 Tuesday, September 20, 2011 12:09 AM
    Friday, September 9, 2011 8:08 AM
  • @Bill - OK, thanks for both looking into it, & for letting me know the result. Two things about what you're suggesting for Mike:

    1. My experience has been that information in the OutOfBrowserSettings.xml file often gets overwritten (as you would kind of expect in a "generated" project)
    2. Doesn't setting the ElevatedPermissions to NotRequired mean that things like exporting to Word/Excel etc won't work anymore? And I would have expected that setting would give you LESS access to folders, not MORE.

    I'm not criticising your suggestions, just checking my understanding of the consequences.


    Yann

    (plus ça change, plus c'est la même chose!)

    If you found this post helpful, please "Vote as Helpful". If it actually answered your question, remember to "Mark as Answer".

    This will help people find the answers that they're looking for more quickly.

    Friday, September 9, 2011 9:40 AM
    Moderator
  • @Yann- Both your statements are very true. On a Clean\Rebuild of the solution we will 'reset' that setting back to the default. Also anything that Silverlight needs ElevatedPermissions for will fail, COM intergration being the big one. Finally this is not fixing our access to the MyDocs folders, it is in fact 'tricking' Lightswitch to not attempt to write there at all.

    So in this case you end up with a desktop app that has web-like permissions and doesn't save the user settings. You can avoid the regeneration of the OutOfBrowserSettings.xml file by marking it as read-only. And that leaves you with a working desktop app.

    Friday, September 9, 2011 6:56 PM
  • OK, thanks for the confirmation Bill. :-)

    Yann

    (plus ça change, plus c'est la même chose!)

    If you found this post helpful, please "Vote as Helpful". If it actually answered your question, remember to "Mark as Answer".

    This will help people find the answers that they're looking for more quickly.

    Saturday, September 10, 2011 12:36 AM
    Moderator
  • Thanks guys, back from leave now

     

    Changing the setting in the OutofBrowserSettings.xml file did the trick, and making it readonly preserves the setting.

    In a console app Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) returns an empty string.

    cheers

    Mike

     


    Mike
    Tuesday, September 20, 2011 12:16 AM
  • Welcome Back Mike!

     

    Thanks for the followup and confirmation regarding the "GetFolderPath".   We will apply this info to the issue that we have tracking on our side!

     

    I hope this "trick" allows you to be unblocked.  I knew our Mr Bill could help out here!

     

    -Robert Schoen

    Tuesday, September 20, 2011 3:52 PM
  • Wow!! This one simply could be the longest thread on this forum. I really appreciate the efforts from all involved & also @Mike's he was stuck till last until the issue got resolved, many would have never tried the proposed options/ solutions :) Next time I get a blank screen, I have something to try too :) Thanks & Regards Supreet
    Supreet
    Tuesday, September 20, 2011 4:00 PM
  • Found a permanent (?) solution to this, hope it hasn't broken too much else. Ironically it was while trying to install VMWare Workstation where I encountered the same issue:

    http://support.microsoft.com/kb/886549

    Why VMWare you ask? because - unbelievably - the Win8 Developer Preview won't install into Virtual PC...

     


    Mike
    Tuesday, October 25, 2011 8:22 PM