Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
SignalR: Real-time Application Development - Second Edition

You're reading from   SignalR: Real-time Application Development - Second Edition A fast-paced guide to develop, test, and deliver real-time communication in your .NET applications using SignalR

Arrow left icon
Product type Paperback
Published in Sep 2015
Publisher Packt
ISBN-13 9781785285455
Length 222 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Einar Ingerbrigsten Einar Ingerbrigsten
Author Profile Icon Einar Ingerbrigsten
Einar Ingerbrigsten
Arrow right icon
View More author details
Toc

Putting the infrastructure in place

First of all, since our web application is built from HTML files and not ASPX or ASP.NET MVC controllers, we need to be able to have security in place for these as well, so we get redirected to a login page when not authenticated. There are a couple of approaches one can choose in order to make the security pipeline of ASP.NET kick in for static files such as HTML files; one of the approaches could be to enable all the HTTP modules to run for all the requests, but that would mean a potential performance hit for static content. So instead, we're going to tell ASP.NET to deal with the .html files specifically:

  1. We will need to do a few changes to the Web.config file sitting in the web project to accomplish this. In the compilation tag sitting at the top, we need to add the page build providers for the extensions we want to support:
    <compilation debug="true" targetFramework="4.5">
      <buildProviders>
        <add extension...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image