473,465 Members | 1,747 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Permissions Error - FileIOPermission (aspx) and ImageFetch (ashx)

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 global.asax to email me when an error occurs. The
site doesn't get that much traffic, perhaps a couple of hundred hits a day.
I've made some charts from the logs I get from 1&1 and the emails I received
reporting bugs and there doesn't seem to be much correlation between bugs
and traffic/visitors.

I have uploaded the charts here: http://bwbfc.co.uk/bug/badgerbug.html and I
have included some sample errors at the bottom of this post. About 80% are
the same as sample 1 and the rest are the same as sample 2. Most of error 1
are for the default page but these spring up all over the place (gallery,
forum, etc) and nearly all of error 2 are for imageFetch.ashx.

I have also included the code in my global.asax file in this post.

The database holds the images. Here's some figures about my database:
Size : 35.19MB
*** DATA ***
Size : 19456 KB
Max size : 204800 KB
Growth : 10%
Usage : data only
*** LOG ***
Size : 16576 KB
Max size : Unlimited
Growth : 10%
Usage : log only

Would it help if I kept the images in a folder rather than in the database?
At the moment I only about 200 images in the database.

I'm completely at a loss of what to do next. I can't re-produce the error
locally.
I have shared MS hosting with 1&1 and as such have virtually no access to
the server and things like IIS.
I tried putting more debug output in my global.asax (trying to get the inner
exception, base exception, source, stack trace, etc) but it all comes back
with the same stuff.

If it helps I can post more info from my log files. You can visit the site
here www.bwbfc.co.uk. Who knows, perhaps you'll get lucky and get a blank
page and I'll get an email.

What can I try next?

Regards, Carl Gilbert
******************* SAMPLE ERROR 1 **************************
Error Caught in Application_Error event\n
Error in: http://bwbfc.co.uk/bb/default.aspx\n
Error Message:Request for the permission of type
'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.\n\n

REMOTE_ADDR: 192.18.1.4\n
HTTP_ACCEPT_LANGUAGE: en-gb,en;q=0.5\n
HTTP_REFERER: \n
HTTP_USER_AGENT: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.7)
Gecko/20060909 Firefox/1.5.0.7\n
HTTP_COOKIE: s_vi=[CS]v1|446D9B3200005BE2-A290AA30000071B[CE];
s_nr=1157461660941;
s_pers=%20s_vsn_paypalglobal%3D5432741905408%7C147 1514326747%3B;
..ASPXAUTH=2639693E36792FFC896623FCA1D37378B82CF02 C321308B53BE72F2D9D8C3F01C223FAE69C4DA41EC98BE7831 6E1AC7621A7C7E3A988F21D44EF32D9B934B6E0F09C51ED7CC 035E23FA04ABB8E2BC4F6;
ASPSESSIONIDCAQBQQBS=DIGJPCEAKPLFHOFEFNDMJJBH\n\n\ n

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.CachedPathData.GetConfigPathData(String configPath) at
System.Web.CachedPathData.GetVirtualPathData(Virtu alPath virtualPath,
Boolean permitPathsOutsideApp) at
System.Web.HttpContext.GetPathData(VirtualPath path) at
System.Web.Security.UrlAuthorizationModule.IsUserA llowedToPath(HttpContext
context, VirtualPath virtualPath) at
System.Web.UI.Util.IsUserAllowedToPath(HttpContext context, VirtualPath
virtualPath) at System.Web.SiteMapProvider.IsAccessibleToUser(Http Context
context, SiteMapNode node) at
System.Web.SiteMapNode.IsAccessibleToUser(HttpCont ext context) at
System.Web.StaticSiteMapProvider.GetChildNodes(Sit eMapNode node) at
System.Web.SiteMapNode.get_ChildNodes() at
System.Web.UI.WebControls.SiteMapDataSource.GetNod es() at
System.Web.UI.WebControls.SiteMapDataSource.GetPat hNodeCollection(String
viewPath) at System.Web.UI.WebControls.SiteMapDataSource.GetVie w(String
viewName) at
System.Web.UI.WebControls.SiteMapDataSource.System .Web.UI.IDataSource.GetView(String
viewName) at System.Web.UI.WebControls.Repeater.ConnectToDataSo urceView() at
System.Web.UI.WebControls.Repeater.OnLoad(EventArg s e) at
System.Web.UI.Control.LoadRecursive() at
System.Web.UI.Control.LoadRecursive() at
System.Web.UI.Control.LoadRecursive() at
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint) 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) at
System.Web.HttpApplication.CallHandlerExecutionSte p.System.Web.HttpApplication.IExecutionStep.Execut e()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously)
************************************************** ************
******************* SAMPLE ERROR 2 **************************
Error Caught in Application_Error event\n
Error in: http://bwbfc.co.uk/bb/imagefetch.ash...&imageid=126\n
Error Message:Object reference not set to an instance of an object.\n\n

