VS sub directory application

Discussion in 'ASP .Net' started by densial, Feb 26, 2009.

  1. densial

    densial Guest

    I have a web site, one of the subdirectories is an application, I want
    to mimic this in VS but I don't know how to set a subdir as an
    application in VS itself.

    I have set the Start options to use custom server, and pointed this at
    my a local IIS which in turn points to my source, and IIS has the
    application specified, but VS won't compile because one of my settings
    in the web.config of the subdir requires the subdir to be an
    application, which obviously it is in IIS but not in VS. if you get my
    drift.

    any help greatly appreciated.
    densial, Feb 26, 2009
    #1
    1. Advertising

  2. re:
    !> I have set the Start options to use custom server, and pointed this at my a local IIS
    !> one of my settings in the web.config of the subdir requires the
    !> subdir to be an application, which obviously it is in IIS but not in VS.

    If you set the Start options to use IIS, then VS uses IIS to display
    your pages, and doesn't use the internal ASP.NET Development server.

    All of the IIS-configurated options/features are available if you use IIS.

    You will have to compile the website before seeing any changes, though.
    Use the Build menu to build your website before displaying the page(s) you're working on.

    re:
    !> I don't know how to set a subdir as an application in VS itself.

    You shouldn't need to do that of you use IIS as the server VS uses to display your pages.




    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    =========================
    "densial" <> wrote in message news:...
    >I have a web site, one of the subdirectories is an application, I want
    > to mimic this in VS but I don't know how to set a subdir as an
    > application in VS itself.
    >
    > I have set the Start options to use custom server, and pointed this at
    > my a local IIS which in turn points to my source, and IIS has the
    > application specified, but VS won't compile because one of my settings
    > in the web.config of the subdir requires the subdir to be an
    > application, which obviously it is in IIS but not in VS. if you get my
    > drift.
    >
    > any help greatly appreciated.
    Juan T. Llibre, Feb 26, 2009
    #2
    1. Advertising

  3. densial

    densial Guest

    On Feb 26, 2:50 pm, "Juan T. Llibre" <>
    wrote:
    > re:
    > !> I have set the Start options to use custom server, and pointed this at my a local IIS
    > !> one of my settings in the web.config of the subdir requires the
    > !> subdir to be an application, which obviously it is in IIS but not in VS.
    >
    > If you set the Start options to use IIS, then VS uses IIS to display
    > your pages, and doesn't use the internal ASP.NET Development server.
    >
    > All of the IIS-configurated options/features are available if you use IIS.
    >
    > You will have to compile the website before seeing any changes, though.
    > Use the Build menu to build your website before displaying the page(s) you're working on.
    >
    > re:
    > !> I don't know how to set a subdir as an application in VS itself.
    >
    > You shouldn't need to do that of you use IIS as the server VS uses to display your pages.
    >

    absolutely right, I have set my VS to use IIS to display the pages,
    and I have set the physical directory to be an application in IIS.
    However when I push F5 to run my application in debug mode it kicks
    back an error because when it's compiling it's source, it says I have
    in incompatible line in my subdirectories web.config file, it says the
    line is only valid if the if the subdirectory is an application, which
    it is at compile time within VS, but which it is at run time in IIS.

    I can still run my app in debug mode by clicking Yes to use the last
    successful build, but the compilation within VS itself is failing.

    hope this makes sense.
    densial, Feb 26, 2009
    #3
  4. re:
    !> However when I push F5 to run my application in debug mode it kicks
    !> back an error because when it's compiling its source, it says I have
    !> in incompatible line in my subdirectories web.config file, it says the
    !> line is only valid if the if the subdirectory is an application, which
    !> it is at compile time within VS, but which it is at run time in IIS.

    You may have to add your subdirectory application
    as a project which depends on your main application.

    i.e., instead of dealing with your subdirectory app as a physical subdirectory in your main app,
    create a separate project for your subdirectory app and add the project to your main app.

    Now, when you push F5, the subdirectory will be compiled first,
    and everything else should fall into place.

    That should take care of the problem. Test it out.
    If not, we can escalate the situation to Support Services.




    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    =========================
    "densial" <> wrote in message news:...
    > On Feb 26, 2:50 pm, "Juan T. Llibre" <>
    > wrote:
    >> re:
    >> !> I have set the Start options to use custom server, and pointed this at my a local IIS
    >> !> one of my settings in the web.config of the subdir requires the
    >> !> subdir to be an application, which obviously it is in IIS but not in VS.
    >>
    >> If you set the Start options to use IIS, then VS uses IIS to display
    >> your pages, and doesn't use the internal ASP.NET Development server.
    >>
    >> All of the IIS-configurated options/features are available if you use IIS.
    >>
    >> You will have to compile the website before seeing any changes, though.
    >> Use the Build menu to build your website before displaying the page(s) you're working on.
    >>
    >> re:
    >> !> I don't know how to set a subdir as an application in VS itself.
    >>
    >> You shouldn't need to do that of you use IIS as the server VS uses to display your pages.
    >>

    > absolutely right, I have set my VS to use IIS to display the pages,
    > and I have set the physical directory to be an application in IIS.


    > However when I push F5 to run my application in debug mode it kicks
    > back an error because when it's compiling it's source, it says I have
    > in incompatible line in my subdirectories web.config file, it says the
    > line is only valid if the if the subdirectory is an application, which
    > it is at compile time within VS, but which it is at run time in IIS.
    >
    > I can still run my app in debug mode by clicking Yes to use the last
    > successful build, but the compilation within VS itself is failing.
    >
    > hope this makes sense.
    Juan T. Llibre, Feb 26, 2009
    #4
  5. densial

    Ben Amada Guest

    On Feb 25, 6:05 pm, densial <> wrote:
    > I have a web site, one of the subdirectories is an application, I want
    > to mimic this in VS but I don't know how to set a subdir as an
    > application in VS itself.
    >
    > I have set the Start options to use custom server, and pointed this at
    > my a local IIS which in turn points to my source, and IIS has the
    > application specified, but VS won't compile because one of my settings
    > in the web.config of the subdir requires the subdir to be an
    > application, which obviously it is in IIS but not in VS. if you get my
    > drift.
    >
    > any help greatly appreciated.


    This seems to be a limitation of VS -- in that it isn't sub-
    application aware. I asked about this a few months ago [1].

    What I've done in a scenario like this is to move the sub-directory
    out into its own folder -- so it's no longer a physical sub-directory
    under that parent application. But in IIS, the 'old' sub-directory is
    still a sub-directory underneath the parent. By doing this, when I
    open up the parent application in VS, the sub-directory is no longer
    there and no more compile errors.

    [1] http://forums.asp.net/p/1348403/2746722.aspx

    --
    Ben | http://allben.net/
    Ben Amada, Feb 26, 2009
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TJS
    Replies:
    1
    Views:
    499
    Eliyahu Goldin
    Jun 23, 2004
  2. Replies:
    4
    Views:
    357
    Jonathan N. Little
    Jan 26, 2007
  3. Ben
    Replies:
    2
    Views:
    859
  4. Peng Yu
    Replies:
    0
    Views:
    321
    Peng Yu
    Nov 6, 2009
  5. Lawrence D'Oliveiro

    Death To Sub-Sub-Sub-Directories!

    Lawrence D'Oliveiro, May 5, 2011, in forum: Java
    Replies:
    92
    Views:
    1,962
    Lawrence D'Oliveiro
    May 20, 2011
Loading...

Share This Page