473,837 Members | 1,587 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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("Ne wLeads.aspx", "NewLeadWin ", "width=700, height=500, location=no, top=20, left=20, menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=yes") ;
- NewLeadWin.wind ow.focus();

Scenarios:
1. When the Default.aspx contains "window.locatio n = '/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.locatio n = '/Pages/Main.aspx'" the NewLeadWin fails giving the familiar error regarding WEB.CONFIG: It is an error to use a section registered as allowDefinition ='MachineToAppl ication' 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 1821
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******** ******@TK2MSFTN GP11.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("Ne wLeads.aspx", "NewLeadWin ", "width=700,
height=500, location=no, top=20, left=20, menubar=no, status=no, toolbar=no,
scrollbars=yes, resizable=yes") ;
- NewLeadWin.wind ow.focus();

Scenarios:
1. When the Default.aspx contains "window.locatio n =
'/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.locatio n = '/Pages/Main.aspx'"
the NewLeadWin fails giving the familiar error regarding WEB.CONFIG: It is
an error to use a section registered as
allowDefinition ='MachineToAppl ication' 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******** ********@TK2MSF TNGP11.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("Ne wLeads.aspx", "NewLeadWin ", "width=700, height=500, location=no, top=20, left=20, menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=yes") ;
- NewLeadWin.wind ow.focus();

Scenarios:
1. When the Default.aspx contains "window.locatio n = '/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.locatio n = '/Pages/Main.aspx'" the NewLeadWin fails giving the familiar error regarding WEB.CONFIG: It is an error to use a section registered as allowDefinition ='MachineToAppl ication' 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******@takem pis.com> wrote in message
news:eg******** ******@TK2MSFTN GP15.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******** ******@TK2MSFTN GP11.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("Ne wLeads.aspx", "NewLeadWin ", "width=700,
height=500, location=no, top=20, left=20, menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=yes") ;
- NewLeadWin.wind ow.focus();

Scenarios:
1. When the Default.aspx contains "window.locatio n =
'/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.locatio n = '/Pages/Main.aspx'"
the NewLeadWin fails giving the familiar error regarding WEB.CONFIG: It is
an error to use a section registered as
allowDefinition ='MachineToAppl ication' 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.co m> wrote in message news:O6******** ******@TK2MSFTN GP12.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******** ********@TK2MSF TNGP11.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("Ne wLeads.aspx", "NewLeadWin ", "width=700, height=500, location=no, top=20, left=20, menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=yes") ;
- NewLeadWin.wind ow.focus();

Scenarios:
1. When the Default.aspx contains "window.locatio n = '/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.locatio n = '/Pages/Main.aspx'" the NewLeadWin fails giving the familiar error regarding WEB.CONFIG: It is an error to use a section registered as allowDefinition ='MachineToAppl ication' 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******** *****@TK2MSFTNG P11.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******@takem pis.com> wrote in message
news:eg******** ******@TK2MSFTN GP15.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******** ******@TK2MSFTN GP11.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("Ne wLeads.aspx", "NewLeadWin ", "width=700,
height=500, location=no, top=20, left=20, menubar=no, status=no,

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

Scenarios:
1. When the Default.aspx contains "window.locatio n =
'/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.locatio n = '/Pages/Main.aspx'" the NewLeadWin fails giving the familiar error regarding WEB.CONFIG: It is an error to use a section registered as
allowDefinition ='MachineToAppl ication' 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******** *****@TK2MSFTNG P11.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******@takem pis.com> wrote in message
news:eg******** ******@TK2MSFTN GP15.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******** ******@TK2MSFTN GP11.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("Ne wLeads.aspx", "NewLeadWin ", "width=700,
height=500, location=no, top=20, left=20, menubar=no, status=no,

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

Scenarios:
1. When the Default.aspx contains "window.locatio n =
'/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.locatio n = '/Pages/Main.aspx'" the NewLeadWin fails giving the familiar error regarding WEB.CONFIG: It is an error to use a section registered as
allowDefinition ='MachineToAppl ication' 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\sale snow 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******** ********@TK2MSF TNGP10.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******** *****@TK2MSFTNG P11.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******@takem pis.com> wrote in message
news:eg******** ******@TK2MSFTN GP15.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******** ******@TK2MSFTN GP11.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("Ne wLeads.aspx", "NewLeadWin ", "width=700,
height=500, location=no, top=20, left=20, menubar=no, status=no,

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

Scenarios:
1. When the Default.aspx contains "window.locatio n =
'/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.locatio n = '/Pages/Main.aspx'" the NewLeadWin fails giving the familiar error regarding WEB.CONFIG: It is
an error to use a section registered as
allowDefinition ='MachineToAppl ication' 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******@takem pis.com> wrote in message
news:u2******** ******@TK2MSFTN GP09.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******** *****@TK2MSFTNG P11.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******@takem pis.com> wrote in message
news:eg******** ******@TK2MSFTN GP15.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******** ******@TK2MSFTN GP11.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("Ne wLeads.aspx", "NewLeadWin ", "width=700,
height=500, location=no, top=20, left=20, menubar=no, status=no,

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

Scenarios:
1. When the Default.aspx contains "window.locatio n =
'/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.locatio n = '/Pages/Main.aspx'" the NewLeadWin fails giving the familiar error regarding WEB.CONFIG: It is
an error to use a section registered as
allowDefinition ='MachineToAppl ication' 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\www root) 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******** ******@tk2msftn gp13.phx.gbl...
Thanks Ken.

No - not multiple apps. I have set up a web server and set its home
directory as w:\wwwroot\sale snow 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******** ********@TK2MSF TNGP10.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******** *****@TK2MSFTNG P11.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******@takem pis.com> wrote in message
news:eg******** ******@TK2MSFTN GP15.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******** ******@TK2MSFTN GP11.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("Ne wLeads.aspx", "NewLeadWin ", "width=700, > height=500, location=no, top=20, left=20, menubar=no, status=no,
toolbar=no,
> scrollbars=yes, resizable=yes") ;
> - NewLeadWin.wind ow.focus();
>
> Scenarios:
> 1. When the Default.aspx contains "window.locatio n =
> '/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.locatio n =

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

It
is
> an error to use a section registered as
> allowDefinition ='MachineToAppl ication' 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

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

Similar topics

4
1228
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 Data\\\1.0.0.0" I have tried changed the items (alredy present) in assemblyinfo.cpp but that doesn't have any effect.
3
9842
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 user interface. how should have get window handle from managed windows? Thanks in advance. Sushil
4
1665
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 System.Web.HttpApplication but it does not seem to like that one bit. I also have a MSXML2.DOMDocument30 defined as a public object within the vb module which is loaded during the application start up with a bunch of XML. What is weird is that the data contained...
5
1580
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 ASP.NET project. when i reference the web project DLL (inside the BIN directory) I successfully make a call to a function and get return value. but this is just a test and when trying to access the application
1
1080
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 of the application. In C++ I can define all the errors in a header file and include it in the CPP files and use those defined errors. In .Net is there something similar to that? or Do I have to create an assembly for all shared data and use that...
3
4798
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 application settings in Visual Studio (right-click on the project, go to the settings tab, etc.) and have associated each of these settings with a property on a form. This seems to be working right (i.e. if I edit the default value of a setting,...
1
2988
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 installed. When I am taking reports project get terminated with the error application defined or data defined error. I couldnt understand wat is the reason behind this. Back end of the project is Access. Can any one help?
4
4533
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 child apps of an IIS application and can be used by multiple users during the application life cycle and for multiple page loads for the same or different page under a root application. What I don't understand and need to know is whether that...
7
13473
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 "application defined or object defined error". And, when I step into the code, error is occuring at the following Bold line. Please help me with this problem. Thank you in advance. Sub RunMacro() On Error GoTo Err_RunMacro Dim XL As Object...
0
9851
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
10902
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10583
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10642
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7013
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5680
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4481
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4060
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.