VS sub directory application

  • Thread starter Thread starter densial
  • Start date Start date
D

densial

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.
 
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/
=========================
 
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.
 
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/
=========================
 
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
 
Back
Top