Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > VS sub directory application

Reply
Thread Tools

VS sub directory application

 
 
densial
Guest
Posts: n/a
 
      02-26-2009
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.
 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      02-26-2009
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" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
>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.



 
Reply With Quote
 
 
 
 
densial
Guest
Posts: n/a
 
      02-26-2009
On Feb 26, 2:50 pm, "Juan T. Llibre" <(E-Mail Removed)>
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.
 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      02-26-2009
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" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> On Feb 26, 2:50 pm, "Juan T. Llibre" <(E-Mail Removed)>
> 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.



 
Reply With Quote
 
Ben Amada
Guest
Posts: n/a
 
      02-26-2009
On Feb 25, 6:05*pm, densial <(E-Mail Removed)> 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/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Death To Sub-Sub-Sub-Directories! Lawrence D'Oliveiro Java 92 05-20-2011 06:50 AM
Is there a function that can test if a path is in a directory or oneof its sub-directory (recursively)? Peng Yu Python 0 11-06-2009 03:41 AM
Recognising Sub-Items and sub-sub items using xslt Ben XML 2 09-19-2007 09:35 AM
Dynamicaly read a directory & its sub-directory. akrashid@gmail.com HTML 4 01-26-2007 05:48 PM
list all css files in a directory and sub directory TJS ASP .Net 1 06-23-2004 10:49 AM



Advertisments