locked
Lightswitch via Intranet - No CDN RRS feed

  • Question

  • Hi all, I appreciate this was dealt with in an earlier post ... I'm not sure that the info is still current with VS2013 now released?

    I need to run LightSwitch 'off the grid' and have all of the content provided locally.  I gather LS will now dynamically determine if the scripts exist locally BUT I'm unsure what to download to my scripts folder.

    I'm hoping NuGet? ... any tips on what to download and to where.

    Thanks in advance ... Garry

    Saturday, December 27, 2014 7:05 PM

Answers

  • GB,

    Simply look in default.htm to identify which files are CDN, then manually download and save those file in your scripts ditrectory.  Lastly, change the references in default.htm to use the local files.

    Like this:

    <script type="text/javascript" src="/scripts/MicrosoftAjax.js"></script>

    <script type="text/javascript" src="/scripts/globalize.min.js"></script>

    HTH,

    Josh

    • Marked as answer by Angie Xu Monday, January 5, 2015 12:21 PM
    Tuesday, December 30, 2014 1:49 PM

All replies

  • I need to run LightSwitch 'off the grid' and have all of the content provided locally.  I gather LS will now dynamically determine if the scripts exist locally BUT I'm unsure what to download to my scripts folder.

    Hi Garry,

    From your description above, if you want to create this local lightswitch application, you can follow this way to do that, you can upload files using LightSwitch, and store them on the server hard drive. see: Saving Files To File System With LightSwitch (Uploading Files) 

    If you have any concern, please let me know.

    Best regards,

    Angie


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, December 29, 2014 8:28 AM
  • Hi Angie,  No (but thank you!), I should have been a little clearer in my post.  The files in question are provided externally rather than from the local web app.   

    <script type="text/javascript"
    src="//ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js">
    </script>

    <script type="text/javascript"
    src="//ajax.aspnetcdn.com/ajax/globalize/0.1.1/globalize.min.js">
    </script>

    As I understand it if these files do exist locally they will be served locally.  BUT ... I don't have all of the files and would prefer to download all possible files rather than guess and only download a few.  I'm sure BethM posted on this at some stage but I can't find the post now.

    Thanks, GB

    Monday, December 29, 2014 8:38 AM
  • GB,

    Simply look in default.htm to identify which files are CDN, then manually download and save those file in your scripts ditrectory.  Lastly, change the references in default.htm to use the local files.

    Like this:

    <script type="text/javascript" src="/scripts/MicrosoftAjax.js"></script>

    <script type="text/javascript" src="/scripts/globalize.min.js"></script>

    HTH,

    Josh

    • Marked as answer by Angie Xu Monday, January 5, 2015 12:21 PM
    Tuesday, December 30, 2014 1:49 PM
  • Hey Josh, thanks and yes that does work.  What I found was that it then tries to down load some localised files (AU) as well.  Rather than try and catch all the possibles I was after the entire set of files so I can place them in the scripts folder.

    Also, as I understand it LS2013 is dynamic in that it tries locally first and then goes 'CDN' if necessary but I haven't been able to prove this.

    So ... (after my long explanation) ... I'm still looking for the full set of files to download ... GB

    Wednesday, December 31, 2014 4:35 AM
  • I think you're right about dynamic download of localization files when not present in the solution.

    Perhaps setup localization by following the steps in this article:

    http://msdn.microsoft.com/en-us/library/xx130603.aspx

    This way you will create the AU files that your project is looking for. 

    Alternatively, if you do not require any localization in your solution, you could try setting the default language to en-us in the project properties.  Maybe then no localization files will be required/downloaded.

    I think I've read about adding localization files for offline in the forums, but quick search turned up nothing.

    HTH,

    Josh

    Wednesday, December 31, 2014 12:32 PM
  • is there something wrong w the forums?  The above reply did not show on LS forum list nor on my activity feed, but the reply is indeed posted to the thread above.  This is the second time in recent days.  I've also been getting 404 errors in the forums for days...Oh well.
    Wednesday, December 31, 2014 12:35 PM