.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Stack Trace differences on 64-bit system vs 32-bit

Posted By:      Posted Date: October 12, 2010    Points: 0   Category :.NET Framework
I'm seeing differences in the stack trace produced from exceptions thrown in the same program running on two different systems (I've run it on a 32 bit XP system and a 64 bit Windows 2008 system).

Here's the program:
//when this #define is commented out, the methodsA-D don't
// have a side effect (setting a static variable),
// and this seems to cause the 64 bit stack traces to differ.
//#define methods_have_side_effects

using System;
using System.Reflection;

namespace StackTraceTest
    public class Program
        public static int some_side_effect;

        public static void Main(string[] args)
            try{ methodA(); }
            catch(Exception e)
            { Console.WriteLine(e + e.StackTrace); }

                Type t = Type.GetType("StackTraceTest.Program");
                t.GetMethod("methodA", BindingFlags.Static | BindingFlags.Public).Invoke(null, new object[] { });
            catch (Exception e)
            { Console.WriteLine(e + e.StackTrace); }

View Complete Post

More Related Resource Links

Debugging Stack Trace

I have a VB.net dll that gets loaded as an add on to AutoCAD. I have it setup so that all exceptions get logged in a database table, along with the stack trace. The dll is on several users computers now for testing. On some computers, the stack trace returns line numbers, which is very helpful. Other computers do not give the line numbers on the stack trace for some reason. All computers are automatically updated, so they always have the same version of the dll. The DLL is built with full debug information. Do you know why some computers would return the line numbers and others would not?  

How to know the error cause using the stack trace in asp.net mvc

I am getting following error The model item passed into the dictionary is of type 'Helpers.PaginatedList`1[EntityLayer.Test]', but this dictionary requires a model item of type 'Helpers.PaginatedList`1[EntityLayer.Test]' And the stack trace is as follows at System.Web.Mvc.ViewDataDictionary`1.SetModel(Object value) at System.Web.Mvc.ViewDataDictionary..ctor(ViewDataDictionary dictionary) at System.Web.Mvc.ViewUserControl`1.SetViewData(ViewDataDictionary viewData) at System.Web.Mvc.WebFormView.RenderViewUserControl(ViewContext context, ViewUserControl control) at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass14.<InvokeActionResultWithFilters>b__11() at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)\n Inner Exception:\n I am not able to get what is the problem here?Can anybody help in this?

Couple of questions about WinDbg/Adplus stack trace output

I'm hoping someone can answer a couple of questions I have about the stack trace output of threads in WinDbg/DebugDiag (from an Adplus dmp file)

Im getting a lot of steps in thread stack traces such as:

