Default website web.config problem

Default website web.config problem

am 09.07.2007 13:54:33 von JensB

I got a couple of websites and webservices.
Some are running AppPool for asp.net 1.1 and some in another pool for
asp.net 2.0 apps.

My problem is when I setup my company website as the startup site, I get
errors from all the ohter apps,
I can see that all Apps start looking at my company web.config file instead
of their own web.config file.

If I remove my company website from the the home directory, all apps works
again,
but my company website stop working offcourse.

Can anyone see what I am doing wrong?

Jens

Re: Default website web.config problem

am 09.07.2007 14:12:28 von Ken Schaefer

What do you mean by "My problem is when I setup my company website as the
startup site". What steps exactly are you performing to do this?

Cheers
Ken


"JensB" wrote in message
news:ucM$k7hwHHA.1164@TK2MSFTNGP02.phx.gbl...
>I got a couple of websites and webservices.
> Some are running AppPool for asp.net 1.1 and some in another pool for
> asp.net 2.0 apps.
>
> My problem is when I setup my company website as the startup site, I get
> errors from all the ohter apps,
> I can see that all Apps start looking at my company web.config file
> instead of their own web.config file.
>
> If I remove my company website from the the home directory, all apps works
> again,
> but my company website stop working offcourse.
>
> Can anyone see what I am doing wrong?
>
> Jens
>
>

Re: Default website web.config problem

am 09.07.2007 16:27:35 von JensB

"Ken Schaefer" wrote in message
news:eZk7tJiwHHA.3364@TK2MSFTNGP02.phx.gbl...
> What do you mean by "My problem is when I setup my company website as the
> startup site". What steps exactly are you performing to do this?

Thx Ken
In IIS Default Website Properties, I click "Home Directory" tab, then I
click "Create" in Applications settings, and type my Virtuel Website name,
and then browse to the "local path" to the file where my MywebSite is
located C:\Inetpub\wwwroot\MywebSite. ( I know this is why the other
applications can't see) their folders.

If I just leave "Application settings" empty, there is no function to tell
where my Company Website is located as default start-up site.

As you see, I am a newbie to this issue, but hope to learn quickly.

Regards Jens

Re: Default website web.config problem

am 10.07.2007 02:11:43 von Ken Schaefer

Hi,

All you are doing is configuring the root web site and application. As far
as I know there is no "startup website" or anything in IIS.

For all your other web applications, are they located off the root of the
default website, eg?

Root (Company website)
|
+--- App1
|
+--- App2

If so, for each application that has it's own web.config file, right-click
on that application's folder in IIS Manager,and on the Directory tab, create
a new application root.

Cheers
Ken



"JensB" wrote in message
news:OhI9GRjwHHA.484@TK2MSFTNGP06.phx.gbl...
>
> "Ken Schaefer" wrote in message
> news:eZk7tJiwHHA.3364@TK2MSFTNGP02.phx.gbl...
>> What do you mean by "My problem is when I setup my company website as the
>> startup site". What steps exactly are you performing to do this?
>
> Thx Ken
> In IIS Default Website Properties, I click "Home Directory" tab, then I
> click "Create" in Applications settings, and type my Virtuel Website name,
> and then browse to the "local path" to the file where my MywebSite is
> located C:\Inetpub\wwwroot\MywebSite. ( I know this is why the other
> applications can't see) their folders.
>
> If I just leave "Application settings" empty, there is no function to
> tell where my Company Website is located as default start-up site.
>
> As you see, I am a newbie to this issue, but hope to learn quickly.
>
> Regards Jens
>
>

Re: Default website web.config problem

am 10.07.2007 10:14:25 von JensB

"Ken Schaefer" wrote in message
news:OqiRobowHHA.4628@TK2MSFTNGP02.phx.gbl...
> Hi,
>
> All you are doing is configuring the root web site and application. As far
> as I know there is no "startup website" or anything in IIS.
>
> For all your other web applications, are they located off the root of the
> default website, eg?
>
> Root (Company website)
> |
> +--- App1
> |
> +--- App2
>
> If so, for each application that has it's own web.config file, right-click
> on that application's folder in IIS Manager,and on the Directory tab,
> create a new application root.
>
> Cheers
> Ken

Ken
In the future I will use the correct verb "Root" instead of "startup
website" -:)
When I set up my applications like you are showing, I get an error when I
start App1 or App2.
From what I can see running localhost.App1 or localhost.App2, are they
trying to read the Root web.config file
instead of their own web.config file.
If I click the ASP.NET tab, the web.config file location seems to be
correct.
So how come that all Apps read the Root web.config file?

Regards
Jens

Re: Default website web.config problem

am 10.07.2007 14:46:13 von Ken Schaefer

"JensB" wrote in message
news:ONuIQlswHHA.424@TK2MSFTNGP06.phx.gbl...
>
> "Ken Schaefer" wrote in message
> news:OqiRobowHHA.4628@TK2MSFTNGP02.phx.gbl...
>> Hi,
>>
>> All you are doing is configuring the root web site and application. As
>> far as I know there is no "startup website" or anything in IIS.
>>
>> For all your other web applications, are they located off the root of the
>> default website, eg?
>>
>> Root (Company website)
>> |
>> +--- App1
>> |
>> +--- App2
>>
>> If so, for each application that has it's own web.config file,
>> right-click on that application's folder in IIS Manager,and on the
>> Directory tab, create a new application root.
>>
>> Cheers
>> Ken
>
> Ken
> In the future I will use the correct verb "Root" instead of "startup
> website" -:)
> When I set up my applications like you are showing, I get an error when I
> start App1 or App2.
> From what I can see running localhost.App1 or localhost.App2, are they
> trying to read the Root web.config file
> instead of their own web.config file.
> If I click the ASP.NET tab, the web.config file location seems to be
> correct.
> So how come that all Apps read the Root web.config file?

I'm not entirely sure how you have IIS configured, so I can't answer this.
However if "App1" and "App2" are not configured as application roots in IIS,
then as far as IIS and ASP.NET is concerned, they are not Applications, and
so they inherit from the web.config file that is at the application they are
in (which is the root application)

Cheers
Ken

Re: Default website web.config problem

am 10.07.2007 16:05:33 von nomailreplies

re:
re:
!> Some are running AppPool for asp.net 1.1 and some in another pool for asp.net 2.0 apps.

!> However if "App1" and "App2" are not configured as application roots in IIS,
!> then as far as IIS and ASP.NET is concerned, they are not Applications, and
!> so they inherit from the web.config file that is at the application they are
!> in (which is the root application)

Even if they *are* configured as Applications, there's some things which *are*
inherited from the root application in IIS, primarily .Net Framework version specifics.

If the root application is configured to run using the .Net Framework 1.1,
even if you configure an Application to run using the .Net Framework 2.0,
you will get compilation errors due "unrecognized web.config section".

The same works in reverse, if the root app is configured to run using the
..Net Framework 2.0, and you configure a .Net Framework 1.1 application.

Most settings *will* work in both versions, and therefore in
both .Net Framework applications, but some are incompatible.

See this thread for the results of extensive testing which confirms the above:
http://groups.google.com/group/microsoft.public.dotnet.frame work.aspnet/browse_thread/thread/8f6681e2ac22f560/47d0cf56f0 0ffa6c?lnk=st&q=insubject%3Arunning+insubject%3A1.1+author%3 Anomailreplies%40nowhere.com&rnum=1&hl=en#47d0cf56f00ffa6c




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Ken Schaefer" wrote in message news:%23KyLPBvwHHA.3400@TK2MSFTNGP03.phx.gbl...
> "JensB" wrote in message news:ONuIQlswHHA.424@TK2MSFTNGP06.phx.gbl...
>>
>> "Ken Schaefer" wrote in message news:OqiRobowHHA.4628@TK2MSFTNGP02.phx.gbl...
>>> Hi,
>>>
>>> All you are doing is configuring the root web site and application. As far as I know there is no "startup website"
>>> or anything in IIS.
>>>
>>> For all your other web applications, are they located off the root of the default website, eg?
>>>
>>> Root (Company website)
>>> |
>>> +--- App1
>>> |
>>> +--- App2
>>>
>>> If so, for each application that has it's own web.config file, right-click on that application's folder in IIS
>>> Manager,and on the Directory tab, create a new application root.
>>>
>>> Cheers
>>> Ken
>>
>> Ken
>> In the future I will use the correct verb "Root" instead of "startup website" -:)
>> When I set up my applications like you are showing, I get an error when I start App1 or App2.
>> From what I can see running localhost.App1 or localhost.App2, are they trying to read the Root web.config file
>> instead of their own web.config file.
>> If I click the ASP.NET tab, the web.config file location seems to be correct.
>> So how come that all Apps read the Root web.config file?
>
> I'm not entirely sure how you have IIS configured, so I can't answer this. However if "App1" and "App2" are not
> configured as application roots in IIS, then as far as IIS and ASP.NET is concerned, they are not Applications, and so
> they inherit from the web.config file that is at the application they are in (which is the root application)
>
> Cheers
> Ken

Re: Default website web.config problem

am 10.07.2007 18:56:56 von JensB

Thanks to Ken and Juan for your replys.

First of all I got all apps working again.-:)

I Juan pointed out, the problem had something to do with AppPool Asp.net 1.1
and 2.0.,
even I had 2 pools for a long time, and it also worked well.
The problem was initiated when I changed ISP and added a bridge router in
front of my LAN router.
That affected an App doing internet replication, and I started to "fumble"
with IIS web site manager,
and suddenly nothing did work.

After re-installing all App's It loks like this:
the Root App (ASP.NET 2.0) the web.config file is now located only in the
"root/_vti_cnf" folder
- + App1(asp.net 1.1)
- + App2(asp.net 2.0)

this works fine.

What I still don't understand is how a web.config file landed in the root
originally?
or how the Root App can work without a web.config in wwwroot?

Thanks again for you help.
Jens

Re: Default website web.config problem

am 10.07.2007 22:12:45 von nomailreplies

re:
!> After re-installing all App's It loks like this:
!> the Root App (ASP.NET 2.0) the web.config file is now located only in the
!> "root/_vti_cnf" folder

That web.config file is not needed.
As long as there's no web.config in the root directory, you'll have no compatibility problems

The corollary to this is that developers should *never* use the root app for anything.

*Every* single app should be hosted in either virtual directories or Web Applications.
If the root has a web.config...there will be problems with down-the-root applications.

re:
!> - + App1(asp.net 1.1)
!> - + App2(asp.net 2.0)

Exactly. If no web.config exists in the root, no matter which .Net Framework the root
is targeted against, there will be no conflicts with below-the-root web.config compatibilities.

re:
!> this works fine.

Indeed, it should. You found a good way to work around the problem!

re:
!> What I still don't understand is how a web.config file landed in the root originally?

Maybe you used the WAT ( Web Administration Tool ).
That will automatically create a web.config.

Or, perhaps you tried to debug the root and couldn't ?
That prompts for the creation of a web.config.

re:
!> or how the Root App can work without a web.config in wwwroot?

A web.config isn't needed for an ASP.NET app, even the root app, to work.
What the root needs to work is inherited from machine.config.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"JensB" wrote in message news:%23BGhNJxwHHA.4592@TK2MSFTNGP05.phx.gbl...
> Thanks to Ken and Juan for your replys.
>
> First of all I got all apps working again.-:)
>
> I Juan pointed out, the problem had something to do with AppPool Asp.net 1.1 and 2.0.,
> even I had 2 pools for a long time, and it also worked well.
> The problem was initiated when I changed ISP and added a bridge router in front of my LAN router.
> That affected an App doing internet replication, and I started to "fumble" with IIS web site manager,
> and suddenly nothing did work.
>
> After re-installing all App's It loks like this:
> the Root App (ASP.NET 2.0) the web.config file is now located only in the "root/_vti_cnf" folder
> - + App1(asp.net 1.1)
> - + App2(asp.net 2.0)
>
> this works fine.
>
> What I still don't understand is how a web.config file landed in the root originally?
> or how the Root App can work without a web.config in wwwroot?
>
> Thanks again for you help.
> Jens
>

Re: Default website web.config problem

am 10.07.2007 23:46:16 von JensB

Hi Juan
One game is to know how to do things,
another game is to understand why.
You gave me some understanding.
Thanks again
Jens

"Juan T. Llibre" wrote in message
news:uAWry6ywHHA.1776@TK2MSFTNGP03.phx.gbl...
> re:
> !> After re-installing all App's It loks like this:
> !> the Root App (ASP.NET 2.0) the web.config file is now located only in
> the
> !> "root/_vti_cnf" folder
>
> That web.config file is not needed.
> As long as there's no web.config in the root directory, you'll have no
> compatibility problems
>
> The corollary to this is that developers should *never* use the root app
> for anything.
>
> *Every* single app should be hosted in either virtual directories or Web
> Applications.
> If the root has a web.config...there will be problems with down-the-root
> applications.
>
> re:
> !> - + App1(asp.net 1.1)
> !> - + App2(asp.net 2.0)
>
> Exactly. If no web.config exists in the root, no matter which .Net
> Framework the root
> is targeted against, there will be no conflicts with below-the-root
> web.config compatibilities.
>
> re:
> !> this works fine.
>
> Indeed, it should. You found a good way to work around the problem!
>
> re:
> !> What I still don't understand is how a web.config file landed in the
> root originally?
>
> Maybe you used the WAT ( Web Administration Tool ).
> That will automatically create a web.config.
>
> Or, perhaps you tried to debug the root and couldn't ?
> That prompts for the creation of a web.config.
>
> re:
> !> or how the Root App can work without a web.config in wwwroot?
>
> A web.config isn't needed for an ASP.NET app, even the root app, to work.
> What the root needs to work is inherited from machine.config.
>
>
>
>
> Juan T. Llibre, asp.net MVP
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en español : http://asp.net.do/foros/
> ======================================
> "JensB" wrote in message
> news:%23BGhNJxwHHA.4592@TK2MSFTNGP05.phx.gbl...
>> Thanks to Ken and Juan for your replys.
>>
>> First of all I got all apps working again.-:)
>>
>> I Juan pointed out, the problem had something to do with AppPool Asp.net
>> 1.1 and 2.0.,
>> even I had 2 pools for a long time, and it also worked well.
>> The problem was initiated when I changed ISP and added a bridge router in
>> front of my LAN router.
>> That affected an App doing internet replication, and I started to
>> "fumble" with IIS web site manager,
>> and suddenly nothing did work.
>>
>> After re-installing all App's It loks like this:
>> the Root App (ASP.NET 2.0) the web.config file is now located only in the
>> "root/_vti_cnf" folder
>> - + App1(asp.net 1.1)
>> - + App2(asp.net 2.0)
>>
>> this works fine.
>>
>> What I still don't understand is how a web.config file landed in the root
>> originally?
>> or how the Root App can work without a web.config in wwwroot?
>>
>> Thanks again for you help.
>> Jens
>>
>
>