Request.IsAuthenticated problem with Cache in ASP.NET?

First off, in an MVC application do not use the %@ OutputCache % directive on a view. Caching should be done at the controller level, not at the view level. Use the OutputCache attribute instead of %@ OutputCache % .

See http://www.asp.net/learn/mvc/tutorial-15-cs.aspx for an example of how to do this.

By definition, you are caching the page and the resulting page will not be modified. So once you cache it with Request. IsAuthenticated == True, then it will continue to display that result and will not be regenerated until the cache expires or your other conditions you have present dictate for it to.

I think what you need, if your caching it, is two different pages: one for authenticated users and one for unauthenticated users.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions