Hi Nalaka,
Regarding on this "Code access security exception in ASP.NET 2.0
application when using output cache", I did ever found some former thread
discussing on this, also I've checked our internal database and found some
similar records.
For this problem, it is quite hard to troubleshoot especially when the host
environment is on a public web hoster. Mostly, the problem is due to that
the ASP.NET runtime occasionally demand a CAS permission which is beyound
the application's CAS policy configuration(configured through <trust
level="..." /in web.config file). And for public web hoster, it normally
will apply a very low and restricted CAS policy for hosted web
applications. And based on my research in former issues, ASP.NET 2.0 has a
new setting "processRequestInApplicationTrust" by providing an option to
execute the entire page processing code path in the application trust,
including the internal page processing code path and the associated ASP.NET
control
processing. This is configured with the processRequestInApplicationTrust
attribute in the <system.web><trustconfiguration section, and is enabled
by default. This setting may cause some of your code to break when it is
registered in the GAC due to the assumption that it will execute with
unrestricted permissions.
So for testing, you can try turning off this attribute to see whether it
helps:
<trust processRequestInApplicationTrust="false" />
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.