How to host another web application in sub directory

Discussion in 'Site Programming, Development and Design' started by bashlyner, Apr 1, 2011.

  1. I'm new to .net programming and just purchase a Winhost Basic.

    I already host a MVC web application at my root folder and I could access it via something like

    Then I have another MVC web application that I published to a sub directory called "/FacebookApps" as this application will served as a facebook apps.

    Here's the problem, I tried to access the Facebook Apps via but it return me with an error of my web config file saying something like "Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'xxxt.axd' "

    I suspect this had something to do with the root's web config file that conflict with the sub folder's web config file as they both are almost identical and the web server is treating these two web application as one.

    So heres the question, do I need a sub domain in order to host the sub folder's application? Because I dun need a URL as my sub domain as I will point it to facebook. The URL will be just fine.

    If I really need a sub domain, do I have to follow those step stated in the sticky thread above? I think those step might not apply in my case as I don't need URL redirect I just need the sub directory able to run.

    Hope someone can help me as I'm still fresh in web developemnt.;)

    Here's the print screen of the error I encountered

  2. Ray


    Last edited by a moderator: Oct 14, 2015
  3. I've done that. Still no luck :(
  4. Ray


  5. It worked! Thanks for your link:D

    I tried to wrap the parent web config file with location tag but it give me an error saying the inheritInChildApplications is not allowed.

    Then I try put the <clear /> tag at the child web config file where there is any duplication and it worked :p
  6. Cool, glad you got it up and running.

Share This Page