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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:49:10+00:00 2026-05-12T17:49:10+00:00

In a web application I’m working on, we’d like to be able to show

  • 0

In a web application I’m working on, we’d like to be able to show information about resources at a given path. The path is entirely virtual—it only exists in the application—so we don’t really have a problem with users setting virtual paths that are “weird” by normal file system standards.

The issue: we have a route that reads something similar to

/Files/{*path}

and we attempt to redirect with

Url.RouteUrl("File", new { path = somePath })

This usually works, but fails if somePath contains & or #, among others. In those cases, I’m suck. I can’t UrlEncode(somePath) at this point, because RouteUrl does its own URL encoding, but I can’t leave them as-is, because otherwise they’re treated improperly (the octothorp doesn’t get passed to the routing data, and the ampersand confuses IIS). Is there a sane way around this? Or do I basically just need to implement my own routes via string interpolation?

  • 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-12T17:49:11+00:00Added an answer on May 12, 2026 at 5:49 pm

    The best answer I’ve found so far, though it only works on IIS7, is to follow the instructions at http://dirk.net/2008/06/09/ampersand-the-request-url-in-iis7/ to edit the registry and change some of IIS7’s default behavior. This is unacceptable for us, since we’re making an application that will be installed on end user’s machines—and at any rate, even if we weren’t, there’d be the simple fact that IIS6 and IIS5 don’t respond to this sequence. Any ideas for earlier versions of IIS, or ways to override this behavior programmatically in IIS7, would be wonderful.

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

Sidebar

Related Questions

I have a web application which receives about 50 hits per second, and on
Web application storing images in database. In our first setup we were storing (and
Web application - C#, .Net, SQL 2k5. I recently used bulkinsert on an other
Web application initialization is as follows: As we know when IIS receives the first
My web application generates pdf files and either e-mails or faxes them to our
My web application has a login page that submits authentication credentials via an AJAX
My web application sends email fairly often, and it sends 3 kinds of emails:
Our web application renders fast in some IE browsers, slow in others... It seems
Our web application sends e-mails. We have lots of users, and we get lots
My web application (MonoRail, Windsor, ActiveRecord) has a Startable import service and one or

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.