473,480 Members | 2,324 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to debug a web appplication?

Hi

I have implemented the ASP.NET Club Site Starter Kit on my 1&1 web
space.
I have recently been getting some errors where the page doesn't load
and just comes up blank. I have put a handler on Application_Error in
global.asax to email me whenever an error occurs. Sometimes I get upto
100 in an hour which is rather concerning.

I have looked at the error message returned but I can't seem to work
out what's causing the error.

How can I debug the application to track down the error? I have quite
a bit of experience with VB.NET so I understand the concept of break
points and stack traces but it all seems a bit scary when it's on the
web.

I have included the code I have in my global.asax and the error message
I get at the bottom of this post. Should I try running the app on
local host or is there some sort of component or change I can make
somewhere to track down the error online?

Note: I didn't write the error notification code. Theres a line which
logs to an event log. Would it help if I un-comment this and see what
that does?

Regards, Carl Gilbert

****** 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 = "BWBFC Application Error"
ClubSiteMailer.Mailer.Send(strMsg, strSbj)

End Sub

****** ERROR MESSAGE ******

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: 217.37.196.9\n
HTTP_ACCEPT_LANGUAGE: en-gb\n
HTTP_REFERER: \n
HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
SV1; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; WinFX RunTime
3.0.50727)\n
HTTP_COOKIE: \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)

Sep 28 '06 #1
5 2134
I also get this error quite a lot:
****** IMAGE FETCH ERROR ******
Error Caught in Application_Error event\n
Error in: http://bwbfc.co.uk/bb/imagefetch.ash...&imageid=118\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

Sep 28 '06 #2
Here's a simple walkthrough for debugging basics :
http://msdn2.microsoft.com/en-us/library/z9e7w6cs.aspx

For deeper understanding, you'd do well to familiarize yourself with this material :
http://msdn.microsoft.com/library/de..._framework.asp


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Carl Gilbert" <mr*************@hotmail.comwrote in message
news:11*********************@b28g2000cwb.googlegro ups.com...
Hi

I have implemented the ASP.NET Club Site Starter Kit on my 1&1 web
space.
I have recently been getting some errors where the page doesn't load
and just comes up blank. I have put a handler on Application_Error in
global.asax to email me whenever an error occurs. Sometimes I get upto
100 in an hour which is rather concerning.

I have looked at the error message returned but I can't seem to work
out what's causing the error.

How can I debug the application to track down the error? I have quite
a bit of experience with VB.NET so I understand the concept of break
points and stack traces but it all seems a bit scary when it's on the
web.

I have included the code I have in my global.asax and the error message
I get at the bottom of this post. Should I try running the app on
local host or is there some sort of component or change I can make
somewhere to track down the error online?

Note: I didn't write the error notification code. Theres a line which
logs to an event log. Would it help if I un-comment this and see what
that does?

Regards, Carl Gilbert

****** 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 = "BWBFC Application Error"
ClubSiteMailer.Mailer.Send(strMsg, strSbj)

End Sub

****** ERROR MESSAGE ******

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: 217.37.196.9\n
HTTP_ACCEPT_LANGUAGE: en-gb\n
HTTP_REFERER: \n
HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
SV1; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; WinFX RunTime
3.0.50727)\n
HTTP_COOKIE: \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)

Sep 28 '06 #3
Is there anyway to debug an application online?
I've put output logic in the global.asax but this isn't giving me enough
information. Plus, as I'm using shared hosting I have virtually no access
to the server to perform any monitoring.

Carl

"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:eG**************@TK2MSFTNGP04.phx.gbl...
Here's a simple walkthrough for debugging basics :
http://msdn2.microsoft.com/en-us/library/z9e7w6cs.aspx

For deeper understanding, you'd do well to familiarize yourself with this
material :
http://msdn.microsoft.com/library/de..._framework.asp


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Carl Gilbert" <mr*************@hotmail.comwrote in message
news:11*********************@b28g2000cwb.googlegro ups.com...
>Hi

I have implemented the ASP.NET Club Site Starter Kit on my 1&1 web
space.
I have recently been getting some errors where the page doesn't load
and just comes up blank. I have put a handler on Application_Error in
global.asax to email me whenever an error occurs. Sometimes I get upto
100 in an hour which is rather concerning.

I have looked at the error message returned but I can't seem to work
out what's causing the error.

How can I debug the application to track down the error? I have quite
a bit of experience with VB.NET so I understand the concept of break
points and stack traces but it all seems a bit scary when it's on the
web.

I have included the code I have in my global.asax and the error message
I get at the bottom of this post. Should I try running the app on
local host or is there some sort of component or change I can make
somewhere to track down the error online?