REMOTE_ADDR: 198.36.87.81\n
HTTP_ACCEPT_LANGUAGE: en-gb\n
HTTP_REFERER: http://bwbfc.co.uk/bb/Photoalbum_con...x?Albumid=10\n
HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.1.4322)\n
HTTP_COOKIE: \n\n\n

Stack Trace: at ImageFetch.writeSingleImage(Int32 ImageID, Int32 size,
Stream output) at ImageFetch.ProcessRequest(HttpContext context) at
System.Web.HttpApplication.CallHandlerExecutionSte p.System.Web.HttpApplication.IExecutionStep.Execut e()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously)
************************************************** ************

************ GLOBAL.ASAX EVENT HANDLER *******************
Protected Sub Application_Error(ByVal sender As Object, ByVal e As
System.EventArgs)
Dim objErr As Exception = Server.GetLastError.GetBaseException
Dim strMsg As String = "Error Caught in Application_Error event\n" +
_
"<br>Error in: <a href='" + Request.Url.ToString() + "'>" +
Request.Url.ToString() + "</a>" + _
"\n<br>Error Message:" + objErr.Message.ToString() + _
"\n\n<br><br>REMOTE_ADDR: " +
Request.ServerVariables("REMOTE_ADDR") + "</a>" + _
"\n<br>HTTP_ACCEPT_LANGUAGE: " +
Request.ServerVariables("HTTP_ACCEPT_LANGUAGE") + _
"\n<br>HTTP_REFERER: " + Request.ServerVariables("HTTP_REFERER")
+ _
"\n<br>HTTP_USER_AGENT: " +
Request.ServerVariables("HTTP_USER_AGENT") + _
"\n<br>HTTP_COOKIE: " + Request.ServerVariables("HTTP_COOKIE") +
"\n\n\n<br><br>Stack Trace:" + objErr.StackTrace.ToString

'EventLog.WriteEntry("Sample_WebApp",err,EventLogE ntryType.Error);
Server.ClearError()
Dim strSbj As String = "edream.org Application Error"
'Mailer.send(strMsg, strSbj);
'additional actions...
HttpContext.Current.Response.Redirect("~/ErrorPage.htm")
End Sub
************************************************** ************


Oct 4 '06 #1
0 1948

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

Similar topics

2
by: lobrys | last post by:
hi I build a VB .NET application that makes file access, environnemet acess, database access, etc.... If I ran the app locally, everything works....(normal) If I copy the app on a server, and...
0
by: Jeff | last post by:
I am trying to write some C# code that will allow me to determine if the current user running my application has "write" permissions to a particular folder. However, I can't seem to get it to...
10
by: Maximus | last post by:
Have any of you ever set permissions programatically on a folder aspnet user thorugh an application. Any help will be greatly appreciated. Thanks.
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.] ...
3
by: Larry Serflaten | last post by:
I just put a simple exe out on the internet and tried to run it. All it does is manipulate its own images and respond to its own controls, but the darn thing needed FULL TRUST to run properly! ...
2
by: leeedw | last post by:
Hi All, I have a windows app that runs perfectly on my machine, but when I try to run it over the network it bombs. I get a permissions error. Here is the code, I even tried adding...
1
by: Usman Ghani | last post by:
Hi, I am trying to develop an activex control with the .Net by exposing an interface to the com as described in the following article....
8
by: jporter188 | last post by:
Hello, I am working on a project to manipulate XML files. All of the files, the code, and the output are on network drives. When I run my program I get an exception (see below). I tried giving...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.