The default view is not displayed when you deploy HotTowel SPA to IIS

advertisements

I have a SPA project in VS 2013 using Angular.js and HotTowel and Breeze. It works fine on my development machine but when I deploy it to IIS 8.0 on a webserver running Windows Server 2012 it fails. The framework loads but it does not load my default view. It simply flashes the splash page and shows an empty browser.

I can walk through the js code using the Developer Tools but it never loads my default view into the index.html.

Using the developer tools in IE, I set breakpoints in the config.route.js to walk through the process of determining what page will be loaded into the SPA. It appears to be coming up with the correct page. The page that is supposed to load is called request.html so I also placed a breakpoint in the request.js to see if it was failing on the load. It never hits this breakpoint.

I am hoping that perhaps somebody has run into these same or similar issues when deploying an SPA to IIS.

Thanks for any help that can be given. In the meantime, I will keep searching.

JG


Success at last! As stated in the comments I found there were some path issues in the index.html. I managed to fix the problem by removing the leading '\' from the data-ng-include for the shell.html.

Was:

<div data-ng-include="'/app/layout/shell.html'"></div>

Now:

<div data-ng-include="'app/layout/shell.html'"></div>

This enabled the code to find the proper directory level for the shell.html. I was concerned that this would break the code for the dev environment but it works fine.

I then found that I needed to fix similar paths in the directives.js file in the function for the ccWidgetHeader. The templateUrl had to be modified.

Was:

/app/layout/widgetheader.html

Now:

app/layout/widgetheader.html

Finally I had to modify the style.css to fix a path for a logo image in the header.

Was:

.navbar .brand {
background: url(/content/images/fcma-biostar.png) no-repeat left center !important;
margin-left: -6px;
padding: 35px 50px;

}

Now:

.navbar .brand {
background: url(images/fcma-biostar.png) no-repeat left center !important;
margin-left: -6px;
padding: 35px 50px;

}

Many Thanks! to PW Kad and fops for chiming in on this issue!