473,326 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Random error on asp.net app

Hi,
I get the following random error... on a asp.net 2.0 aplication.. running at
a hosting company (locally no issues).
It seems like this happens only when pageOutputCache is enabled and when the
app is running on a subDirectory (not root).

Some others that has the same issue.
http://communityserver.org/forums/t/480292.aspx
http://www.dotnetnuke.com/DotNetNuke...s/Default.aspx
http://communityserver.org/forums/t/472075.aspx
Error---------------------------------------------------------------------------
mscorlib
<br>Message: Request for the permission of type
'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
<br>Stack trace: at System.Security.CodeAccessSecurityEngine.Check(Obj ect
demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.IO.Path.GetFullPath(String path)
at System.Web.Util.FileUtil.IsSuspiciousPhysicalPath( String physicalPath,
Boolean& pathTooLong)
at System.Web.Util.FileUtil.IsSuspiciousPhysicalPath( String physicalPath)
at System.Web.CachedPathData.GetConfigPathData(String configPath)
at System.Web.CachedPathData.GetConfigPathData(String configPath)
at System.Web.UI.Page.InitOutputCache(OutputCachePara meters
cacheSettings)
at ASP.default_aspx.FrameworkInitialize() in
d:\Inetpub\domainid109410\main\Default.aspx.cs:lin e 912309
at System.Web.UI.Page.ProcessRequest(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.default_aspx.ProcessRequest(HttpContext context) in
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET
Files\main\f93c3771\1586979\App_Web_-ekklo09.4.cs:line 0
at
System.Web.HttpApplication.CallHandlerExecutionSte
p.System.Web.HttpApplication.IExecutionStep.Execut e()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously)
Thanks
Nalaka
Apr 23 '07 #1
2 2005
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.

Apr 24 '07 #2
Hi Nalaka,

Any progress on this issue or does the suggestion in my last reply helps
you some? Due to the complexity of this issue, if the problem you met
doesn't quite fit the scenario I mentioned preiviously, for further
thorough troubleshooting, I suggest you(or suggest your service host
provider) to contact CSS and continue work on this

http://msdn.microsoft.com/subscripti...t/default.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Apr 27 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Acacia | last post by:
How would you generate a random number in C++?
4
by: Robert Scheer | last post by:
Hi. Reading about the Math.random method I saw that by default it generates between 0 and 1. To generate numbers between a greater range I can use these syntaxes: x = Math.random()/10 x =...
10
by: Virus | last post by:
Ok well what I am trying to do is have 1.) the background color to change randomly with 5 different colors.(change on page load) 2,) 10 different quotes randomly fadeing in and out in random...
16
by: Jason | last post by:
Hi, I need a way to use random numbers in c++. In my c++ project, when using the mingw compiler I used a mersenne twister that is publicly available and this did its job well. Now I have...
1
by: John C | last post by:
Hi, I am trying to include the generation of random numbers in my c++ class. However I don't quite know how to incorporate it. To start with, I managed to get random numbers going via the...
9
by: greeningster | last post by:
I have written an application in Visual C++ for a customer but it seems to crash randomly. Could anyone give me any help on how I could track this down ? Also, there appears there might be...
10
by: Marshall Belew | last post by:
I'm trying to synchronize a network app that uses random numbers generated by System.Random. Rather than pass every randomly generated number, I just pass the seed. I'm seeing a result that leads...
5
by: jar13861 | last post by:
I'm confused on how to write a random array that will only generate 9 different numbers from 1-9. Here is what I have, but its only writing one number.... holder = new Array ( 9 ); var flag =...
1
by: ssims | last post by:
I've got this code for a random GDI+ chart generator, and the demo works, but when I try to run it on my local machine I get a compiler error: Compiler Error Message: CS0117: 'Random' does not...
0
by: urkel | last post by:
Hello everybody, I have these errors on C program that may be because of random number definition. I use an SSH to compile C like in Linux. May be you have idea whether the errors are due to the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.