Wednesday, March 28, 2012

Web.config has to sit in root

I have a web app which sit in a virtual but is a sub folder of the web tree.
I thought if I put the web.config in the virtual it would read from there
but it seems to only accept it if the web.config is in the root. Does my
application's virtual have to be configured as an application.

Will this cause any problems sharing things like sessions across different
virtuals configured as different applications. Regards, Chris.Chris wrote:

Quote:

Originally Posted by

I have a web app which sit in a virtual but is a sub folder of the web tree.
I thought if I put the web.config in the virtual it would read from there
but it seems to only accept it if the web.config is in the root. Does my
application's virtual have to be configured as an application.
>
Will this cause any problems sharing things like sessions across different
virtuals configured as different applications. Regards, Chris.
>


You can have a web.config file in each folder, if you like, but
application level settings can only be set in a web.config file that is
in the application root.

If your virtual folder is not an application folder, your application
root is not the virtual folder.

Sessions are local to the applications, so you can't share session
vatiables between applications.

--
Gran Andersson
_____
http://www.guffa.com
When I develop on my test machine using file system development in VS 2005.
It does it in a virtual folder which is the root. My production application
has to sit in a virtual which is one down from the root. When I put it live
I have to copy all the assembies to the root bin directory. How can I make
deployment simpler. My application has to share state with the rest of the
system. Regards, Chris.

"Gran Andersson" <guffa@.guffa.comwrote in message
news:Oelam1uRHHA.3812@.TK2MSFTNGP06.phx.gbl...

Quote:

Originally Posted by

Chris wrote:

Quote:

Originally Posted by

>I have a web app which sit in a virtual but is a sub folder of the web
>tree. I thought if I put the web.config in the virtual it would read from
>there but it seems to only accept it if the web.config is in the root.
>Does my application's virtual have to be configured as an application.
>>
>Will this cause any problems sharing things like sessions across
>different virtuals configured as different applications. Regards, Chris.


>
You can have a web.config file in each folder, if you like, but
application level settings can only be set in a web.config file that is in
the application root.
>
If your virtual folder is not an application folder, your application root
is not the virtual folder.
>
Sessions are local to the applications, so you can't share session
vatiables between applications.
>
--
Gran Andersson
_____
http://www.guffa.com

0 comments:

Post a Comment