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

  • SEARCH
  • Home
  • 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 8566591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:41:20+00:00 2026-06-11T17:41:20+00:00

I started using MiniProfiler and find it very useful while developing my MVC 4

  • 0

I started using MiniProfiler and find it very useful while developing my MVC 4 application.

However, I just added a new controller action and view to a fairly complex project, and now MiniProfiler throws an Exception after control returns from the controller.

The exception text is Illegal Character in Path.

The Call stack location is

MiniProfiler.dll!StackExchange.Profiling.MVCHelpers.ProfilingActionFilter.OnActionExecuted(System.Web.Mvc.ActionExecutedContext filterContext) Line 58

My controller action and view are both quite simple.

Controller action

    [AllowAnonymous]
    public ActionResult ReleaseNotes(string name)
    {
        CheckInput(name);

        string notesPath = Server.MapPath("~/Content/ReleaseNotes/" + name + ".html"); 
        string notes = null;

        if (System.IO.File.Exists(notesPath))
        {
            notes = System.IO.File.ReadAllText(notesPath);
        }

        return View(notes);
    }

    private void CheckInput(string name)
    {
        if (name.Length > 0x100 || !name.IsAlphaNumeric()) throw new ArgumentException("Name is invalid.");
    }

NOTE: System.IO.File.ReadAllText successfully reads in the contents of an HTML file. That path is valid.

View

@model string

@{
    ViewBag.Title = "Release Notes";
}

<h2>Release Notes</h2>

@if (string.IsNullOrWhiteSpace(Model))
{
    <p>No release notes were found for the specified release.</p>
}
else
{
    @Html.Raw(Model)
}

I have disabled MiniProfiler for now. Any thoughts on how to get it working again?

  • 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-06-11T17:41:22+00:00Added an answer on June 11, 2026 at 5:41 pm

    It turns out that this error was a curious manifestation of this issue

    Illegal characters in path when calling the index view from my controller

    I was passing in a string as the model. Due to the way method overloading resolves, MVC thought that the contents of the HTML file was the name of the view that I wanted to load (no wonder it complained about the path…).

    Interestingly enough, the debugger continued until the return from my controller action before throwing the Exception. After I disabled MiniProfiler, my application’s global exception handler caught and logged the specifics.

    I’m still not sure why the problem showed up in MiniProfiler.

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

Sidebar

Related Questions

I've just started using the mvc-mini-profiler ( http://code.google.com/p/mvc-mini-profiler/ ) and I think it's awesome.
I started using WordPress just a few hours ago because I need to develop
just started using log4j in one of my home-projects and I was just about
I started using the new Authorization system for apps. I seem to be experiencing
Just started using Blueprint CSS and now playing with the grids but have a
Just started using Sencha Touch 2 and need to integrate the Leaflet plugin https://github.com/VinylFox/Ext.ux.touch.Leaflet/tree/master/src
Just started using Apache Commons StringEscapeUtils . According to http://www.w3schools.com/tags/ref_entities.asp , &Ouml; should correspond
I started using django framework just a few days ago and i desperately need
Just started using this technique and am having strange results on the PC side.
I started using Hibernate only recently. While I was playing with it, I experienced

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.