1

Is there a way to configure the default directory in web.config?

My Default.aspx file is not in the root folder but in /Public/Default.aspx.

I found this post : Set Default Page in Asp.net but it does't work, probably because it's only to configure the default page and not the default directory...

2
  • 1
    no way to do what you ask to my knowledge. Can't you put a Default.aspx file in the root directory and from that one do a redirect to your /Public/Default.aspx ? anyway this looks to me like looking for issues, have a default in the root and call your nested one something else... Commented Oct 5, 2011 at 17:16
  • Is you web application hosted some where or it's on you pc? Because from IIS you can do this by changing the settings of virtual directory. A link to walk though of dping so msdn.microsoft.com/en-us/library/ha2y9493.aspx Commented Oct 5, 2011 at 17:22

1 Answer 1

2

You'll want to configure this in IIS.

You have your website already setup, and all you need to do is add an "Application" within that website.

Add Application...
Add Application

You can also create a Virtual Directory which would give a similar result. Unfortunately you will still be navigating to http://example.com/public/

My question to you is, what is in the wwwroot directory? Is there a different website? Why not launch two websites within IIS?

Here's more information C/O @waqas

Sign up to request clarification or add additional context in comments.

2 Comments

short answer... this isn't going to happen with web.config.
Thank you guys, I'm gonna try that. I'm not the server administrator so I will ask to my co-worker to do that manip.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.