Is it possible to debug the framework code?

  • Thread starter Thread starter Marc
  • Start date Start date
M

Marc

Hi, I am relatively new to ASP.NET and I am experimenting with some code and
exercises.

My question: Say I have some stacktrace because I have some error.

[NotSupportedException: Specified method is not supported.]
System.Web.UI.DataSourceView.ExecuteDelete(IDictionary keys, IDictionary
oldValues) +28
System.Web.UI.DataSourceView.Delete(IDictionary keys, IDictionary
oldValues, DataSourceViewOperationCallback callback) +75
System.Web.UI.WebControls.GridView.HandleDelete(GridViewRow row, Int32
rowIndex) +927
System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean
causesValidation, String validationGroup) +1134
System.Web.UI.WebControls.GridView.RaisePostBackEvent(String
eventArgument) +199
System.Web.UI.WebControls.GridView.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +177
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746


Can I somehow place a breakpoint in
'System.Web.UI.DataSourceView.ExecuteDelete' and look at what is happening
there?

(Well, I think, probably not since the code for the framework is not shipped
as far as I can see.)
 
Hi, I am relatively new to ASP.NET and I am experimenting with some code and
exercises.

My question: Say I have some stacktrace because I have some error.

[NotSupportedException: Specified method is not supported.]
   System.Web.UI.DataSourceView.ExecuteDelete(IDictionary keys, IDictionary
oldValues) +28
   System.Web.UI.DataSourceView.Delete(IDictionary keys, IDictionary
oldValues, DataSourceViewOperationCallback callback) +75
   System.Web.UI.WebControls.GridView.HandleDelete(GridViewRow row, Int32
rowIndex) +927
   System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean
causesValidation, String validationGroup) +1134
   System.Web.UI.WebControls.GridView.RaisePostBackEvent(String
eventArgument) +199
   System.Web.UI.WebControls.GridView.System.Web.UI.IPostBackEventHandler.Rais­ePostBackEvent(String
eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +177
   System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746

Can I somehow place a breakpoint in
'System.Web.UI.DataSourceView.ExecuteDelete' and look at what is happening
there?

(Well, I think, probably not since the code for the framework is not shipped
as far as I can see.)

Hi Marc,

simply go to MSDN and find that

1) NotSupportedException happens when the ExecuteDelete operation is
not supported by the DataSourceView.

2) The DataSourceView class's default implementation is to throw a
NotSupportedException exception. If you extend the DataSourceView
class, override the ExecuteDelete method if your class supports
deletion from the underlying data storage.

3) Data-bound controls can determine whether the ExecuteDelete
operation is supported by a data source control by retrieving the
DataSourceView object using the DataSourceControl..::.GetView method,
and checking the CanDelete property.

http://msdn.microsoft.com/en-us/library/system.web.ui.datasourceview.executedelete.aspx

Hope this helps
 
Alexey Smirnov said:
Hi Marc,

simply go to MSDN and find that
....

Hope this helps

Well it helps solving the programming problem I had, but that was not really
my question. Sorry to see you go to all that trouble for nothing. At this
moment I am programming with some other tools then C# and ASP.NET and for
example in Delphi you can see the vcl library code in c:program
files\borland\delph\source\vcl and step through it. I wondered if could do
that with some parts of the .NET framework too.

Your post does help the coding problem by the way, it was not for nothing,
but this exception is another problem. I excuse myself for not being clear.

Marc Wentink
 
Well it helps solving the programming problem I had, but that was not really
my question. Sorry to see you go to all that trouble for nothing. At this
moment I am programming with some other tools then C# and ASP.NET and for
example in Delphi you can see the vcl library code in c:program
files\borland\delph\source\vcl and step through it. I wondered if could do
that with some parts of the .NET framework too.

Your post does help the coding problem by the way, it was not for nothing,
but this exception is another problem. I excuse myself for not being clear.

Marc Wentink

Well, I thought you wanted to solve the problem at first :-) You can
debug .NET and you can also get access to its source code. Please take
a look at the following references:

http://weblogs.asp.net/scottgu/arch...rce-code-for-the-net-framework-libraries.aspx
http://blogs.msdn.com/sburke/archiv...tudio-to-debug-net-framework-source-code.aspx
 
Back
Top