Note: I didn't write the error notification code. Theres a line which
logs to an event log. Would it help if I un-comment this and see what
that does?

Regards, Carl Gilbert

****** 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,EventLog EntryType.Error);
Server.ClearError()
Dim strSbj As String = "BWBFC Application Error"
ClubSiteMailer.Mailer.Send(strMsg, strSbj)

End Sub

****** ERROR MESSAGE ******

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: 217.37.196.9\n
HTTP_ACCEPT_LANGUAGE: en-gb\n
HTTP_REFERER: \n
HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
SV1; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; WinFX RunTime
3.0.50727)\n
HTTP_COOKIE: \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(Strin g configPath) at
System.Web.CachedPathData.GetConfigPathData(Strin g configPath) at
System.Web.CachedPathData.GetVirtualPathData(Virt ualPath virtualPath,
Boolean permitPathsOutsideApp) at
System.Web.HttpContext.GetPathData(VirtualPath path) at
System.Web.Security.UrlAuthorizationModule.IsUser AllowedToPath(HttpContext
context, VirtualPath virtualPath) at
System.Web.UI.Util.IsUserAllowedToPath(HttpContex t context, VirtualPath
virtualPath) at
System.Web.SiteMapProvider.IsAccessibleToUser(Htt pContext context,
SiteMapNode node) at
System.Web.SiteMapNode.IsAccessibleToUser(HttpCon text context) at
System.Web.StaticSiteMapProvider.GetChildNodes(Si teMapNode node) at
System.Web.SiteMapNode.get_ChildNodes() at
System.Web.UI.WebControls.SiteMapDataSource.GetNo des() at
System.Web.UI.WebControls.SiteMapDataSource.GetPa thNodeCollection(String
viewPath) at System.Web.UI.WebControls.SiteMapDataSource.GetVie w(String
viewName) at
System.Web.UI.WebControls.SiteMapDataSource.Syste m.Web.UI.IDataSource.GetView(String
viewName) at
System.Web.UI.WebControls.Repeater.ConnectToDataS ourceView() at
System.Web.UI.WebControls.Repeater.OnLoad(EventAr gs 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(Htt pContext context) at
System.Web.UI.Page.ProcessRequest(HttpContext context) at
ASP.default_aspx.ProcessRequest(HttpContext context) at
System.Web.HttpApplication.CallHandlerExecutionSt ep.System.Web.HttpApplication.IExecutionStep.Execu te()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously)


Sep 29 '06 #4
re:
Is there anyway to debug an application online?
You mean remote debugging.

Yes, but it involves manipulating the server
( installing Visual Studio server-side components on it )

See :
http://msdn2.microsoft.com/en-us/library/cx6214f0.aspx

The problem for you, of course, is that since you're on shared hosting,
it's highly unlikely that your hoster will agree to installing anything on the server.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Carl Gilbert" <mr*************@hotmail.comwrote in message
news:ei**************@TK2MSFTNGP04.phx.gbl...
Is there anyway to debug an application online?
I've put output logic in the global.asax but this isn't giving me enough information. Plus, as
I'm using shared hosting I have virtually no access to the server to perform any monitoring.

Carl

"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:eG**************@TK2MSFTNGP04.phx.gbl...
>Here's a simple walkthrough for debugging basics :
http://msdn2.microsoft.com/en-us/library/z9e7w6cs.aspx

For deeper understanding, you'd do well to familiarize yourself with this material :
http://msdn.microsoft.com/library/de..._framework.asp


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Carl Gilbert" <mr*************@hotmail.comwrote in message
news:11*********************@b28g2000cwb.googlegr oups.com...
>>Hi

I have implemented the ASP.NET Club Site Starter Kit on my 1&1 web
space.
I have recently been getting some errors where the page doesn't load
and just comes up blank. I have put a handler on Application_Error in
global.asax to email me whenever an error occurs. Sometimes I get upto
100 in an hour which is rather concerning.

I have looked at the error message returned but I can't seem to work
out what's causing the error.

How can I debug the application to track down the error? I have quite
a bit of experience with VB.NET so I understand the concept of break
points and stack traces but it all seems a bit scary when it's on the
web.

I have included the code I have in my global.asax and the error message
I get at the bottom of this post. Should I try running the app on
local host or is there some sort of component or change I can make
somewhere to track down the error online?

Note: I didn't write the error notification code. Theres a line which
logs to an event log. Would it help if I un-comment this and see what
that does?

Regards, Carl Gilbert

