locked
HotTowel doesn't work on azure? RRS feed

All replies

  • User-105429085 posted

    If you change web.config debug="true" to "false" and ctrl-f5 (not f5) locally, you will most likely see the same problem.  Then you can try to figure out what is wrong locally.  If that's not the problem, please check if the deployment successful in azure or if you need to redeploy with the removing extra files option on from visual studio publish flag.

    Sunday, October 20, 2013 10:43 PM
  • User-1873393951 posted

    Guess what. i published the site after changing "Settings -> Configuration:" to Debug and everything works. Seems the default "Release" doesn't work.

    Sunday, October 20, 2013 11:35 PM
  • User-105429085 posted

    This is because bundling and minification only kick in if it's in release mode (i.e. debug="false" in web.config).  You should be able to repro your problem then locally when changing debug="false" in web.config.  Look for any if debug statement in your cshtml and .cs code to see if there is anything that is different between debug and release mode.  (updated to correct to debug="false" 11:58, 10/20/2013)

    Sunday, October 20, 2013 11:52 PM
  • User-1873393951 posted

    The web.config has debug="true". I ran the site using "Rease" in VS 2013 and it works without any error. However, I still see "Sulution '..' =>Windows Internet Explorer => blank" has individual js files for jquery, knockout-2.3.0.debug.js, ...

    <system.web>
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" />
    </system.web>

    Monday, October 21, 2013 2:54 AM
  • User-105429085 posted

    change to debug="false" and ctrl-f5 in your local environment to see if it repros in your local environment.

    Monday, October 21, 2013 2:57 AM
  • User-1873393951 posted

    Yes, I reproduced the error by set teh debug to false. What I need to do to make sure the release version with debug = false runs without error?

    Line: 16
    Error: 'ko' is undefined

    Monday, October 21, 2013 3:32 AM
  • User-105429085 posted

    Do your cshtml file contains the following?


    @if(HttpContext.Current.IsDebuggingEnabled) {
            <script type="text/javascript" src="~/App/durandal/amd/require.js" data-main="@Url.Content("~/App/main")"></script>
        } else {
      <!-- Remember to run the Durandal optimizer.exe to create the main-built.js  -->
            <script type="text/javascript" src="~/App/main-built.js"></script>
        }

    If so, you are most likely using the old version of hottowel, which includes this by default, and require you reference http://durandaljs.com/documentation/Automating-Builds-with-Visual-Studio/ to do an optimization.

    With newer version of hottowel, the optimization becomes optional somehow.

    If this is the case, one option is to remove the above code and only have something like this:
            <script type="text/javascript" src="~/App/durandal/amd/require.js" data-main="@Url.Content("~/App/main")"></script>

    Another option is to try to upgrade to newest hottowel, and optimize main-built.js according to durandal link.

    Monday, October 21, 2013 3:50 AM
  • User-1873393951 posted

    I searched the text "IsDebuggingEnabled" in the project and it's not found. I use NuGet to get the HotTowel about 20 days ago. What's the newest version of HotTowel now?

    Monday, October 21, 2013 11:32 AM
  • User-105429085 posted

    You can use NuGet packge Manager to see if you have the latest version and if needs to be updated.

    Sounds like you have the new one, so you can try to download the Hottowel template and create a MVC4 Hottowel project, then make sure it works in release mode, then compare the two projects to see the difference...

    Monday, October 21, 2013 7:04 PM
  • User-1873393951 posted

    I tried to check the available upgrade packages using NuGet. It shows 39 updatable packages but HotTowel is not there. The components of HotTowel are in the list though. For example, jQuery can be upgraded from 1.9.1 to 2.0.3 and bootStrap can be upgraded to 3.0.

    I created the site using VS 2013. I first created a Asp.Net MVC project and then used NuGet to add HotTowel.

    Which file I should compare after I create an workable project. Or should I keep using debug mode and wait for the new version of HotTowel?

    Monday, October 21, 2013 10:48 PM
  • User-105429085 posted

    To create a sample/working hottowel Project, download and install http://visualstudiogall/ery.msdn.microsoft.com/1eb8780d-d522-4dcf-bf56-56f0eab305c2

    In VS2013, create a MVC4 project from  C#/web/VS2012 node, choose hottowel template from there.

    Try out the release mode, it should work there.

    Then compare all the files, especially the bundle/minification part to see what's wrong in the release mode...

    Monday, October 21, 2013 11:04 PM