Secured Pages
It used to be when you created a page, you could set a property to require the page to be seen only when logged in and if someone tried to access it, it would go to the 401 error. Now (in 4.2), I have pages that I want to be visible on when logged in, but I have no idea how to route to a login page. I have set security on the pages for the correct roles, but users trying to access the page when not logged in, get a "this type of page is not served" error. What is the correct way to handle secured pages in 4.2?
Hi Allen,
I am not sure if I understand you, but I guess that you need a way to redirect user from "this type of page is not served" error page to login page. This can be done by inserting few lines in web.config:
<
system.webServer
>
<
httpErrors
errorMode
=
"Custom"
existingResponse
=
"Replace"
>
<
clear
/>
<
error
statusCode
=
"404"
path
=
"404page.aspx"
responseMode
=
"Redirect"
/>
<
error
statusCode
=
"403"
path
=
"403page.aspx"
responseMode
=
"Redirect"
/>
</
httpErrors
>
...