.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

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

Posted By:      Posted Date: September 15, 2010    Points: 0   Category :ASP.Net
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?

View Complete Post

More Related Resource Links

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")

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?  

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

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

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); }

Merge Replication - Error - Query processor ran out of stack space


Hello everyone,

I have a merge publication configured that has been running fine with no issues for many weeks.  Here is my setup... Publisher - SQL 2008 SP1, Distributor - SQL 2008 R2, Subscriber - SQL 2008 SP1.

On Wednesday and Thursday of last week, I created a few hundred foreign keys referencing a table (user information for auditing).  Then, on Friday evening, I started to receive this message:



Msg 8621, Level 17, State 1, Procedure MSmerge_sel_sp_18DB84E1A521483601D2A6D477F6483D, Line 85
The query processor ran out of stack space during query optimization. Please simplify the query.



I have traced it down, this command gets executed:


exec MSmerge_sel_sp_18DB84E1A521483601D2A6D477F6483D @maxschemaguidforarticle = 'F990B1EE-D52F-4DCA-8EEF-C1783DA47A0F', @type = 6


Which executes this:



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

Stack Overflow error Jquery


HI All,

I am using jquery-1.4.1.js file but when i open application in I.E.8 it is throwing error "Stack Overflow occur at line 2734 Out of stack space" but it seems running smoothly on FireFox.

What could be reason. Please Help.

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.


IsapiModule Error 500 Issue


I am about exhausted trying to figure out this error:

HTTP Error 500.0 - Internal Server Error

Description: The page cannot be displayed because an internal server error has occurred.

Error Code: 0x8007007b

Notification: ExecuteRequestHandler

Module: IsapiModule

Requested URL: http://localhost:80/ReportServer

Physical Path: c:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer

When I enable Failed Request Tracing Rules and view the log output I am supposing that the actual problem is in the 2nd call where there are 2 backslashes before the actual filename in the specified path:


CALL_ISAPI_EXTENSION DllName="C:\Windows\Microsoft.NET\Framework\v2.0.50727\\aspnet_isapi.dll"


Handling 404 page not found with Error page



      How do i handle 404 page not found?

Inserting personal error message in ValidationSummary



I am creating a web form that requires a lot of validation. I use many of the validation control in asp.net already like RequiredFieldValidator and CompareValidator. 

My Problem: after my custom validation for the value entered return an error message, and I pressed enter key when the field is empty, my custom error message is overlapped by my ValidationSummary. 

Setting my custom error to visible = false on button click also does not seem to work as it requires for me to enter the value first.

This made me think, is there a way to insert my custom validation inside the ValidationSummary as an error message like for other validation control?

Thanks in advance

Sys.Net.WebServiceFailedException: The server method '' failed with the following error:



Let's say we have 2 time consuming functions, aaa and aaa1 inside a aspx page.

        public static string aaa(int i)
            return i.ToString();

        public static string aaa1(int i)
            return i.ToString();



        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
        <span id="displayspan"></span>
        <br />
        <input type="button" value=

Jscript error: Object does not support property or method


 Hi, i have little knowledge on javascript but i need to use this code get from somewhere for a jquery to work.

I face this "Jscript runtime error: Object does not support property or method" whenever im trying to run this page.

In my experience, im get this error msg 9 out of 10 times i use javascript in my system.

Im using Microsoft Visual web developer 2008, i wonder if this is related to my problem, i not sure there is anything i need to add as reference or update anything.

But anyway, in short, i just couldn't use javascript code when using this development tool because of this sort of error.

Anyway, it happen that last time i tried use the same type of jquery code in another project and it seems to work well without an error.

But now when im try to use it again in this recent project i created, it come out with this error and i have no idea how to solve it even look through google and this forum.

It doesn't really seems like its the code problem itself although im not sure, because any javascript code just couldn't work.

So below is my code that i need to use.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
<script type="text/javascript" src=&quo

Type or namespace error.


A couple of days ago I started getting an unusual behavior when compiling Website projects. I have referenced class libraries added to my bin folder that are also correctely referenced in using statements in my aspx.cs code behind. When I compile, I get the 

Error 4 The type or namespace name 'CommonClassLibrary' could not be found (are you missing a using directive or an assembly reference?) C:\Dev\Fiscal_Portal\Implementation\FMS Portal Site_new\App_Code\BLL\DataTables.cs 1 7 C:\...\FMS Portal Site_new\

The type or namespace name 'CommonClassLibrary' could not be found (are you missing a using directive or an assembly reference?)

error message that would typically be received when the dll has not been added as a reference or added in a using statement.

I can eliminate the error by adding an


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