开发者

asp.net URL like www.example.com/(S(tx5h2k3fhz3uicis3vbrga55))/mypage.aspx

开发者 https://www.devze.com 2023-04-05 20:31 出处:网络
I want to create asp.net dynamic url webpage lik a开发者_运维百科sp.net URL like www.example.com/(S(tx5h2k3fhz3uicis3vbrga55))/mypage.aspx

I want to create asp.net dynamic url webpage lik

a开发者_运维百科sp.net URL like www.example.com/(S(tx5h2k3fhz3uicis3vbrga55))/mypage.aspx

How can I create it ?


URL will be displayed when you set cookielesssession to "true". Open the web.config file and insert <sessionState cookieless="true" />.

<system.web>
    .....
    <sessionState cookieless="true" />
</system.web>


There can be multiple ways to achieve it - basically, you have to generate tokens that need to be used in url (for random tokens, you may use GUIDs), you need to write Http Module that will intercept the url, extract the token from it and pass the control to actual http handler (page) along with the token.

Fortunately, this has already been built into ASP.NET 4 - take a look at ASP.NET Routing.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号