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.

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.

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

[code]

.... [/code]

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.