My question is, should the hex value (I'm guessing) be pointing to a more easily recognisable component in the specified Dll? In my searching around this I have noticed some people pasting similar to the above with method names instead of the hex, which would be a lot more useful to me if I was able to get that.

I've also noticed a few instances like <Unloaded_ure.dll>+1d7a294  
Can anyone point to what these mean?


remove stack trace , Additional Info, from log file


i am using belowcode in web.config 

<loggingConfiguration name="" tracingEnabled="true" defaultCategory="General">
      <add name="Rolling Flat File Trace Listener" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" fileName=".\Logs\jeejix_error.log" footer="------------Error End----------------------------" formatter="Text Formatter" header="---------Error Start-------------------------------" rollFileExistsBehavior="Increment" rollInterval="Day" rollSizeKB="50" />
      <add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken

cannot get full stack trace exceptions from server if I am using a CustomChannel even if CustomError



When I am implementing my own custom channel for .net remote object calls, I cannot get full stack trace on exceptions from the server.

Problem description:

I have a server with the following remote class:

 public class MyClassRemote : MarshalByRefObject   
 public string GetServerString()       
 {                        throw new NullReferenceException("my exception");           
 return "sample message";        

at start up, the server has the following initialization code:

RemotingConfiguration.CustomErrorsMode = CustomErrorsModes.Off;
MyChannel myChannel = new MyChannel(myChannelSettings);
ChannelServices.RegisterChannel(myChannel, false);
RemotingConfiguration.RegisterWellKnownServiceType(typeof(MyClassRemote), typeof(MyClassRemote).FullName, WellKnownObjectMode.SingleCall);
Note: Keep in mind that I did set CustomErrorsMode.Off on the server side. So, I should get all the

Getting error...what does stack trace indicate?...




I have the following code:

'Page_Load on ChooseTime_aspx

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        If Not (Page.IsPostBack) Then
            If Session("orderfortoday") = 0 Then
                Button_today.Visible = False

            End If

            Panel_SuccessfulOrder.Visible = False
            Panel_EmailConfirm.Visible = False
            Panel_EmailInput.Visible = False

            Dim skipWeekend1 As DateTime = SkipWeekendDay1()
            Dim skipWeekend2 As DateTime = SkipWeekendDay2()
            Session("Day1_AvoidWeekends") = skipWeekend1.ToString("MM/dd/yyyy")

Add Stack Trace in trace.log file using Enterprise library 5.0



I am facing one issue while using trace.log file for logging the exceptions. I need to get the stack trace with other exception information. But stack trace is not available with provide enterprise library 5.0 exception logging template. Is there any way I can add this.

Also I want to genrate seprate trace.log file for every day.


System Development Life Cycle

The Systems Development Life Cycle (SDLC) is a conceptual model used in project management that describes the stages involved in an information system development project from an initial feasibility study through maintenance of the completed application. Various SDLC methodologies have been developed to guide the processes involved including the waterfall model (the original SDLC method), rapid application development (RAD), joint application development (JAD), the fountain model and the spiral model. Mostly, several models are combined into some sort of hybrid methodology

The Agile System Development Life Cycle (SDLC)

The goal of this article is to describe the agile system development life cycle (SDLC), putting it in context from what you may have heard about within the agile community and more importantly within the context of your overall IT efforts.

Performance Tests: Precise Run Time Measurements with System.Diagnostics.Stopwatch

Everybody who does performance optimization stumbles sooner or later over the Stopwatch class in the System.Diagnostics namespace. And everybody has noticed that the measurements of the same function on the same computer can differ 25% -30% in run time. This article shows how single threaded test programs must be designed to get an accuracy of 0.1% - 0.2% out of the Stopwatch class. With this accuracy, algorithms can be tested and compared.



hello i have the following problem

i have upload my content to hosting server but i get the following error

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SecurityException: Request for the permission of typ

Problem upgrading to MVC3 - System.Web.Routing



I'm trying to upgrade to .NET 4 and MVC 3.

When trying to compile my project, I get the error:

Error 1 The type or namespace name 'Routing' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) C:\Users\spencer\Desktop\weblauncher\Common\MVCConfig.cs 4 18 Common

The type or namespace name 'Routing' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)

I do have the System.Web.Routing in my references for the project.

BUT - when I try to view System.Web.Routing in the OBJECT BROWSER, nothing is inside!  The System.Web.Routing namespace is not in there - the entire thing is empty!  Could it that the dll is corrupted?  I tried to reinstall the .NET 4 and MVC 3 stuff, but its still empty!

The dll is coming from here:

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.Routing.dll

and the runti

System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPerm


Good Day all,

Having an issue with an outside user accessing my IIS7 box. I do not have this problem when running the website from my host machine. I found this post: Http://forums.asp.net/t/1371394.aspx. I assure you that this is not a solution because I am not storing any of my files on a network share. 

What do you think my approach should be. 

I already have read rights to IIS user to my BIN folder. 

Thanks for the help. 

System.IO.Packaging is not visible


I am new to ASP.net, I installed VS2005 and IIS 5 on my PC and set up my first website using IIS (not the embedded webserver in VS).

For some reason I cannot find the Assembly: "System.IO.Packaging", please let me know if I am allowed to use it in that medium and how can I reference it?

Thanks in advance.

how i can install sql server in my system


which edition of sql server  are best for me  Developer edition or express editon for development purpose.

i try to install last time sql server in my system but not successful so what i do for get the sql server in my system.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend