Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 997643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:04:02+00:00 2026-05-16T07:04:02+00:00

While debugging my Visual Studio 2010 MVC2 solution, I noticed something that I didn’t

  • 0

While debugging my Visual Studio 2010 MVC2 solution, I noticed something that I didn’t necessarily expect and that struck me as inefficient. When I was viewing the Home page, the IntelliTrace showed that many exceptions were getting thrown and caught while resolving a partial view.

I have code that calls the partial view like this:

<% Html.RenderPartial("FiltersAvailablePartialView", Model.AvailableFilters); %>

The structure of the views in the project follows a typical MVC application. There is a Views folder which contains two folders, Home and Shared. In the Home folder I have the .aspx page that is used as my main view page, and in the Shared folder I have a .ascx page that is used as a partial view, as shown below (with other views and partial views not listed for simplicity):

Views

   –>Home

        –>Home.aspx

   –>Shared

        –>FiltersAvailablePartialView.ascx

What I see in the IntelliTrace when I load the page is that these exceptions are thrown and caught:

Thrown: “The file ‘/MyApp/Views/Home/FiltersAvailablePartialView.aspx’ does not exist.”

Caught: “The file ‘/MyApp/Views/Home/FiltersAvailablePartialView.aspx’ does not exist.”

Thrown: “The file ‘/MyApp/Views/Home/FiltersAvailablePartialView.ascx’ does not exist.”

Caught: “The file ‘/MyApp/Views/Home/FiltersAvailablePartialView.ascx’ does not exist.”

Thrown: “The file ‘/MyApp/Views/Shared/FiltersAvailablePartialView.aspx’ does not exist.”

Caught: “The file ‘/MyApp/Views/Shared/FiltersAvailablePartialView.aspx’ does not exist.”

So it appears that the .Net framework is using expensive try/catch methods to resolve a view–looking first for a .aspx view in the Home folder, then for a .ascx view in the Home folder, then for a .aspx view in the Shared folder, then for a .ascx view in the Shared folder. So while it eventually finds the partial view and the page renders without any errors, this seems like an expensive way (catching exceptions) to find the view.

Is there something built-in with the MVC2 framework I could/should do to make it resolve this partial view reference on the first attempt and avoid these costly try/catch calls that are happening?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T07:04:03+00:00Added an answer on May 16, 2026 at 7:04 am

    If you compile in Release mode, this happens only once. If you compile in Debug mode, it happens for every request.

    Profiling in Debug mode is often of very limited relevance to real-world performance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 524k
  • Answers 524k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I'm not quite sure what exactly what you want to… May 16, 2026 at 9:54 pm
  • Editorial Team
    Editorial Team added an answer Since you're wanting to create a new thread with System.Threading.Thread… May 16, 2026 at 9:54 pm
  • Editorial Team
    Editorial Team added an answer have you tried Date.strptime('28/03/2008', '%d/%m/%Y') DateTime.strptime('28/03/2008 12:30 AM', '%d/%m/%Y %I:%M… May 16, 2026 at 9:54 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

In Visual Studio 2010 sometimes when I want to get the value of a
I have created a WCF service in Visual Studio 2010 along with some supporting
I have a VS solution containing several projects. While debugging a particular project all
ive been debugging sql 2005 stored procedures in visual studio 2005 and find it
I've been running Visual Studio 2010 (the official release) for some time now. Lately,
I have installed Visual Studio 2010 and Silverlight 4 tools. Still, i am getting
I'm having problems with debugging an application that calls out to another AppDomain, because
I am using working on a c++ application in Visual studio 2008 I have
I'm developing a project using Node.js at the backed, with that I'm also using
I have a url that look like this reg.php?lang=no_NO&passkey=test and im trying to get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.