****** 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,EventLo gEntryType.Error);
Server.ClearError()
Dim strSbj As String = "BWBFC Application Error"
ClubSiteMailer.Mailer.Send(strMsg, strSbj)

End Sub

****** ERROR MESSAGE ******

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: 217.37.196.9\n
HTTP_ACCEPT_LANGUAGE: en-gb\n
HTTP_REFERER: \n
HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
SV1; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; WinFX RunTime
3.0.50727)\n
HTTP_COOKIE: \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.IsSuspiciousPhysicalPat h(String physicalPath,
Boolean& pathTooLong) at
System.Web.Util.FileUtil.IsSuspiciousPhysicalPat h(String physicalPath)
at System.Web.CachedPathData.GetConfigPathData(String configPath) at
System.Web.CachedPathData.GetConfigPathData(Stri ng configPath) at
System.Web.CachedPathData.GetConfigPathData(Stri ng configPath) at
System.Web.CachedPathData.GetVirtualPathData(Vir tualPath virtualPath,
Boolean permitPathsOutsideApp) at
System.Web.HttpContext.GetPathData(VirtualPath path) at
System.Web.Security.UrlAuthorizationModule.IsUse rAllowedToPath(HttpContext
context, VirtualPath virtualPath) at
System.Web.UI.Util.IsUserAllowedToPath(HttpConte xt context, VirtualPath
virtualPath) at
System.Web.SiteMapProvider.IsAccessibleToUser(Ht tpContext context,
SiteMapNode node) at
System.Web.SiteMapNode.IsAccessibleToUser(HttpCo ntext context) at
System.Web.StaticSiteMapProvider.GetChildNodes(S iteMapNode node) at
System.Web.SiteMapNode.get_ChildNodes() at
System.Web.UI.WebControls.SiteMapDataSource.GetN odes() at
System.Web.UI.WebControls.SiteMapDataSource.GetP athNodeCollection(String
viewPath) at System.Web.UI.WebControls.SiteMapDataSource.GetVie w(String
viewName) at
System.Web.UI.WebControls.SiteMapDataSource.Syst em.Web.UI.IDataSource.GetView(String
viewName) at
System.Web.UI.WebControls.Repeater.ConnectToData SourceView() at
System.Web.UI.WebControls.Repeater.OnLoad(EventA rgs 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(Ht tpContext context) at
System.Web.UI.Page.ProcessRequest(HttpContext context) at
ASP.default_aspx.ProcessRequest(HttpContext context) at
System.Web.HttpApplication.CallHandlerExecutionS tep.System.Web.HttpApplication.IExecutionStep.Exec ute()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously)



Sep 29 '06 #5
I should have added that local debugging usually is just as good
as remote debugging, so give it a try on your development machine.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
re:
>Is there anyway to debug an application online?

You mean remote debugging.

Yes, but it involves manipulating the server
( installing Visual Studio server-side components on it )

See :
http://msdn2.microsoft.com/en-us/library/cx6214f0.aspx

The problem for you, of course, is that since you're on shared hosting,
it's highly unlikely that your hoster will agree to installing anything on the server.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Carl Gilbert" <mr*************@hotmail.comwrote in message
news:ei**************@TK2MSFTNGP04.phx.gbl...
>Is there anyway to debug an application online?
I've put output logic in the global.asax but this isn't giving me enough information. Plus, as
I'm using shared hosting I have virtually no access to the server to perform any monitoring.

Carl

"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:eG**************@TK2MSFTNGP04.phx.gbl...
>>Here's a simple walkthrough for debugging basics :
http://msdn2.microsoft.com/en-us/library/z9e7w6cs.aspx

For deeper understanding, you'd do well to familiarize yourself with this material :
http://msdn.microsoft.com/library/de..._framework.asp


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Carl Gilbert" <mr*************@hotmail.comwrote in message
news:11*********************@b28g2000cwb.googleg roups.com...
Hi

I have implemented the ASP.NET Club Site Starter Kit on my 1&1 web
space.
I have recently been getting some errors where the page doesn't load
and just comes up blank. I have put a handler on Application_Error in
global.asax to email me whenever an error occurs. Sometimes I get upto
100 in an hour which is rather concerning.

I have looked at the error message returned but I can't seem to work
out what's causing the error.

How can I debug the application to track down the error? I have quite
a bit of experience with VB.NET so I understand the concept of break
points and stack traces but it all seems a bit scary when it's on the
web.

I have included the code I have in my global.asax and the error message
I get at the bottom of this post. Should I try running the app on
local host or is there some sort of component or change I can make
somewhere to track down the error online?

Note: I didn't write the error notification code. Theres a line which
logs to an event log. Would it help if I un-comment this and see what
that does?

