ASP.Net using wrong web.config for virtual directory

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Robin9876

    ASP.Net using wrong web.config for virtual directory

    In IIS 7 I have created a web site which is located at C:\MyWebSite
    and in IIS Manager created a virtual folder which points to C:
    \MyVirtualFolde r. The virtual folder was then converted to an
    application using a separate application pool.

    However when accessing the virtual folder URL in a web browser it
    appears to be using the web.config of the root web site.

    What needs to change to allow the web.config in the virtual directory
    to be used?
  • Joe Fawcett

    #2
    Re: ASP.Net using wrong web.config for virtual directory



    "Robin9876" <robin9876@hotm ail.comwrote in message
    news:d0de62f3-94f2-4de7-98f0-576473595c27@s1 g2000prg.google groups.com...
    In IIS 7 I have created a web site which is located at C:\MyWebSite
    and in IIS Manager created a virtual folder which points to C:
    \MyVirtualFolde r. The virtual folder was then converted to an
    application using a separate application pool.
    >
    However when accessing the virtual folder URL in a web browser it
    appears to be using the web.config of the root web site.
    >
    What needs to change to allow the web.config in the virtual directory
    to be used?
    I don't understand where C:\MyWebSite comes into it.

    --

    Joe Fawcett (MVP - XML)


    Comment

    • Robin9876

      #3
      Re: ASP.Net using wrong web.config for virtual directory

      In IIS the web site's file location is C:\MyWebSite and then the
      virtual directory was created in IIS on this web site with its file
      location as C:\MyVirtualFol der\


      On 13 Nov, 17:59, "Joe Fawcett" <joefawc...@new sgroup.nospamwr ote:
      "Robin9876" <robin9...@hotm ail.comwrote in message
      >
      news:d0de62f3-94f2-4de7-98f0-576473595c27@s1 g2000prg.google groups.com...In IIS 7 I have created a web site which is located at C:\MyWebSite
      and in IIS Manager created a virtual folder which points to C:
      \MyVirtualFolde r. The virtual folder was then converted to an
      application using a separate application pool.
      >
      However when accessing the virtual folder URL in a web browser it
      appears to be using the web.config of the root web site.
      >
      What needs to change to allow the web.config in the virtual directory
      to be used?
      >
      I don't understand where C:\MyWebSite comes into it.
      >
      --
      >
      Joe Fawcett (MVP - XML)http://joe.fawcett.name

      Comment

      • Robin9876

        #4
        Re: ASP.Net using wrong web.config for virtual directory

        I got this to work by adding the following (with a closing tag) to the
        root web.config
        <location path="." inheritInChildA pplications="fa lse">

        On 14 Nov, 10:05, Robin9876 <robin9...@hotm ail.comwrote:
        In IIS the web site's file location is C:\MyWebSite and then the
        virtual directory was created in IIS on this web site with its file
        location as C:\MyVirtualFol der\
        >
        On 13 Nov, 17:59, "Joe Fawcett" <joefawc...@new sgroup.nospamwr ote:
        >
        "Robin9876" <robin9...@hotm ail.comwrote in message
        >
        news:d0de62f3-94f2-4de7-98f0-576473595c27@s1 g2000prg.google groups.com...In IIS 7 I have created a web site which is located at C:\MyWebSite
        and in IIS Manager created a virtual folder which points to C:
        \MyVirtualFolde r. The virtual folder was then converted to an
        application using a separate application pool.
        >
        However when accessing the virtual folder URL in a web browser it
        appears to be using the web.config of the root web site.
        >
        What needs to change to allow the web.config in the virtual directory
        to be used?
        >
        I don't understand where C:\MyWebSite comes into it.
        >
        --
        >
        Joe Fawcett (MVP - XML)http://joe.fawcett.name

        Comment

        Working...