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 6476501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:50:00+00:00 2026-05-25T06:50:00+00:00

(This is cross-posted to the ASP.NET forms) I’m working on the WebGit .NET project,

  • 0

(This is cross-posted to the ASP.NET forms)

I’m working on the WebGit .NET project, and we are close to a “1.0” release. However, I’m having trouble getting my “Browse” controller (which pulls files out of the repository) to serve-up “.cshtml” files.

I originally had trouble with “.config” and “.cs” files as well, but I fixed that with this in the web.config:

  <location path="browse">
    <system.webServer>
      <security>
        <requestFiltering>
          <fileExtensions allowUnlisted="true">
            <clear />
          </fileExtensions>
          <hiddenSegments>
            <clear />
          </hiddenSegments>
        </requestFiltering>
      </security>
    </system.webServer>
  </location>

The routing that should be handling this request (that is successfully routing everything else) is:

routes.MapRoute(
    "View Blob",
    "browse/{repo}/blob/{object}/{*path}",
    new { controller = "Browse", action = "ViewBlob", path = UrlParameter.Optional });

Now, whenever I try to access a URL that ends in “.cshtml”, it gives a 404, even though my request should have been handled by the “Browse” controller. The files I’m serving-up do not exist on disk, but are instead pulled from a git repository as blobs. Every other file extension that I have tried works just fine.

How can I fix this behavior?


EDIT: I have tried disabling WebPages like so:

<appSettings>
  <add key="webpages:Enabled" value="false" />
</appSettings>

But that appears to have no effect.

  • 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-25T06:50:00+00:00Added an answer on May 25, 2026 at 6:50 am

    As a quick workaround, you can put a temporary browse.cshtml file at your application root and put this inside your web.config,
    add key=”webpages:Enabled” value=”false”

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

Sidebar

Related Questions

First, I'll admit this is cross-posted at SuperUser but I decided to also post
This is already cross-posted at MS Connect: https://connect.microsoft.com/VisualStudio/feedback/details/560451 I am attempting to override the
How do you get around this Ajax cross site scripting problem on FireFox 3?
In JavaScript this was a cross-browser compatibility issue, so both were used, but there
I got this error when trying to update an image. It was a cross-thread
There is an interesting post over here about this, in relation to cross-application flow
I'm using GWT internationalization Messages. The documentation for Plural Forms says this should work:
This problem crops up every now and then at work. Our build machine can
This is a bit of a long shot, but if anyone can figure it
This is starting to vex me. I recently decided to clear out my FTP,

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.