I have a set of pages with C# code attached to manage session information.
They hang their info off of the session string and store it in a MSDE table.
I have all of this code working well in one app and started another app which
needed much of the same functionality. So I copied the pages, code behinds,
web.config and appropriate DB tables to the new app (all on localhost) and
find that I am get redirected every time I login back to my login because
..IsNewSession always comes up true on the page after the login.
Just in case I messed something up, I went back and checked my old pages and
found that they were behaving fine. I double checked that the login was happy
and creating the DB information, and it is. Asp.Net / IIS seems to just be
creating a new session for every page I load in this second app.
I am hoping that someone has a couple of pointers to save me having to take
this app apart. I'm figuring I missed a setting somewhere, and I am pretty
new at Asp.Net (I had been doing CGI and / or PHP up til 2004).
TIA for any input!
Robb Sadler 1 1442
OK, I have found a clue... I decided to try and add some info into the
session data itself and so put in the line:
System.Web.Http Context.Current .Session.Add("z ot", "zot");
to add some information to the session when I first came upon it. I don't
know why in my previous app I did not need to do this but in the current one
it now returns with the same session when going to a new page (or refreshing
the same one, etc).
Is the session class assuming that I didn't use it since it's data had
nothing added to it?
At this point I have enough info to continue, but would love to get any
comments.
Thanks!
Robb
"MrGiga (Robb Sadler)" wrote: I have a set of pages with C# code attached to manage session information. They hang their info off of the session string and store it in a MSDE table. I have all of this code working well in one app and started another app which needed much of the same functionality. So I copied the pages, code behinds, web.config and appropriate DB tables to the new app (all on localhost) and find that I am get redirected every time I login back to my login because .IsNewSession always comes up true on the page after the login.
Just in case I messed something up, I went back and checked my old pages and found that they were behaving fine. I double checked that the login was happy and creating the DB information, and it is. Asp.Net / IIS seems to just be creating a new session for every page I load in this second app.
I am hoping that someone has a couple of pointers to save me having to take this app apart. I'm figuring I missed a setting somewhere, and I am pretty new at Asp.Net (I had been doing CGI and / or PHP up til 2004).
TIA for any input!
Robb Sadler This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: mrbog |
last post by:
Tell me if my assertion is wrong here:
The only way to prevent session hijacking is to NEVER store
authentication information (such as name/password) in the session.
Well, to never authenticate a user from information you got from the
session. Each secure app on a site must challenge the user for name
and password, each and every time the user accesses it (not just once
and then store it in the session). If a secure app is multi-page,...
|
by: Bob Bedford |
last post by:
In the attempt to keep the URL and code quite clean, and avoid to have a
very loooong url, we have used $_session for storing values trough the
pages.
Now, we have some clients that doesn't get any result when going on the
second page. After studying their browser, the confidentiality setting was
at the maximum. On their settings, the site doesn't work well.
Since we can't change the setting for every client, what may we do ?
|
by: Werner |
last post by:
Hi Patrick!
Can you give an example of how to use a frameset inside an aspx-file?
When I create a new frameset in Visual Studio.Net it just gives me a htm-File.
Or give me a link where I can find one?
Thanks
Werner
P.S. Somehow I did not manage to do a followup in Googles newsgroups.
|
by: Adil Akram |
last post by:
I have created a site shopping cart in ASP.net.
I am using ASP session object's SessionID on non SSL connection to track
session.
While adding products to cart DB I insert product and SessionID in table.
All products and cart status pages are on non SSL connection.
On checkout to get secure user information I shifted connection to SSL but
when shifting to SSL, the SessionID changed (As is this is default behavior
of IIS to prevent...
|
by: Wiktor Zychla |
last post by:
Hello there,
I've just encountered a strange problem with Session. In one particular
scenario it is cleared between pages but the scenario is so specific that I
am really, really startled. I've tried to look for similar situations in the
group archive and it seems that few people have observed similar behaviour.
None of them, however, got a clear explanation that would correspond to my
problem.
In my web application I put some...
| |
by: George |
last post by:
Hi, Is it possible to delay session creation in ASP.NET
I want the user to browse my site without any session created (no cookies set). My pages will know that is Session = null then Session has not been created and they should not rely on it.
But at the moment user puts something into shopping cart i want to trigger session creation (set the cookies) and from no own that user will have regular session.
Is it doable with .NET Session or...
|
by: Bill |
last post by:
I've noticed that in my ASP application that session variables are not carried over from
one IE6 open browser window to another.
Can anyone tell me how IE can do this? It seems like it's a useful protection mechanism
that I can add to my application.
BTW, I'm looking for a way to determine if someone is moving cookies between computers.
How IE and/or ASP handles sessions might give me some insights (and I'm open to
suggestions as to...
|
by: TRB_NV |
last post by:
I'm losing information from my Session when I change pages or start the same
page over again. I simplified the code so the example is really clear. The
sample code that follows is supposed to generate a random number and put it
into an Array and store it in the Session variable and then when it runs the
next time, generate another random number and display the entire Array
contents, by pulling the information out of the Session. I'd...
|
by: Gordon Burditt |
last post by:
I had this idea about preventing session fixation, and I'm wondering
what anyone else thinks about it. The idea is, essentially, don't
allow session ids that YOUR PHP didn't generate (and aren't yet
expired) to log in. That way if someone sticks a made-up session
ID on a URL, it won't matter, unless it happens to correspond to
an active session (guessing a user password is probably easier).
Is this already standard practice, new, or is...
|
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...
|
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,...
| |
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |