By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,453 Members | 3,225 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,453 IT Pros & Developers. It's quick & easy.

IIS Application Required?

P: n/a
Hi,

Do you always have to make a folder an application if you have a web.config
in that folder?
Thanks,

Andy
Nov 19 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
Do you always have to make a folder an application if you have a web.config
in that folder and the web.config has Forms Authentication?

"Andy Sutorius" <an**@sutorius.com> wrote in message
news:hc*********************@twister.southeast.rr. com...
Hi,

Do you always have to make a folder an application if you have a web.config in that folder?
Thanks,

Andy

Nov 19 '05 #2

P: n/a
Yes. Or a virtual directory. Or the root of you website.

This might be different if you are developing on Web Matrix as it has it's
own built-in webserver..but for VS.Net development or for production on IIS,
yes.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Andy Sutorius" <an**@sutorius.com> wrote in message
news:hc*********************@twister.southeast.rr. com...
Hi,

Do you always have to make a folder an application if you have a web.config in that folder?
Thanks,

Andy

Nov 19 '05 #3

P: n/a
> Do you always have to make a folder an application if you have a
web.config
No. Only if you want to run an ASP.Net app in it. ;-)

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Andy Sutorius" <an**@sutorius.com> wrote in message
news:hc*********************@twister.southeast.rr. com... Hi,

Do you always have to make a folder an application if you have a
web.config
in that folder?
Thanks,

Andy

Nov 19 '05 #4

P: n/a
You can get away without having to make the app run within a virtual
directory if you exculde the <authentication> , and <sessionState> elements
in the web.config file. There are others but these elements are put in the
web.config file by default by VS.NET. These 2 tags along with a couple others
can only be defined at the application level. So, this is why the virtual
directory is needed to use Forms Authentication

"Andy Sutorius" wrote:
Do you always have to make a folder an application if you have a web.config
in that folder and the web.config has Forms Authentication?

"Andy Sutorius" <an**@sutorius.com> wrote in message
news:hc*********************@twister.southeast.rr. com...
Hi,

Do you always have to make a folder an application if you have a

web.config
in that folder?
Thanks,

Andy


Nov 19 '05 #5

P: n/a
Actually, in spite of Karl and Kevin's opinions
to the contrary, you do *not* need to make a
folder an application, nor even a virtual directory,
in order to run a web.config in that directory.

All that's needed is for the directory to be a sub-directory
of an application, and you *will* be able to run a web.config
file in that directory which establishes rules for that sub-dir.

What you *cannot* do is, in a directory's web.config,
make application-level changes. Local changes which
modify the way the application reacts to requests *within*
that sub-directory are fine.

You could have a zillion directories,
and a zillion web.configs i each sub-dir,
all running under *one* application root.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=====================

"Andy Sutorius" <an**@sutorius.com> wrote in message
news:hc*********************@twister.southeast.rr. com...
Hi,

Do you always have to make a folder an application if you have a
web.config
in that folder?
Thanks,

Andy

Nov 19 '05 #6

P: n/a
You're correct, Juan. I was only partially correct, in that the web itself
needs to be configured as an application, but a sub-directory of that
application can contain a web.config and not be configured as a separate app
(and in fact, in many cases, SHOULD not be). Thanks for clearing that up!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:eD**************@TK2MSFTNGP10.phx.gbl...
Actually, in spite of Karl and Kevin's opinions
to the contrary, you do *not* need to make a
folder an application, nor even a virtual directory,
in order to run a web.config in that directory.

All that's needed is for the directory to be a sub-directory
of an application, and you *will* be able to run a web.config
file in that directory which establishes rules for that sub-dir.

What you *cannot* do is, in a directory's web.config,
make application-level changes. Local changes which
modify the way the application reacts to requests *within*
that sub-directory are fine.

You could have a zillion directories,
and a zillion web.configs i each sub-dir,
all running under *one* application root.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=====================

"Andy Sutorius" <an**@sutorius.com> wrote in message
news:hc*********************@twister.southeast.rr. com...
Hi,

Do you always have to make a folder an application if you have a
web.config
in that folder?
Thanks,

Andy


Nov 19 '05 #7

P: n/a
This is along the same lines but maybe you can help me figure our what went
wrong. I came across a issue last week where I had a folder under my wwwroot
with a few aspx pages and I tried to run one of the pages and I got an error
that IIS could not load the type of the page. ie. It would not load my .dll
from my bin directory. However, if I made it a virtual directory then the
pages ran just fine. So, in that senario, is a virtual directory necessary
for those aspx files to run?

BTW. I didn't had any web.config file in that folder..because I didn't
need it

"Juan T. Llibre" wrote:
Actually, in spite of Karl and Kevin's opinions
to the contrary, you do *not* need to make a
folder an application, nor even a virtual directory,
in order to run a web.config in that directory.

All that's needed is for the directory to be a sub-directory
of an application, and you *will* be able to run a web.config
file in that directory which establishes rules for that sub-dir.

What you *cannot* do is, in a directory's web.config,
make application-level changes. Local changes which
modify the way the application reacts to requests *within*
that sub-directory are fine.

You could have a zillion directories,
and a zillion web.configs i each sub-dir,
all running under *one* application root.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=====================

"Andy Sutorius" <an**@sutorius.com> wrote in message
news:hc*********************@twister.southeast.rr. com...
Hi,

Do you always have to make a folder an application if you have a
web.config
in that folder?
Thanks,

Andy


Nov 19 '05 #8

P: n/a
re:
I got an error that IIS could not load the type of the page.
ie. It would not load my .dll from my bin directory. However, if I made it a virtual directory then the
pages ran just fine. So, in that scenario, is a virtual
directory necessary for those aspx files to run?
Absolutely. You need a virtual directory if the /bin
directory below the directory where the files are
located is going to work.

If you're running .aspx pages from a directory which
hasn't been made a virtual directory or an ASP.NET app,
then the /bin directory below /wwwroot will be the directory
where the page will look for the assembly.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=====================

"Tampa .NET Koder" <Ta***********@discussions.microsoft.com> wrote in
message news:B3**********************************@microsof t.com... This is along the same lines but maybe you can help me figure our what
went
wrong. I came across a issue last week where I had a folder under my
wwwroot
with a few aspx pages and I tried to run one of the pages and I got an
error
that IIS could not load the type of the page. ie. It would not load my
.dll
from my bin directory. However, if I made it a virtual directory then the
pages ran just fine. So, in that senario, is a virtual directory
necessary
for those aspx files to run?

BTW. I didn't had any web.config file in that folder..because I didn't
need it

"Juan T. Llibre" wrote:
Actually, in spite of Karl and Kevin's opinions
to the contrary, you do *not* need to make a
folder an application, nor even a virtual directory,
in order to run a web.config in that directory.

All that's needed is for the directory to be a sub-directory
of an application, and you *will* be able to run a web.config
file in that directory which establishes rules for that sub-dir.

What you *cannot* do is, in a directory's web.config,
make application-level changes. Local changes which
modify the way the application reacts to requests *within*
that sub-directory are fine.

You could have a zillion directories,
and a zillion web.configs i each sub-dir,
all running under *one* application root.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=====================

"Andy Sutorius" <an**@sutorius.com> wrote in message
news:hc*********************@twister.southeast.rr. com...
> Hi,
>
> Do you always have to make a folder an application if you have a
> web.config
> in that folder?
>
>
> Thanks,
>
> Andy
>
>



Nov 19 '05 #9

P: n/a
YOU ROCK MAN! Some books don't explain this clearly. I have always wondered
about this. See, this is what you get when vs.net does everything for you.
Ah well, I still can't live without it! :-)

"Juan T. Llibre" wrote:
re:
I got an error that IIS could not load the type of the page.
ie. It would not load my .dll from my bin directory.

However, if I made it a virtual directory then the
pages ran just fine. So, in that scenario, is a virtual
directory necessary for those aspx files to run?


Absolutely. You need a virtual directory if the /bin
directory below the directory where the files are
located is going to work.

If you're running .aspx pages from a directory which
hasn't been made a virtual directory or an ASP.NET app,
then the /bin directory below /wwwroot will be the directory
where the page will look for the assembly.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=====================

"Tampa .NET Koder" <Ta***********@discussions.microsoft.com> wrote in
message news:B3**********************************@microsof t.com...
This is along the same lines but maybe you can help me figure our what
went
wrong. I came across a issue last week where I had a folder under my
wwwroot
with a few aspx pages and I tried to run one of the pages and I got an
error
that IIS could not load the type of the page. ie. It would not load my
.dll
from my bin directory. However, if I made it a virtual directory then the
pages ran just fine. So, in that senario, is a virtual directory
necessary
for those aspx files to run?

BTW. I didn't had any web.config file in that folder..because I didn't
need it

"Juan T. Llibre" wrote:
Actually, in spite of Karl and Kevin's opinions
to the contrary, you do *not* need to make a
folder an application, nor even a virtual directory,
in order to run a web.config in that directory.

All that's needed is for the directory to be a sub-directory
of an application, and you *will* be able to run a web.config
file in that directory which establishes rules for that sub-dir.

What you *cannot* do is, in a directory's web.config,
make application-level changes. Local changes which
modify the way the application reacts to requests *within*
that sub-directory are fine.

You could have a zillion directories,
and a zillion web.configs i each sub-dir,
all running under *one* application root.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=====================

"Andy Sutorius" <an**@sutorius.com> wrote in message
news:hc*********************@twister.southeast.rr. com...
> Hi,
>
> Do you always have to make a folder an application if you have a
> web.config
> in that folder?
>
>
> Thanks,
>
> Andy
>
>


Nov 19 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.