Re: ASP.NET Application - Defined???
From: Steve Taylor (Remove_staylor_at_laborready.com)
Date: 11/01/04
- Next message: Rahul Agarwal: "HTTP Header to cache .xml & .xsl files"
- Previous message: Clamps: "Re: Development Server for Dummies"
- In reply to: Kevin Spencer: "Re: ASP.NET Application - Defined???"
- Next in thread: Ken Dopierala Jr.: "Re: ASP.NET Application - Defined???"
- Reply: Ken Dopierala Jr.: "Re: ASP.NET Application - Defined???"
- Reply: Kevin Spencer: "Re: ASP.NET Application - Defined???"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 1 Nov 2004 14:17:06 -0800
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" <kspencer@takempis.com> wrote in message
news:egK6gvFwEHA.3292@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" <Remove_staylor@laborready.com> wrote in message
> news:#Yy50hFwEHA.1400@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?
>
>
- Next message: Rahul Agarwal: "HTTP Header to cache .xml & .xsl files"
- Previous message: Clamps: "Re: Development Server for Dummies"
- In reply to: Kevin Spencer: "Re: ASP.NET Application - Defined???"
- Next in thread: Ken Dopierala Jr.: "Re: ASP.NET Application - Defined???"
- Reply: Ken Dopierala Jr.: "Re: ASP.NET Application - Defined???"
- Reply: Kevin Spencer: "Re: ASP.NET Application - Defined???"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|