473,407 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

ASP.NET Application - Defined???

I am having trouble understanding the ASP.NET application boundaries. Here's my setup:

1. Win2003 Server with IIS 6 and an application defined at the root "SalesNow" (www.salesnow.com).

2. A Default.aspx at the root which redirects the user to "Pages/Main.aspx" using javascript window.location.

3. On the Pages/Main.aspx page a HyperLink control which I add a javascript onclick event which does the

following:
- NewLeadWin = window.open("NewLeads.aspx", "NewLeadWin", "width=700, height=500, location=no, top=20, left=20, menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=yes");
- NewLeadWin.window.focus();

Scenarios:
1. When the Default.aspx contains "window.location = '/Salesnow/Pages/Main.aspx'" the NewLeadWin works just fine, yet, the session state is not transferred. Trace must be run in both the root and /pages to get output.

2. When the Default.aspx contains "window.location = '/Pages/Main.aspx'" the NewLeadWin fails giving the familiar error regarding WEB.CONFIG: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.

Note: getting to Main.aspx is no problem, but the opening of the NewLeads.aspx is.

Question: I thought everything defined within and below the application folder (wwwroot in this case) was

considered part of the app. Why is this behavior so?

Nov 18 '05 #1
10 1777
It sounds like you're mixing up Session and Application state. Both pages
ARE in the same application. However, a single Application can contain many
Sessions, one per client browser.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Steve Taylor" <Re************@laborready.com> wrote in message
news:#Y**************@TK2MSFTNGP11.phx.gbl...
I am having trouble understanding the ASP.NET application boundaries.
Here's my setup:

1. Win2003 Server with IIS 6 and an application defined at the root
"SalesNow" (www.salesnow.com).

2. A Default.aspx at the root which redirects the user to "Pages/Main.aspx"
using javascript window.location.

3. On the Pages/Main.aspx page a HyperLink control which I add a javascript
onclick event which does the

