|
I have a popup date-picker in my asp.net application...
..trouble is, ie7 seems to abandon the session whenever the popup window is closed.
tried this in a couple of apps, with different popups. Seems to be a serious bug in ie7. Is it, or is it me...?
cheers
Fred
|
|
|
|
|
IIS/ASP.NET has cookless and cookie-based session state. If the session state is based on cookies and a pop-up appears, it is possible the session cookie is being altered by a 3rd party application (spam/virus). Web servers (e.g. IIS) usually control the duration of a session unless it is told to abandon the session on the server-side. IE7 does not control session duration.
Geo
|
|
|
|
|
Thanks - I know the theory, but I'm telling you it happens: on three different apps on two different servers, on closing a popup window session state is lost when using IE7.
I would be interested to know yours or anyone's experience (as opposed to theory) about this - are you using IE7, and have you encountered this too?
cheers
Fred
|
|
|
|
|
I use IE7. It has never happened to me but I don't allow those annoying pop ups.
|
|
|
|
|
OK, look I'm really sorry if I'm being dense here, but i don't hink so... And it's not just popups, but even pages openeed in a new tab or window (eg target="_blank")
Try this page in if you don't believe me:
http://www.psu-tests.co.uk/a.aspx
try it in IE7 and then in Firefox...
the complete code is shown below:
First page (a.aspx) sets a session variable Session("ok") = "abc"
first link opens a new window (b.aspx) and prints out the value of Session("ok")
close it, and then click second link which opens c.aspx in same tab, and this also (tries to) print out Sesion("ok") - but in IE7 it can't because it's been lost....
What is going on?
a.aspx
------
<%@ Page Language="vb" debug="true" %>
<script runat="server">
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Session("ok") = "abc"
End Sub
</script>
<HTML>
<HEAD>
<title></title>
</HEAD>
<body >
<form id="Form1" method="post" runat="server">
<a href="b.aspx" target="_blank">click me</a>
<br />then, after closing that window,
<a href="c.aspx">click me</a>
</form>
</body>
</HTML>
b.aspx
------
<%@ Page Language="vb" debug="true" %>
<script runat="server">
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Label1.Text = Session("ok")
End Sub
</script>
<HTML>
<HEAD>
<title></title>
</HEAD>
<body >
<form id="Form1" method="post" runat="server">
<input name="btn" type="button" value="Close me" onclick="self.close()" />
<br />
<asp:label runat="server" ID="Label1"></asp:label>
</form>
</body>
</HTML>
c.aspx
------
<%@ Page Language="vb" debug="true" %>
<script runat="server">
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Label1.Text = Session("ok")
End Sub
</script>
<HTML>
<HEAD>
<title></title>
</HEAD>
<body >
<form id="Form1" method="post" runat="server">
<a href="a.aspx">back</a>
<br />
<asp:label runat="server" ID="Label1"></asp:label>
</form>
</body>
</HTML>
|
|
|
|
|
Now it's working. Forget it, I'll just go shoot myself. I have no idea what's going on.
fred
|
|
|
|
|
I can't be 100% sure, but I'm pretty sure IE6 treats different windows as different independent sessions, whereas Firefox and Opera will combine sessions if you, say, have the same website open in different windows. In IE it's possible to have two windows both opened at amazon.com but be logged in as two different users.
Now if this is the case with IE6 it will probably the case with IE7, and right click opening a new window will probably start a new session. Dunno if this helps at all.
|
|
|
|
|
thanks - I've never had this problem with IE6, but am having to re-write all my popup date-pickers in order to cope with IE7 (at least, on those sites that rely on session-state.)
Possibly neater anyway, having them inline and using AJAX when necessary, but I could do without the extra work. I'm sure I can't be the only one experiencing such difficulties though, and I find it puzzling I haven't seen more about this elsewhere. There's nothing peculiar about my code - just a simple window.open js call....
ah well..
cheers
Fred
|
|
|
|
|
Just for the sake of my pride, I'd like to report that I am not totally mad or dumb.. turns out there must be a strange anomaly with my IE7 installation, 'cos the probblem (and solution) are as follows: I do indeed experience the issues mentioned, but only when I only have one tab, or one instance of IE open. When closing the popup (or second tab) I will lose the session state in the remaining window/tab. If I keep a "dummy" window/tab open (on any website, even "about blank") then there is no problem.
Very strange. Only occurs on my "main" computer. Not an issue on my laptop, nor, as far as I can tell, has anyone else experienced this...
Could have done without the wasted hours...
cheers
fred
|
|
|
|
|
How can i read a data file between two comments? For example, i want to read data between start and end. Here is the file..
File.txt:
abc
123
Start
This is the line i want to read
and output on the screen
end
***
output:
This is the line i want to read
and output on the screen
Thanks
|
|
|
|
|
My Login password Expires suddenly with out enforcing any password expiration policies..
if any one know the reason ..i'll be grateful if i recieved a solution..thanks in progress
Alya Galal
|
|
|
|
|
Are you talking about session timeout?
|
|
|
|
|
Ref# Lab 9: ADO.NET DataSets in InfoPath 2003 (MSDN)
I am encountering a troublesome exception:
An unhandled exception of type 'System.Web.HttpException' occurred in WebDev.WebHost.dll
Additional information: '/Service1.asmx?WSDL' is not a valid virtual path.
I am trying to connect to my web service using the data connection wizard of InfoPath. I am using the suggested http://localhost:1484/Service1.asmx?WSDL, but this causes the above exception
Please can someone help
Lynton Steyn
|
|
|
|
|
You have to create an IIS web site that uses that port, 1484. The default web site has the defaut port of 80, http://localhost:80/.
|
|
|
|
|
There are 3 rows in a table. The columns of the last row are filled with alphabets. I should be able to drag any alphabet (from the last row) and drop in in any of the first 2 rows. Undoing of this move should be possible. Can anybody help me out?
|
|
|
|
|
Someone may be able to provide assistance if you give some context in which you are speaking. For example drag "alphabet" from last row and drop it in any of the first 2 rows. Where are these rows and from where are you dragging and dropping?
|
|
|
|
|
HI all!
I hope someone can point me in the right direction. Here is my delima.
Our company wants two locations to share data. The data will be stored on our web server. The program that needs to access this data will be on the local computers and needs to pointed to a lettered drive. I have a webfolder setup in "My Network Places" but cannot map the drive. Is there a good way to work around this?
Any help will be very much appreciated!
Jude
|
|
|
|
|
You have to create a network share, Network Sharing and Security, (not a "web share") on the server that hosts your web server. Also, you have to set up the proper security access.
|
|
|
|
|
OK..I've done that. How do I map it?
EX: When I go to map network drive, you get a chance to input the info. I put in "http://"our IP/the web folder/ the shared folder, but get a "Can not be found" error.
Jude
|
|
|
|
|
You can't use http:// to map a drive. You have to specify it in the format as \\ipaddress\shareName
I hope you're security is setup tight and the machine is patched up as current as 1 minute ago because you're doing something that is VERY dangerous over the Internet out in the open.
Depending on how sensitive the data is, you'd probably be better served by setting up a VPN between the two networks.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Jude,
I am sorry! I was called away before completing my answer. Dave is right! If you share data via the internet this way, you are exposing your web server to security breaches. As Dave said, VPN will serve you better.
|
|
|
|
|
Thanx for all the input. I setup a VPN on the server, but cannot connect. Here is what I choose step by step:
Remote Access
VPN
The network card that is connected to the router-->Modem
From a selected range (192.168.1.220-222)(way outside of dhcp request)
Use routing and remote access
Then I get this message:
To support the relaying of DHCP messages from remote access clients,you must configure the proerties of the DHCP Relay Agent with the ip addressof you DHCP server.
I inputed the ip address of our dhcp server.
Then I created a VPN connection on the client, but it will not connect (Error 800)??
I know this is asking alot, and I am all but googled out. Please help me o great ones...
Jude
|
|
|
|
|
I am a programmer with a little networking knowledge (enough to get by). You probably get a useful response from a non-programming discussion board.
|
|
|
|
|
All help is greatly apporeciated..I am in the same boat as you...
Jude
|
|
|
|
|
I'm trying to do some form validation that involves looping through all elements in a form. It works perfectly in FireFox, but totally chokes in IE7. It seems to be that the $Form.elements.length value is not returning a number.
I've written a little test function to simulate the error.
<br />
function validateForm()<br />
{<br />
alert(document.forms.length);<br />
var numElements = document.forms[0].elements.length;<br />
alert(numElements);<br />
}<br />
First alert shows: 1
Second alert shows: [object]
Anyone seen this happen before?
Thanks a lot.
|
|
|
|