Click here to Skip to main content
15,884,537 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Is that possible to restrict URL editing in the MVC application?

The pattern to take a page is like "controller/ActionResult" by hyper link. Even if the user can enter the URL and get into the page.So how to restrict user to access page using direct URL.
Posted
Updated 2-Dec-15 17:48pm
v3
Comments
Sergey Alexandrovich Kryukov 2-Dec-15 23:09pm    
I have no clue what could it possibly mean. Any explanation?
—SA

That's what pretty URLs such as controller/action/ are used for, so that the user can easily navigate the site by simply modifying the URL.
So the answer is - you can't control this.

There's a another workaround here[^]. (but I'd not do that)

-KR
 
Share this answer
 
v2
If you want to stop people accessing certain urls then implement some kind of authentication like Identity or similar. You can't stop people amending the url.

http://forums.asp.net/post/5825782.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900