Supporting Authentication for HTML files in ASP.Net MVC -


i have web application developed in asp.net mvc, hosted in iis. client has provided set of html files help. have provided link html files in our application. html files stored in folder within web-directory of hosted applications. expectation html pages should not accessed unauthorized users. static pages , if know url, can directly access providing address in address-bar. please suggest how overcome?

i had problem pdfs ( not html) resolve did :

public class myfilecontroller : controller {        [accesscontrol]     public fileresult pdf()     {         return file(@"filepath\file.pdf", "system.net.mime.mediatypenames.application.pdf");     } } 

try system.net.mime.mediatypenames.text.html


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -