Virtual Directory setup not working on IIS

560 Views Asked by At

I have following Projects in my asp.net application:

  • Web (main website)
  • Shop (subset)

Now instead of accessing the website through shop.abc.com i want it to access it through abc.com/shop hence i have created a virtual directory on IIS under Web (called shop) and pointed it to the Shop application, so that when i want to access any pages inside shop app, i can simply access it like abc.com/shop/page.aspx, the pages inside the Shop app are tied up to the MasterPage, when the access page inside the shop app it throws me error saying:

The file '/Web/Shop.Master' does not exist.

That's a strange error for me since i have pointed the virtual directory to Shop, so when i access any page inside the Shop app, it should be using the MasterPage of ShopApp, but the error says it's trying to access MasterPage inside the Web app. Though it goes to the proper ContentPage inside the shop app.

Can anyone suggest what could be the issue.

UPDATES

This is how my IIS looks like

This is the pages inside Shop App

I have created a route in Global for ~/Shop/Category.aspx as section/{name}/{id} which resides inside the Shop app. hence when i access abc.com/section/bedroom/1 it should hit inside the category page of Shop app, which it does but it throws error for the MasterPage. When i keep the same master page inside the Web App it works, bu that's not what i want, since all my Shop app logic would be binded there. Also i tried to use ~/Shop/Shop.master inside the Shop app, but that too does not works.

0

There are 0 best solutions below