random FileIOPermission error

N

Nalaka

Hi,
I get the following error at times... I do not read or write to files.
I do query sql server.
This error does not happen all the time either.....

Have you seen this before.... any help is very much appreciated.. as I have
spent a lot of time looking for a fix.

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(Object
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(OutputCacheParameters
cacheSettings)
at ASP.default_aspx.FrameworkInitialize() in
d:\Inetpub\domainid109410\main\Default.aspx.cs:line 912309
at System.Web.UI.Page.ProcessRequest(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext 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\Temporary ASP.NET
Files\main\f93c3771\1586979\App_Web_-ekklo09.4.cs:line 0
at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)


Thanks
Nalaka
 
W

Walter Wang [MSFT]

Hi Nalaka,

There's a high chance that you're running background Anti-Virus or Indexing
Service which may interfere with ASP.NET engine. Try to exclude
"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files"
from the Anti-Virus or Indexing Service's scanning folders.

You can also try to use FileMon from
http://www.sysinternals.com/Utilities/Filemon.html to see which exact
errors are reported.

Hope this helps. Please feel free to post here if anything is unclear.

Sincerely,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.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/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
N

Nalaka

Hi Walter,
The problem is resolved yet.....

It seems like this only happens when I xcopy a new version of a perticular
..aspx to the server.
(The problem only happens in this page.)

This .aspx has following that is not in other pages.
1. Has output caching
2. Calls a javascript that is on the server.

Wonder is the new version causes some problem with the caching and
JavaScript call.
Thereason I am thinking of Javascript is cause this is a FileIO exception.


Thanks
Nalaka
 
W

Walter Wang [MSFT]

Hi Nalaka,

1) Does this issue only exist on one particular server? If not, is it
possible to create a simpler repro project?
2) Have you tried to turn off the OutputCache?
3) Since you mentioned that you think javascript is causing the problem,
have you tried to remove the javascript tempoarily?

Excuse me for asking so much questions, but knowing much information will
help us to better diagnose this issue.

Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
N

Nalaka

Hi Walter,
Now, I also move web.config.... every time I move a updated file.
Problem has not happend after that...
(I think moving web.config causes server to re-compile the whole app...)

I the problem stops like this... then I will try to recreate the problem
later.

Thanks
Nalaka
 
W

Walter Wang [MSFT]

Hi Nalaka,

Thanks for the info. You are right that change web.config will make the
whole website restart and recompile. If this stops the problem, then it's
very much likely that the webform page may have some dependencies or some
other pages are dependent on it?

I'm looking forward to your repro project.


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
N

Nalaka

Hi,
I stopped caching (output cache) this page, and the error stopped.

Now have to figure out what exactly causes this random error, when the
output cache is enabled.
It seems like the error happens when a new page is generated.
(sometimes the very first time, sometimes when the output-cache is expired,
and when to regenerate new page)

Some info:
1. This is the only page in the site that had output caching.
2. Master page (common to all pages) has post cache substitution.
3. I enabled some code in Application_PreRequestHandlerExecute
(created a thread to log visitor information)
Gather information from cookies, and session.
4. Only page that loads a javascript from server.

Thanks
Nalaka
 
N

Nalaka

Thanks Walter....
I will create the smallest project that gives this problem, and send it....

Thanks
Nalaka
 
W

Walter Wang [MSFT]

Hi Nalaka,

I don't know if you ever had a chance to test the web site on a different
server, this may prove it's related to the server or to the code.

Normally if I would be debugging such problem, I would take following steps:

1) Create a copy of the web site
2) Remove irrelevant files from the web site, everytime when you remove the
files, make sure the problematic page still works (and still fails randomly)
3) Or try to comment out code in the problematic page
4) Repeat step 2 or 3 until the problem goes away; remember what did you
just removed, and that maybe the root cause of this problem.

I'm looking forward to your findings...


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,044
Latest member
RonaldNen

Latest Threads

Top