Showing posts with label Bootstrap 3. Show all posts
Showing posts with label Bootstrap 3. Show all posts

Wednesday, July 6, 2016

Bootstrap 3 and IE11 clash. Flushing footer to bottom of the page, twitter bootstrap

Problem:


I was having issues with my site in IE 11.  Chrome and other browsers were doing fine.
The site navigation bars would not work with the vertical scroll.  The behavior was quite ugly.  The page would render correctly and the navigation menus would work fine.  As soon as the user scrolled the fixed horizontal navigation bar would spread all over the screen.  The only way to get the browser to redraw the screen was to resize the window.  This is hardly a state I can hand over a solution to a customer.:



Solution:

This was a footer and bootstrap problem.  First issue was that the main screen was using a fixed position reference which would not work properly in ie 11. 


{
  position:fixed;
}


The fixed property forced the footer to stay in place but the navigation bar would bleed into the main work area. 


Step 1: Removed the fixed position but then the footer started to move around. 


Step 2: The final fix was to use the bootstrap css class,navbar-fixed-bottom, this forced the footer to stay in place.


<div class="navbar-fixed-bottom">
...
</div>







Source:

  1. http://stackoverflow.com/questions/10099422/flushing-footer-to-bottom-of-the-page-twitter-bootstrap
  2. https://getbootstrap.com/examples/navbar-fixed-top/
  3. https://getbootstrap.com/components/#navbar
  4. http://getbootstrap.com/components/#navbar-fixed-bottom

Tuesday, April 5, 2016

MVC 5 bootstrap template not running under IIS express 7 -- Take 2

Problem:

Posted this problem earlier and gave a solution which seemed to work. 


"I have been running MVC project using default bootstrap template.  It works fine when I deploy it to our staging server.  When I attempt to run it locally on my desktop none of the bootstrap files are working.  I get no branding.


I wracked my brain on this and thought it might be missing files.  Then hit f12 on the browser and saw several of these gems:"






My original solution did not get it right

Appears that the css and js files are being blocked in iis express.  I am running this site using SSL and ADFS trust.  This appears to be causing some issues with local file access.  I know that IIS express runs as the local user.  I still granted IUSR and IIS_USRS accounts full access to the folders where the site was running on my local box.  This appears to have resolved the issue.

The real issue is NOT IUSR access to the local project folders.  Stack overflow gave me a push in the right direction.  The line: "I have Anonymous Authentication and Forms Authentication disabled. ASP.NET Impersonation and Windows Authentication are both enabled." helped me recognize that in IIS Express I might need to check the solution properties.

Solution:

Closer inspection of the properties see image 1 shows that the Windows Auth is set ot disabled. 




Image 1


My particular application is using SSL and PKI authentication.  The project needs to enable windows auth for my images and scripts to be available to the application in IIS Express.  Image 2 shows the Windows Authentication


Image 2
Once you set the Windows Auth to Enabled this will grant permissions to images, scripts and styles.




Source:

  1. http://fetchmytip.blogspot.com/2016/03/systemsecuritycryptographycryptographic.html
  2. http://stackoverflow.com/questions/16902601/http-error-401-2-unauthorized-for-new-site-in-a-working-app-pool

Tuesday, March 29, 2016

MVC 5 bootstrap template not running under IIS express 7

Problem:

I have been running MVC project using default bootstrap template.  It works fine when I deploy it to our staging server.  When I attempt to run it locally on my desktop none of the bootstrap files are working.  I get no branding.


I wracked my brain on this and thought it might be missing files.  Then hit f12 on the browser and saw several of these gems:


Error:
Failed to load resource: the server https://localhost/Scripts/Content/bootstrap.css responded with a status of 401 (Unauthorized)

Issue:

Appears that the css and js files are being blocked in iis express.  I am running this site using SSL and ADFS trust.  This appears to be causing some issues with local file access.  I know that IIS express runs as the local user.  I still granted IUSR and IIS_USRS accounts full access to the folders where the site was running on my local box.  This appears to have resolved the issue.




Source:

http://stackoverflow.com/questions/25973749/failed-to-load-resource-the-server-responded-with-a-status-of-401-unauthorized
http://stackoverflow.com/questions/5388698/mvc-i-have-deployed-my-application-but-css-only-works-when-i-log-in