473,325 Members | 2,860 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,325 software developers and data experts.

random FileIOPermission error

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(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
Aug 1 '06 #1
8 1806
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\Tem porary 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 (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
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.

Aug 2 '06 #2
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

"Walter Wang [MSFT]" <wa****@online.microsoft.comwrote in message
news:sx**************@TK2MSFTNGXA01.phx.gbl...
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\Tem porary 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 (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
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.

Aug 9 '06 #3
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 (wa****@online.microsoft.com, 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.

Aug 10 '06 #4
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


"Walter Wang [MSFT]" <wa****@online.microsoft.comwrote in message
news:3j**************@TK2MSFTNGXA01.phx.gbl...
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 (wa****@online.microsoft.com, 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.

Aug 10 '06 #5
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 (wa****@online.microsoft.com, 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.

Aug 11 '06 #6
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
"Nalaka" <na******@nospam.nospamwrote in message
news:Oj**************@TK2MSFTNGP03.phx.gbl...
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(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


Aug 14 '06 #7
Thanks Walter....
I will create the smallest project that gives this problem, and send it....

Thanks
Nalaka

"Walter Wang [MSFT]" <wa****@online.microsoft.comwrote in message
news:Qk**************@TK2MSFTNGXA01.phx.gbl...
Hi Nalaka,

I was unable to reproduce the issue based on your provided information.
Here's my steps:

1) Create a web site on remote IIS 6.0 server
2) Add a master page, add an post-cache substituation with
<asp:substituationcontrol
3) Add a content page, enable its output cache; include a javascript
reference;
4) Add global.asax, add Application_PreRequestHandlerExecute;
5) View the content page in browser, then manually copy over the content
page to update it; then refresh the page in browser

I'm sure there must have some specific things that I didn't catch using
this simple project. Would you please take some time to see if it's
possible to create a repro project based on it?

I'll attach the web site I'm using here. (You may need to use Outlook
Express to download attachments)

Regards,
Walter Wang (wa****@online.microsoft.com, 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.

Aug 15 '06 #8
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 (wa****@online.microsoft.com, 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.

Aug 17 '06 #9

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

Similar topics

0
by: Ant Corrie | last post by:
I am at a loss as to why this is not working. I am trying to setup a TextWriterTraceListener in my application config file and then execute the app from the network. I get a security exception...
0
by: paul | last post by:
I just installed Windows XP SP2 on my web server. Now when I run one of the web applications I get the following error: ArgumentException: Illegal characters in path.] ...
6
by: schaf | last post by:
Hi NG ! I have the following piece of code below. the first try/catch part would return true although I do not have permission to access this computer. The second try/catch part would return...
1
by: Marquis | last post by:
I have put the C# Form onito the Internet as an ActiveX Control. However, I cannot do the FileOpen Dialog as I don't have permission, how to solve this problem? Below is the error code:...
0
by: Carl Gilbert | last post by:
Hi I have recently got the ASP.NET 2.0 Clubsite Starter Kit up and running on my 1&1 web space. Recently I have started getting lots of exceptions and white pages. I have put some code in...
2
by: Nalaka | last post by:
Hi, I get the following error, I thought at random intervals. Then I realized, that this happens around the time tha page outputCache is set to expire. So I disabled the page output cache and the...
2
by: Nalaka | last post by:
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...
3
by: Mike | last post by:
Hi I have problem as folow: Caught Exception: System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Request for the permission of type...
1
by: innes | last post by:
Hi, I'm trying to test permission to access the file system, using FileIOPermission, but can't seem to get it to work. See my sample app below, for an app that tries to demand a permission to...
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...
1
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: 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: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.