following:
- NewLeadWin = window.open("NewLeads.aspx", "NewLeadWin", "width=700,
height=500, location=no, top=20, left=20, menubar=no, status=no, toolbar=no,
scrollbars=yes, resizable=yes");
- NewLeadWin.window.focus();

Scenarios:
1. When the Default.aspx contains "window.location =
'/Salesnow/Pages/Main.aspx'" the NewLeadWin works just fine, yet, the
session state is not transferred. Trace must be run in both the root and
/pages to get output.

2. When the Default.aspx contains "window.location = '/Pages/Main.aspx'"
the NewLeadWin fails giving the familiar error regarding WEB.CONFIG: It is
an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level.

Note: getting to Main.aspx is no problem, but the opening of the
NewLeads.aspx is.

Question: I thought everything defined within and below the application
folder (wwwroot in this case) was

considered part of the app. Why is this behavior so?
Nov 18 '05 #2
The error you are getting when accessing the Pages folder is because you included a web.config file in that folder that conatins application level definitions (forms authentication settings for example).
Everything defined within and below the application folder (wwwroot in this case) is considered part of the app but definitions such as the ones you put on the web.config in Pages require it to be a seperate ASP.NET application...
To solve the problem you need to define the Pages folder as an application in the IIS properties dialog.

Eran Kampf
http://www.ekampf.com

"Steve Taylor" <Re************@laborready.com> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl...
I am having trouble understanding the ASP.NET application boundaries. Here's my setup:

1. Win2003 Server with IIS 6 and an application defined at the root "SalesNow" (www.salesnow.com).

2. A Default.aspx at the root which redirects the user to "Pages/Main.aspx" using javascript window.location.

3. On the Pages/Main.aspx page a HyperLink control which I add a javascript onclick event which does the

following:
- NewLeadWin = window.open("NewLeads.aspx", "NewLeadWin", "width=700, height=500, location=no, top=20, left=20, menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=yes");
- NewLeadWin.window.focus();

Scenarios:
1. When the Default.aspx contains "window.location = '/Salesnow/Pages/Main.aspx'" the NewLeadWin works just fine, yet, the session state is not transferred. Trace must be run in both the root and /pages to get output.

2. When the Default.aspx contains "window.location = '/Pages/Main.aspx'" the NewLeadWin fails giving the familiar error regarding WEB.CONFIG: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.

Note: getting to Main.aspx is no problem, but the opening of the NewLeads.aspx is.

Question: I thought everything defined within and below the application folder (wwwroot in this case) was

considered part of the app. Why is this behavior so?

Nov 18 '05 #3
I wish it were that easy! As you can see, I am having trouble just
describing this strange behavior. What started me on this track was wanting
to initialize my session business object at the Defaut.aspx (one-time
gateway to the app). Here's how it works today:
- A user is linked to the Default.aspx from our intranet (classic asp) app
via a hyperlink (using window.open).
- The Global.asax Session_Start creates and stores the user's skeleton
business object into session state (ServerState).
- Then the Default.aspx simply validates where they were coming from (has to
be the intranet url) and transferrs them & their ID to pages/main.aspx.
- Then Main.aspx did the bus obj user validation and filled out the rest of
the object values.

This is all working nicely today, but I want to move the user validation
back to Default.aspx and then update the stored object in session, then
transfer them to Main.aspx. In each form, I instantiate the bus object (on
init) and do the work. The great thing about this is that I can detect when
their session times out (based on null values) on each Form Load event and
handle differently from other errors.

Simply moving the bus obj validation routine back into Default.aspx causes
the object to be missing those values upon getting to the Main.aspx page????
Sure the Default.aspx is in the apps root and Main.aspx is in a sub-folder
(pages), but why would that cause an issue with session state?

Steve

"Kevin Spencer" <ks******@takempis.com> wrote in message
news:eg**************@TK2MSFTNGP15.phx.gbl...
It sounds like you're mixing up Session and Application state. Both pages
ARE in the same application. However, a single Application can contain many Sessions, one per client browser.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Steve Taylor" <Re************@laborready.com> wrote in message
news:#Y**************@TK2MSFTNGP11.phx.gbl...
I am having trouble understanding the ASP.NET application boundaries.
Here's my setup:

1. Win2003 Server with IIS 6 and an application defined at the root
"SalesNow" (www.salesnow.com).

2. A Default.aspx at the root which redirects the user to "Pages/Main.aspx" using javascript window.location.

3. On the Pages/Main.aspx page a HyperLink control which I add a javascript onclick event which does the

following:
- NewLeadWin = window.open("NewLeads.aspx", "NewLeadWin", "width=700,
height=500, location=no, top=20, left=20, menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=yes");
- NewLeadWin.window.focus();

Scenarios:
1. When the Default.aspx contains "window.location =
'/Salesnow/Pages/Main.aspx'" the NewLeadWin works just fine, yet, the
session state is not transferred. Trace must be run in both the root and
/pages to get output.

2. When the Default.aspx contains "window.location = '/Pages/Main.aspx'"
the NewLeadWin fails giving the familiar error regarding WEB.CONFIG: It is
an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level.

Note: getting to Main.aspx is no problem, but the opening of the
NewLeads.aspx is.

Question: I thought everything defined within and below the application
folder (wwwroot in this case) was

considered part of the app. Why is this behavior so?

Nov 18 '05 #4
No, there is no other web.config file. Just the one at the root.
"Eran Kampf" <er**@ekampf.com> wrote in message news:O6**************@TK2MSFTNGP12.phx.gbl...
The error you are getting when accessing the Pages folder is because you included a web.config file in that folder that conatins application level definitions (forms authentication settings for example).
Everything defined within and below the application folder (wwwroot in this case) is considered part of the app but definitions such as the ones you put on the web.config in Pages require it to be a seperate ASP.NET application...
To solve the problem you need to define the Pages folder as an application in the IIS properties dialog.

Eran Kampf
http://www.ekampf.com

"Steve Taylor" <Re************@laborready.com> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl...
I am having trouble understanding the ASP.NET application boundaries. Here's my setup:

1. Win2003 Server with IIS 6 and an application defined at the root "SalesNow" (www.salesnow.com).

2. A Default.aspx at the root which redirects the user to "Pages/Main.aspx" using javascript window.location.

3. On the Pages/Main.aspx page a HyperLink control which I add a javascript onclick event which does the

following:
- NewLeadWin = window.open("NewLeads.aspx", "NewLeadWin", "width=700, height=500, location=no, top=20, left=20, menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=yes");
- NewLeadWin.window.focus();

Scenarios:
1. When the Default.aspx contains "window.location = '/Salesnow/Pages/Main.aspx'" the NewLeadWin works just fine, yet, the session state is not transferred. Trace must be run in both the root and /pages to get output.

2. When the Default.aspx contains "window.location = '/Pages/Main.aspx'" the NewLeadWin fails giving the familiar error regarding WEB.CONFIG: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.

Note: getting to Main.aspx is no problem, but the opening of the NewLeads.aspx is.

Question: I thought everything defined within and below the application folder (wwwroot in this case) was

considered part of the app. Why is this behavior so?

Nov 18 '05 #5
Hi Steve,

Are these multiple apps? In your /Pages folder do you have a Bin directory?
Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Steve Taylor" <Re************@laborready.com> wrote in message
news:OT*************@TK2MSFTNGP11.phx.gbl...
I wish it were that easy! As you can see, I am having trouble just
describing this strange behavior. What started me on this track was wanting to initialize my session business object at the Defaut.aspx (one-time
gateway to the app). Here's how it works today:
- A user is linked to the Default.aspx from our intranet (classic asp) app
via a hyperlink (using window.open).
- The Global.asax Session_Start creates and stores the user's skeleton
business object into session state (ServerState).
- Then the Default.aspx simply validates where they were coming from (has to be the intranet url) and transferrs them & their ID to pages/main.aspx.
- Then Main.aspx did the bus obj user validation and filled out the rest of the object values.

This is all working nicely today, but I want to move the user validation
back to Default.aspx and then update the stored object in session, then
transfer them to Main.aspx. In each form, I instantiate the bus object (on init) and do the work. The great thing about this is that I can detect when their session times out (based on null values) on each Form Load event and
handle differently from other errors.

Simply moving the bus obj validation routine back into Default.aspx causes
the object to be missing those values upon getting to the Main.aspx page???? Sure the Default.aspx is in the apps root and Main.aspx is in a sub-folder
(pages), but why would that cause an issue with session state?

Steve

"Kevin Spencer" <ks******@takempis.com> wrote in message
news:eg**************@TK2MSFTNGP15.phx.gbl...
It sounds like you're mixing up Session and Application state. Both pages ARE in the same application. However, a single Application can contain

many
Sessions, one per client browser.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Steve Taylor" <Re************@laborready.com> wrote in message
news:#Y**************@TK2MSFTNGP11.phx.gbl...
I am having trouble understanding the ASP.NET application boundaries.
Here's my setup:

1. Win2003 Server with IIS 6 and an application defined at the root
"SalesNow" (www.salesnow.com).

2. A Default.aspx at the root which redirects the user to

"Pages/Main.aspx"
using javascript window.location.

3. On the Pages/Main.aspx page a HyperLink control which I add a

javascript
onclick event which does the

following:
- NewLeadWin = window.open("NewLeads.aspx", "NewLeadWin", "width=700,
height=500, location=no, top=20, left=20, menubar=no, status=no,

toolbar=no,
scrollbars=yes, resizable=yes");
- NewLeadWin.window.focus();

Scenarios:
1. When the Default.aspx contains "window.location =
'/Salesnow/Pages/Main.aspx'" the NewLeadWin works just fine, yet, the
session state is not transferred. Trace must be run in both the root and /pages to get output.

2. When the Default.aspx contains "window.location = '/Pages/Main.aspx'" the NewLeadWin fails giving the familiar error regarding WEB.CONFIG: It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level.

Note: getting to Main.aspx is no problem, but the opening of the
NewLeads.aspx is.

Question: I thought everything defined within and below the application
folder (wwwroot in this case) was

considered part of the app. Why is this behavior so?


Nov 18 '05 #6
Hi Steve,

I'm somewhat confused, but I'll take a crack at helping as much as I can.

A web application is defined as a virtual root directory (a directory which
is configured in IIS as an Application), and all of the directories
underneath it which are NOT defined as applications. It sounds like your IIS
Application configuration is messed up. I would start by taking a look at
that.

Opening a browser window using JavaScript may or may not initiate a new
Session, depending upon the browser. I wouldn't count on it.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Steve Taylor" <Re************@laborready.com> wrote in message
news:OT*************@TK2MSFTNGP11.phx.gbl...
I wish it were that easy! As you can see, I am having trouble just
describing this strange behavior. What started me on this track was wanting to initialize my session business object at the Defaut.aspx (one-time
gateway to the app). Here's how it works today:
- A user is linked to the Default.aspx from our intranet (classic asp) app
via a hyperlink (using window.open).
- The Global.asax Session_Start creates and stores the user's skeleton
business object into session state (ServerState).
- Then the Default.aspx simply validates where they were coming from (has to be the intranet url) and transferrs them & their ID to pages/main.aspx.
- Then Main.aspx did the bus obj user validation and filled out the rest of the object values.

This is all working nicely today, but I want to move the user validation
back to Default.aspx and then update the stored object in session, then
transfer them to Main.aspx. In each form, I instantiate the bus object (on init) and do the work. The great thing about this is that I can detect when their session times out (based on null values) on each Form Load event and
handle differently from other errors.

Simply moving the bus obj validation routine back into Default.aspx causes
the object to be missing those values upon getting to the Main.aspx page???? Sure the Default.aspx is in the apps root and Main.aspx is in a sub-folder
(pages), but why would that cause an issue with session state?

Steve

"Kevin Spencer" <ks******@takempis.com> wrote in message
news:eg**************@TK2MSFTNGP15.phx.gbl...
It sounds like you're mixing up Session and Application state. Both pages ARE in the same application. However, a single Application can contain

many
Sessions, one per client browser.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Steve Taylor" <Re************@laborready.com> wrote in message
news:#Y**************@TK2MSFTNGP11.phx.gbl...
I am having trouble understanding the ASP.NET application boundaries.
Here's my setup:

1. Win2003 Server with IIS 6 and an application defined at the root
"SalesNow" (www.salesnow.com).

2. A Default.aspx at the root which redirects the user to

"Pages/Main.aspx"
using javascript window.location.

3. On the Pages/Main.aspx page a HyperLink control which I add a

javascript
onclick event which does the

following:
- NewLeadWin = window.open("NewLeads.aspx", "NewLeadWin", "width=700,
height=500, location=no, top=20, left=20, menubar=no, status=no,

toolbar=no,
scrollbars=yes, resizable=yes");
- NewLeadWin.window.focus();

Scenarios:
1. When the Default.aspx contains "window.location =
'/Salesnow/Pages/Main.aspx'" the NewLeadWin works just fine, yet, the
session state is not transferred. Trace must be run in both the root and /pages to get output.

2. When the Default.aspx contains "window.location = '/Pages/Main.aspx'" the NewLeadWin fails giving the familiar error regarding WEB.CONFIG: It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level.

Note: getting to Main.aspx is no problem, but the opening of the
NewLeads.aspx is.

Question: I thought everything defined within and below the application
folder (wwwroot in this case) was

considered part of the app. Why is this behavior so?


Nov 18 '05 #7
Thanks Ken.

No - not multiple apps. I have set up a web server and set its home
directory as w:\wwwroot\salesnow and configured the application name =
"Salesnow". That same directory is set up as a virtual directory with
identical values. Is that the problem, maybe I don't need the virtual
directory since the web server is dedicated to this site?

FYI: as a test, I set up a Win2K Web server identically (except that it
truely is a virtual web site) and it reacts as designed.

Let me know.
Thanks.
"Ken Dopierala Jr." <kd*********@wi.rr.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi Steve,

Are these multiple apps? In your /Pages folder do you have a Bin directory? Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Steve Taylor" <Re************@laborready.com> wrote in message
news:OT*************@TK2MSFTNGP11.phx.gbl...
I wish it were that easy! As you can see, I am having trouble just
describing this strange behavior. What started me on this track was wanting
to initialize my session business object at the Defaut.aspx (one-time
gateway to the app). Here's how it works today:
- A user is linked to the Default.aspx from our intranet (classic asp) app
via a hyperlink (using window.open).
- The Global.asax Session_Start creates and stores the user's skeleton
business object into session state (ServerState).
- Then the Default.aspx simply validates where they were coming from (has to
be the intranet url) and transferrs them & their ID to pages/main.aspx.
- Then Main.aspx did the bus obj user validation and filled out the rest of
the object values.

This is all working nicely today, but I want to move the user validation
back to Default.aspx and then update the stored object in session, then
transfer them to Main.aspx. In each form, I instantiate the bus object

(on
init) and do the work. The great thing about this is that I can detect

when
their session times out (based on null values) on each Form Load event

and handle differently from other errors.

Simply moving the bus obj validation routine back into Default.aspx causes the object to be missing those values upon getting to the Main.aspx

page????
Sure the Default.aspx is in the apps root and Main.aspx is in a sub-folder (pages), but why would that cause an issue with session state?

Steve

"Kevin Spencer" <ks******@takempis.com> wrote in message
news:eg**************@TK2MSFTNGP15.phx.gbl...
It sounds like you're mixing up Session and Application state. Both

pages ARE in the same application. However, a single Application can contain

many
Sessions, one per client browser.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Steve Taylor" <Re************@laborready.com> wrote in message
news:#Y**************@TK2MSFTNGP11.phx.gbl...
I am having trouble understanding the ASP.NET application boundaries.
Here's my setup:

1. Win2003 Server with IIS 6 and an application defined at the root
"SalesNow" (www.salesnow.com).

2. A Default.aspx at the root which redirects the user to

"Pages/Main.aspx"
using javascript window.location.

3. On the Pages/Main.aspx page a HyperLink control which I add a

javascript
onclick event which does the

following:
- NewLeadWin = window.open("NewLeads.aspx", "NewLeadWin", "width=700,
height=500, location=no, top=20, left=20, menubar=no, status=no,

toolbar=no,
scrollbars=yes, resizable=yes");
- NewLeadWin.window.focus();

Scenarios:
1. When the Default.aspx contains "window.location =
'/Salesnow/Pages/Main.aspx'" the NewLeadWin works just fine, yet, the
session state is not transferred. Trace must be run in both the root and /pages to get output.

2. When the Default.aspx contains "window.location = '/Pages/Main.aspx'" the NewLeadWin fails giving the familiar error regarding WEB.CONFIG: It is
an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level.

Note: getting to Main.aspx is no problem, but the opening of the
NewLeads.aspx is.

Question: I thought everything defined within and below the

application folder (wwwroot in this case) was

considered part of the app. Why is this behavior so?



Nov 18 '05 #8
Thanks Kevin,
I agree something is wrong and I'm really suspecting it is on the server
config. Please see my response to Ken for more details. Any ideas will be
much appreciated.
Steve

"Kevin Spencer" <ks******@takempis.com> wrote in message
news:u2**************@TK2MSFTNGP09.phx.gbl...
Hi Steve,

I'm somewhat confused, but I'll take a crack at helping as much as I can.

A web application is defined as a virtual root directory (a directory which is configured in IIS as an Application), and all of the directories
underneath it which are NOT defined as applications. It sounds like your IIS Application configuration is messed up. I would start by taking a look at
that.

Opening a browser window using JavaScript may or may not initiate a new
Session, depending upon the browser. I wouldn't count on it.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Steve Taylor" <Re************@laborready.com> wrote in message
news:OT*************@TK2MSFTNGP11.phx.gbl...
I wish it were that easy! As you can see, I am having trouble just
describing this strange behavior. What started me on this track was wanting
to initialize my session business object at the Defaut.aspx (one-time
gateway to the app). Here's how it works today:
- A user is linked to the Default.aspx from our intranet (classic asp) app
via a hyperlink (using window.open).
- The Global.asax Session_Start creates and stores the user's skeleton
business object into session state (ServerState).
- Then the Default.aspx simply validates where they were coming from (has to
be the intranet url) and transferrs them & their ID to pages/main.aspx.
- Then Main.aspx did the bus obj user validation and filled out the rest of
the object values.

This is all working nicely today, but I want to move the user validation
back to Default.aspx and then update the stored object in session, then
transfer them to Main.aspx. In each form, I instantiate the bus object

(on
init) and do the work. The great thing about this is that I can detect

when
their session times out (based on null values) on each Form Load event

and handle differently from other errors.

Simply moving the bus obj validation routine back into Default.aspx causes the object to be missing those values upon getting to the Main.aspx

page????
Sure the Default.aspx is in the apps root and Main.aspx is in a sub-folder (pages), but why would that cause an issue with session state?

Steve

"Kevin Spencer" <ks******@takempis.com> wrote in message
news:eg**************@TK2MSFTNGP15.phx.gbl...
It sounds like you're mixing up Session and Application state. Both

pages ARE in the same application. However, a single Application can contain

many
Sessions, one per client browser.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Steve Taylor" <Re************@laborready.com> wrote in message
news:#Y**************@TK2MSFTNGP11.phx.gbl...
I am having trouble understanding the ASP.NET application boundaries.
Here's my setup:

1. Win2003 Server with IIS 6 and an application defined at the root
"SalesNow" (www.salesnow.com).

2. A Default.aspx at the root which redirects the user to

"Pages/Main.aspx"
using javascript window.location.

3. On the Pages/Main.aspx page a HyperLink control which I add a

javascript
onclick event which does the

following:
- NewLeadWin = window.open("NewLeads.aspx", "NewLeadWin", "width=700,
height=500, location=no, top=20, left=20, menubar=no, status=no,

toolbar=no,
scrollbars=yes, resizable=yes");
- NewLeadWin.window.focus();

Scenarios:
1. When the Default.aspx contains "window.location =
'/Salesnow/Pages/Main.aspx'" the NewLeadWin works just fine, yet, the
session state is not transferred. Trace must be run in both the root and /pages to get output.

2. When the Default.aspx contains "window.location = '/Pages/Main.aspx'" the NewLeadWin fails giving the familiar error regarding WEB.CONFIG: It is
an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level.

Note: getting to Main.aspx is no problem, but the opening of the
NewLeads.aspx is.

Question: I thought everything defined within and below the

application folder (wwwroot in this case) was

considered part of the app. Why is this behavior so?



Nov 18 '05 #9
You say you "set up a web server and set its home directory as..." Then you
say "That same directory is set up as a virtual directory with identical
values." It sounds like you've got 2 applications pointing to the same
directory. The web server is IIS. I believe you mean you set up a web SITE.
Basically, you've set up 2 virtual directories and applications pointing to
the same directory. Remove the virtual directory you added, and it should be
fine.

The term "virtual directory" can be confusing. A virtual directory is
basically any directory that you map to in IIS. It can be under the default
(C:\Inetpub\wwwroot) web server directory, or it can reside elsewhere, and
be mapped as a virtual directory in IIS. So, in essence, you've created 2
virtual directories from one directory, and created 2 applications that
point to the same directory structure.

.... if I'm understanding you correctly.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Steve Taylor" <Re************@laborready.com> wrote in message
news:#3**************@tk2msftngp13.phx.gbl...
Thanks Ken.

No - not multiple apps. I have set up a web server and set its home
directory as w:\wwwroot\salesnow and configured the application name =
"Salesnow". That same directory is set up as a virtual directory with
identical values. Is that the problem, maybe I don't need the virtual
directory since the web server is dedicated to this site?

FYI: as a test, I set up a Win2K Web server identically (except that it
truely is a virtual web site) and it reacts as designed.

Let me know.
Thanks.
"Ken Dopierala Jr." <kd*********@wi.rr.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi Steve,

Are these multiple apps? In your /Pages folder do you have a Bin

directory?
Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Steve Taylor" <Re************@laborready.com> wrote in message
news:OT*************@TK2MSFTNGP11.phx.gbl...
I wish it were that easy! As you can see, I am having trouble just
describing this strange behavior. What started me on this track was

wanting
to initialize my session business object at the Defaut.aspx (one-time
gateway to the app). Here's how it works today:
- A user is linked to the Default.aspx from our intranet (classic asp) app via a hyperlink (using window.open).
- The Global.asax Session_Start creates and stores the user's skeleton
business object into session state (ServerState).
- Then the Default.aspx simply validates where they were coming from (has
to
be the intranet url) and transferrs them & their ID to pages/main.aspx. - Then Main.aspx did the bus obj user validation and filled out the rest
of
the object values.

This is all working nicely today, but I want to move the user
validation back to Default.aspx and then update the stored object in session, then transfer them to Main.aspx. In each form, I instantiate the bus object (on
init) and do the work. The great thing about this is that I can
detect when
their session times out (based on null values) on each Form Load event and handle differently from other errors.

Simply moving the bus obj validation routine back into Default.aspx causes the object to be missing those values upon getting to the Main.aspx

page????
Sure the Default.aspx is in the apps root and Main.aspx is in a sub-folder (pages), but why would that cause an issue with session state?

Steve

"Kevin Spencer" <ks******@takempis.com> wrote in message
news:eg**************@TK2MSFTNGP15.phx.gbl...
> It sounds like you're mixing up Session and Application state. Both

pages
> ARE in the same application. However, a single Application can
contain many
> Sessions, one per client browser.
>
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> I get paid good money to
> solve puzzles for a living
>
> "Steve Taylor" <Re************@laborready.com> wrote in message
> news:#Y**************@TK2MSFTNGP11.phx.gbl...
> I am having trouble understanding the ASP.NET application boundaries. > Here's my setup:
>
> 1. Win2003 Server with IIS 6 and an application defined at the root
> "SalesNow" (www.salesnow.com).
>
> 2. A Default.aspx at the root which redirects the user to
"Pages/Main.aspx"
> using javascript window.location.
>
> 3. On the Pages/Main.aspx page a HyperLink control which I add a
javascript
> onclick event which does the
>
> following:
> - NewLeadWin = window.open("NewLeads.aspx", "NewLeadWin", "width=700, > height=500, location=no, top=20, left=20, menubar=no, status=no,
toolbar=no,
> scrollbars=yes, resizable=yes");
> - NewLeadWin.window.focus();
>
> Scenarios:
> 1. When the Default.aspx contains "window.location =
> '/Salesnow/Pages/Main.aspx'" the NewLeadWin works just fine, yet, the > session state is not transferred. Trace must be run in both the

root and
> /pages to get output.
>
> 2. When the Default.aspx contains "window.location =

'/Pages/Main.aspx'"
> the NewLeadWin fails giving the familiar error regarding WEB.CONFIG:

It
is
> an error to use a section registered as
> allowDefinition='MachineToApplication' beyond application level.
>
> Note: getting to Main.aspx is no problem, but the opening of the
> NewLeads.aspx is.
>
> Question: I thought everything defined within and below the

application > folder (wwwroot in this case) was
>
> considered part of the app. Why is this behavior so?
>
>



Nov 18 '05 #10
You are absolutely right! That was the problem and thinking about how it
reacted makes sense in this context.

THANKS FOR ALL YOU DO!
"Kevin Spencer" <ks******@takempis.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
You say you "set up a web server and set its home directory as..." Then you say "That same directory is set up as a virtual directory with identical
values." It sounds like you've got 2 applications pointing to the same
directory. The web server is IIS. I believe you mean you set up a web SITE. Basically, you've set up 2 virtual directories and applications pointing to the same directory. Remove the virtual directory you added, and it should be fine.

The term "virtual directory" can be confusing. A virtual directory is
basically any directory that you map to in IIS. It can be under the default (C:\Inetpub\wwwroot) web server directory, or it can reside elsewhere, and
be mapped as a virtual directory in IIS. So, in essence, you've created 2
virtual directories from one directory, and created 2 applications that
point to the same directory structure.

... if I'm understanding you correctly.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Steve Taylor" <Re************@laborready.com> wrote in message
news:#3**************@tk2msftngp13.phx.gbl...
Thanks Ken.

No - not multiple apps. I have set up a web server and set its home
directory as w:\wwwroot\salesnow and configured the application name =
"Salesnow". That same directory is set up as a virtual directory with
identical values. Is that the problem, maybe I don't need the virtual
directory since the web server is dedicated to this site?

FYI: as a test, I set up a Win2K Web server identically (except that it
truely is a virtual web site) and it reacts as designed.

Let me know.
Thanks.
"Ken Dopierala Jr." <kd*********@wi.rr.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi Steve,

Are these multiple apps? In your /Pages folder do you have a Bin

directory?
Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Steve Taylor" <Re************@laborready.com> wrote in message
news:OT*************@TK2MSFTNGP11.phx.gbl...
> I wish it were that easy! As you can see, I am having trouble just
> describing this strange behavior. What started me on this track was
wanting
> to initialize my session business object at the Defaut.aspx (one-time > gateway to the app). Here's how it works today:
> - A user is linked to the Default.aspx from our intranet (classic asp)
app
> via a hyperlink (using window.open).
> - The Global.asax Session_Start creates and stores the user's
skeleton > business object into session state (ServerState).
> - Then the Default.aspx simply validates where they were coming from

(has
to
> be the intranet url) and transferrs them & their ID to pages/main.aspx. > - Then Main.aspx did the bus obj user validation and filled out the rest of
> the object values.
>
> This is all working nicely today, but I want to move the user validation > back to Default.aspx and then update the stored object in session, then > transfer them to Main.aspx. In each form, I instantiate the bus object (on
> init) and do the work. The great thing about this is that I can detect when
> their session times out (based on null values) on each Form Load event and
> handle differently from other errors.
>
> Simply moving the bus obj validation routine back into Default.aspx

causes
> the object to be missing those values upon getting to the Main.aspx
page????
> Sure the Default.aspx is in the apps root and Main.aspx is in a

sub-folder
> (pages), but why would that cause an issue with session state?
>
> Steve
>
> "Kevin Spencer" <ks******@takempis.com> wrote in message
> news:eg**************@TK2MSFTNGP15.phx.gbl...
> > It sounds like you're mixing up Session and Application state.
Both pages
> > ARE in the same application. However, a single Application can contain > many
> > Sessions, one per client browser.
> >
> > --
> > HTH,
> > Kevin Spencer
> > .Net Developer
> > Microsoft MVP
> > I get paid good money to
> > solve puzzles for a living
> >
> > "Steve Taylor" <Re************@laborready.com> wrote in message
> > news:#Y**************@TK2MSFTNGP11.phx.gbl...
> > I am having trouble understanding the ASP.NET application boundaries. > > Here's my setup:
> >
> > 1. Win2003 Server with IIS 6 and an application defined at the root > > "SalesNow" (www.salesnow.com).
> >
> > 2. A Default.aspx at the root which redirects the user to
> "Pages/Main.aspx"
> > using javascript window.location.
> >
> > 3. On the Pages/Main.aspx page a HyperLink control which I add a
> javascript
> > onclick event which does the
> >
> > following:
> > - NewLeadWin = window.open("NewLeads.aspx", "NewLeadWin", "width=700, > > height=500, location=no, top=20, left=20, menubar=no, status=no,
> toolbar=no,
> > scrollbars=yes, resizable=yes");
> > - NewLeadWin.window.focus();
> >
> > Scenarios:
> > 1. When the Default.aspx contains "window.location =
> > '/Salesnow/Pages/Main.aspx'" the NewLeadWin works just fine, yet, the > > session state is not transferred. Trace must be run in both the root and
> > /pages to get output.
> >
> > 2. When the Default.aspx contains "window.location =
'/Pages/Main.aspx'"
> > the NewLeadWin fails giving the familiar error regarding

WEB.CONFIG: It
is
> > an error to use a section registered as
> > allowDefinition='MachineToApplication' beyond application level.
> >
> > Note: getting to Main.aspx is no problem, but the opening of the
> > NewLeads.aspx is.
> >
> > Question: I thought everything defined within and below the

application
> > folder (wwwroot in this case) was
> >
> > considered part of the app. Why is this behavior so?
> >
> >
>
>



Nov 18 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: M?rten O | last post by:
Hello! I have a problem with managed C++ and the Application class I want to use Application::CommonAppDataPath but the only answer I get is "D:\Documents and Settings\All Users\Application...
3
by: Sushil Srivastava | last post by:
Hi Guys, Would you be able to help me using C# GUI (with user interface component) in my MFC application. I have used managed extension, COM-interops, etc but problem is this C# component has...
4
by: Keith Chadwick | last post by:
I am having some trouble referencing an Application("myVar") variable from within a module.vb file on my ASP.NET site. According to the documentation I should be able to reference...
5
by: z. f. | last post by:
Hi, I'm working on a web project and i create classes to do business logic and connect to DB. i also need a windows application to do the same functionality as defined in classes inside the...
1
by: Srini | last post by:
Hi, What is the best method to share the application defined errors in C# ASP.NET application. Basically I would like to have all the errors defined in one place and share those between modules...
3
by: xycos | last post by:
Hello. I apologize for asking this question as the information I need is availible via the MSDN library, however I cannot seemt o understand what I need to do, so I'm asking here. I have created...
1
by: Integra | last post by:
I have developed a VB application with Access running very well except some systems which doesnt installed VB. Created the setup with Innosetup. But its working in some systems eventhough vb not...
4
by: Dave | last post by:
I have a global.asax file with Application_Start defined and create some static data there and in another module used in the asp.net application and I realize that static data is shared amongst...
7
by: JFKJr | last post by:
Hi! I am a new beginner to MS Access VBA, I wrote the following VBA code in Access which deletes blank columns and rows in excel file. But, the code works fine for sometimes and sometimes it displays...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.