1

I have a shared server with IIS 8.5. its already running a website on like www.domain.com. I want to create a new website in visual studio 2012 and upload it on the server. the new website will not be directly uploaded to the root but a folder on root named subweb.

I want the sub website to access its own assemblies and have its own references. It should be accessible on the server with www.domain.com/subweb/default.aspx. I don't want to make any changes to the existing web project running on the root. How can I do that?

halfer
  • 19,824
  • 17
  • 99
  • 186
Muhammad Adeel Zahid
  • 17,474
  • 14
  • 90
  • 155

1 Answers1

1

In IIS Manager, right click on the folder just above where you'd like your sub-site to go and choose Add Application. If you want your sub-site to be found at /subsite/ then you'd be right clicking on the root of the main site and, after choosing Add Application, you'd need to provide a name and file path. Give your application a name of "subsite" (like with a virtual directory.) You'd then point to the physical file folder where you've published your new web site, which should be published to a different directory structure than your main site, rather than beneath it.

Neil Cresswell
  • 1,145
  • 8
  • 20
  • No problem. Your app itself should be fine but need to watch your sub-app's web.config though since it can inherit settings from the main one. See http://stackoverflow.com/questions/782252/avoid-web-config-inheritance-in-child-web-application-using-inheritinchildapplic for some easy work-arounds you can apply to your sub-app's web.config. – Neil Cresswell Mar 16 '14 at 00:42
  • its default web.config created for new webforms app. did not included anything extra – Muhammad Adeel Zahid Mar 16 '14 at 00:47