0

Hi all,
In my site, there is timeout session 30 minutes.

After 30 minutes as I press on logout.
Exception(Validation of Mac fialed.If thos applicationis hosted by a web farm or cluster,ensure that <machinekey>configuration specifies the same key and validation algorithm.Autogenerate cannot be used in cluster.) occurs in my page very badly.
I have handled that code in try-catch block but still it is not working.

try
{
            Session.Abandon();           
            Session.RemoveAll();           
            Response.Redirect("~/Default.aspx", false);
}
catch(Exception ex)
{
}

If anything wrong ,please suggest me the way.

2
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by Nitin Daphale
0

Add <pages enableViewStateMac="false" enableEventValidation="false" viewStateEncryptionMode ="Never" /> in <system.web>

But this could cause some security issues .As of now I haven't figured out any issues, but it works.

0

Please post/attach .aspx here. Please use BB code tags while posting source program.

[code]

.... [/code]

0

Here I have posted attachments page(subjects.aspx) and it's master page(Customer.master).

And one thing I need to clear that, my problem is solved as I have already explained.
I am curious about what kind of issues will I face in future .
If there is an another way please suggest.

Edited by happygeek: fixed formatting

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.