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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:52:50+00:00 2026-06-17T16:52:50+00:00

I want to serve my static files from a parent directory so I can

  • 0

I want to serve my static files from a parent directory so I can modify them for easy development while the application is still running. I have tried to add a static content convention in my Bootstrapper like so:

this.Conventions.StaticContentsConventions.Add(
  StaticContentConventionBuilder.AddDirectory("content", @"../../content")
);
base.ConfigureConventions(nancyConventions);

But it is still not able to find those static files. Is it not possible to serve from a parent folder?

  • 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-17T16:52:51+00:00Added an answer on June 17, 2026 at 4:52 pm

    Not with the StaticContentConventionBuilder; we explicitly don’t allow this for security reasons. We make sure whatever file that’s requested by the user always falls within the scope of the web root, otherwise people could potentially use some path manipulation to retrieve files you didn’t want them to.

    If you really have to do this (although your reasoning makes little sense when you can edit the files in the web root just as easily as anywhere else), then you will have to write the convention from scratch yourself – it’s a Func.

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

Sidebar

Related Questions

Can ASP.Net routing (not MVC) be used to serve static files? Say I want
I want to serve files dynamically from behind the root of my web directory.
I want to serve my css and images from a static cookieless domain. Now
In a system that I'm building I want to serve Static files (static HTML
I want to serve html files from a folder if they exist, otherwise fallback
I am building a flask application, and I want it to serve some static
I want a route called 'main' which will serve static files: app.use('/main',express.static(__dirname+'/public')); However when
How can i use Tomcat to serve image files from a public folder outside
For testing purposes I want to use Jetty 8 to serve only static content.
I have a rails application running on Nginx which needs to serve files for

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.