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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:02:55+00:00 2026-05-23T06:02:55+00:00

I have an ASP.NET MVC 3 application, that resides in lets say localhost/myapp under

  • 0

I have an ASP.NET MVC 3 application, that resides in lets say localhost/myapp under IIS.

There is a virtual directory (not application) localhost/myapp/upload under that application in IIS (version 7+) that is mapped to a network share.

I want ASP.NET to ignore requests to files under that directory, and let IIS handle the request on its own.

I tried things like adding routes.IgnoreRoute(“upload/{*pathInfo}”) to global.asax.cs but still no luck.

Getting ASP.NET errors like failed to start monitoring changes to ‘\\server\share\myupload\web.config’ when i try to access a static file e.g. a jpeg under that directory.

There is no web.config file under that upload directory. It is not an ASP.NET application. And i don’t want to grant access to network service, or ASP.NET user to just let it check that no such file exists there. If i do, someone would upload an .aspx file there and execute whatever code they like in my server.

Any ideas?

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

    The best solution for this case would probably be to disable directory listing for this directory like in this tutorial :

    http://technet.microsoft.com/en-us/library/cc731109(WS.10).aspx

    And for download links, you should create a permalink database and store them in database. So if you have file at http://www.mysite.com/myapp/upload/file1.doc , the URL that user will see would be http://www.mysite.com/myapp/ControllerThatHandlesRedirect/{some guid }. All the links would be stored in database and would be taken from the database according to specific guid. So the user will not see the real URL only a GUID . The controller would select URL from database based on the permalink and redirect user to that file .

    Hope that helps you

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

Sidebar

Related Questions

I have a ASP.NET MVC application that runs in both IIS 6 and 7.
I am looking at globalizing an application that I have developed in asp.net mvc.
I am using asp.net MVC to develop an application that will have ajax interactions.
Let's say I have a simple ASP.NET MVC blog application and I want to
I have an ASP.NET MVC (using the release candidate) application that works with a
I have ASP.NET MVC application that has list with jQuery Selectable list. My problem
I have an asp.net MVC application that calls another service to generate a pdf.
I have an Asp.Net MVC application that works in the vs.net development web server.
I have an ASP.NET MVC application that uses LINQ2SQL as the database layer. I
I have an ASP.NET MVC application that currently uses the WebClient class to make

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.