Regards, Carl Gilbert

****** 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,EventL ogEntryType.Error);
Server.ClearError()
Dim strSbj As String = "BWBFC Application Error"
ClubSiteMailer.Mailer.Send(strMsg, strSbj)

End Sub

****** ERROR MESSAGE ******

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: 217.37.196.9\n
HTTP_ACCEPT_LANGUAGE: en-gb\n
HTTP_REFERER: \n
HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
SV1; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; WinFX RunTime
3.0.50727)\n
HTTP_COOKIE: \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.IsSuspiciousPhysicalPa th(String physicalPath,
Boolean& pathTooLong) at
System.Web.Util.FileUtil.IsSuspiciousPhysicalPa th(String physicalPath)
at System.Web.CachedPathData.GetConfigPathData(String configPath) at
System.Web.CachedPathData.GetConfigPathData(Str ing configPath) at
System.Web.CachedPathData.GetConfigPathData(Str ing configPath) at
System.Web.CachedPathData.GetVirtualPathData(Vi rtualPath virtualPath,
Boolean permitPathsOutsideApp) at
System.Web.HttpContext.GetPathData(VirtualPat h path) at
System.Web.Security.UrlAuthorizationModule.IsUs erAllowedToPath(HttpContext
context, VirtualPath virtualPath) at
System.Web.UI.Util.IsUserAllowedToPath(HttpCont ext context, VirtualPath
virtualPath) at
System.Web.SiteMapProvider.IsAccessibleToUser(H ttpContext context,
SiteMapNode node) at
System.Web.SiteMapNode.IsAccessibleToUser(HttpC ontext context) at
System.Web.StaticSiteMapProvider.GetChildNodes( SiteMapNode node) at
System.Web.SiteMapNode.get_ChildNodes() at
System.Web.UI.WebControls.SiteMapDataSource.Get Nodes() at
System.Web.UI.WebControls.SiteMapDataSource.Get PathNodeCollection(String
viewPath) at System.Web.UI.WebControls.SiteMapDataSource.GetVie w(String
viewName) at
System.Web.UI.WebControls.SiteMapDataSource.Sys tem.Web.UI.IDataSource.GetView(String
viewName) at
System.Web.UI.WebControls.Repeater.ConnectToDat aSourceView() at
System.Web.UI.WebControls.Repeater.OnLoad(Event Args 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(H ttpContext context) at
System.Web.UI.Page.ProcessRequest(HttpContext context) at
ASP.default_aspx.ProcessRequest(HttpContext context) at
System.Web.HttpApplication.CallHandlerExecution Step.System.Web.HttpApplication.IExecutionStep.Exe cute()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously)



Sep 29 '06 #6

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

Similar topics

8
2671
by: Davy | last post by:
Hi all, I use VC and gcc/gdb to compile and debug C/C++ files. But I found some of the debug version of the compiled files are too large to be run in a small RAM. Can I compile C/C++ Debug...
4
4507
by: emma middlebrook | last post by:
I have a question regarding asserting ... here's some code: string GetAssertMessage() { ... prepare a message string and return it... } void SomeMethod() { ...
7
2880
by: Srinivasa Rao | last post by:
I have read in one article that when we compile the application in release mode, all the debug classes and properties will be automatically removed from the code. I tried to implement this thing by...
9
1979
by: dee | last post by:
Hi I'm about to upload my site and I have switched to release version. Is that enough or do I still need to disable <compilation defaultLanguage="vb" debug="true" /> the debug="true" in the .pdb...
6
4089
by: swartzbill2000 | last post by:
Hello, I have a VB 2005 Express project with a TraceListener-derived class to route Debug.Print output to a log file. It works fine for Debug builds. What is the correct combination of changes to...
6
3647
by: pauldepstein | last post by:
To help me debug, I am writing a lot of information into a stream which I call debug. However, because of the large amount of time taken to print this information, I only want this printed while...
0
1883
by: rob | last post by:
I am trying to debug a webservice by steping into a web method called from a windows form project. The strange thing is that sometimes it works but often it does not. When it does not work I get...
6
9114
by: Andrew Rowley | last post by:
I am having trouble getting debug and release builds to work properly with project references using C++ .NET and Visual Studio 2003. I created a test solution, with a basic Windows form C++...
3
3242
by: rorni | last post by:
Hi, I'm porting code from Windows to HP-UX 11, compiling with g++. I'm getting a compilation error on the system's debug.h include file, which is included very indirectly through a series of...
0
7051
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6915
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
7054
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,...
0
7097
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6750
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
5353
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
4493
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2993
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
567
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.