Pedro
Pedro

Reputation: 3781

Set default directory in Asp.net

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...

Upvotes: 1

Views: 3739

Answers (1)

Chase Florell
Chase Florell

Reputation: 47387

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

Upvotes: 2

Related Questions