Share And Connect To Browser Session Of Any Of Current Users
Apr 7, 2010
In my website I am maintaining log of users in which I am storing some user's information such as user machine IP umber,SessionId,UserName etc.and able to show the list of current and past users in webpage. I want to share and connect to browser session of any of the current users. Is it possible,if yes then how?
View 5 Replies
Similar Messages:
Feb 4, 2011
Is there room for issue in the following code in terms of multiple users of the same web application? I mean, I know that a purely static string will be shared across all sessions for a single ASP.NET application, but since this explicitly refers to the Current.Session, even though it is static it seems like it would always refer to the session instance of the "current user." But an error is happening that could be explained by everyone sharing the current value of Mode and thus the most recent change overwriting everyone else's mode value. (As a background: This string is in a Helpers class that is used throughout the application. I do not want to make references to Session["Mode"] throughout the application and do not want to have to pass Session["Mode"] in every method call from an aspx.cs page.)
public static string Mode
{
get
{
var value = HttpContext.Current.Session["Mode"];
return (value ?? string.Empty).ToString();
}
set
{
HttpContext.Current.Session["Mode"] = value;
}
}
View 2 Replies
Mar 14, 2010
I want to ensure a user isn't editing the same form data in two different browser tabs or windows (of the same web browser instance). The intention is to stop the user from accidentally overwriting their own data as they continue through a very long form process. On the server, ongoing data input through the screens is collected into the Session.
Assume for any browser, all tabs and windows run in the same instance of it (i.e. not each in a separate process). Obviously the browser tabs and windows share the same cookies in this scenario so cookie modification seems out of the question for viable solutions. This is also the reason they are sharing the same session state.
Considering that the form is already created and this is one of the final touches, how can I use ASP.NET, hopefully easily, to oversee this "feature"?
View 5 Replies
Mar 25, 2011
I need to stop users users using the browser back button and potentially submitting an old version of a form.
I'm storing a guid in a session variable and also writing the value to a hidden form field and then checking the session value against the hidden field value if a user does try to navigate back and submit an old form.
If the form is submitted and the user wants to complete a new copy of the form then a new guid is generated both to the session and to the hidden form field. Now, if the user decides to hit the back button a few times to get the old form and tries to submit it again, the page checks the current guid in session against the guid stored in the form field and it finds a mismatch and prevents the form being submitted.
This works as expected in Chrome and Firefox, but in IE6, when the user hits the back button to view the old form, the new guid value appears in the hidden field of the old form! This means the user can submit the old form again, which we definitely do not want.
View 3 Replies
Mar 6, 2011
I've used the table at the top of this article as a reference. I have three questions:
1 - Can multiple users (from different physical locations) ever share an HttpApplication instance? If so, does this happen by default?
2 - Can multiple users (from different physical locations) ever share an HttpApplicationState instance? If so, does this happen by default?
3 - Can multiple users of an ASP.NET application ever share a singleton instance or a static variable value? If so, does this happen by default?
View 2 Replies
Feb 11, 2010
I just created a component management system.. I would like to share files and folders among users from a database. Actually i couldn't do that.
View 1 Replies
May 27, 2010
Im using asp.net website with WCF service, having wsHttpBinding,Aspnet compatibility enabled, specified as Sessionmode -allowed, service behavior- isinitiated and client session cookie enabled. Its looking like Asp.Net session object and WCF Session( HTTPContext.Current.Session) work independently. How can I share Asp.net Session value to WCF Session and vise versa.
View 3 Replies
Mar 29, 2011
I have created two websites ,such as [URL] and [URL]; The two websites both use SQL Sever Session Mode and they use the same database for sessionstate management.
in [URL],I have a controller as below:
public class HomeController : Controller
{
public ActionResult Index()
{
ViewBag.Message = "Welcome to A Site!";
Session["User"] = 123;
return View();
}
}
[URL] I have a controller as below:
public class HomeController : Controller
{
public ActionResult Index()
{
if (Session["User"] != null)
{
ViewBag.Message = "Welcome to B Site!" + Session["User"].ToString();
return View();
}
else
{
ViewBag.Message = "Welcome to B Site!" ;
return View();
}
}
}
if I access [URL] first ,then access [URL], I will get the response :Welcome to B Site!123 if I access [URL] first,then access [URL] then access [URL],I will get the response:Welcome to B Site.
View 4 Replies
Mar 16, 2010
I have two WCF services configured with ASP.NET compatible mode to allow them to use ASP.NET session state. The problem is as follows:
1.- A call to the first service stores a value in the ASP.NET session state.
2.- A second call to the first service can read that value.
3.- A call to the second service can't read the ASP.NET session state value.
It seems that the ASP.NET session state is not shared between the two WCF services. Is there a way to share ASP.NET Session state between two WCF Services?
View 2 Replies
Jan 20, 2011
We are migrating an ASP Classic website over to ASP.Net. One of the big hurdles is the large amount of data stored in SessionState by the ASP Classic website.
I am looking for ways that session state can be shared between the two applications. I found the following link from microsoft MSDN that describes how to share session with a shared database. Unfortunately it uses the binary formatter to serialize into the database and I have recently had some bad experiences with said binary serialization.
how to share session state? or alternatives to the binary serialization?
View 3 Replies
Apr 27, 2010
I am using cookieless session manangement in ASP.NET 1.1. When the session is active and the user uses the same url in a new browser window or a new browser in different machine. since the session is active the url will validate itself. When user open new window with same session, i want show some custom meesage.
View 8 Replies
Apr 15, 2010
Share session using server
View 3 Replies
Aug 9, 2010
I have two exactly the same web sites hosted in two different machines under IIS 7.5.
ASP.NET state service is running on my machine and the web.config is updated in both sites with the following code:
<sessionState mode="StateServer" stateConnectionString="tcpip=192.168.1.77:42424" cookieless="false" timeout="120"/>
The allow remote connection is set to 1 in registry in order for the second web site to access the state server.Both web sites have the same machine key:
<machineKey validationKey="7CB8DF6872FB6B35DECD3A8F55582350FEE1FAB9BE6B930216056C1B5BA69A4C5777B3125A42C4AECB4419D43EC12F168FD1BB887469798093C3CAA2427B2B89"[code]....
Additionally both sites are configured in IIS to have the same Identifier.What I want to do is that both these sites share the same session data for example being able to do the following:
// At web site 1:
Session["key"] = "value"[code]....
The problem is that I can't manage to accomplish this test and really can't understand what I am doing wrong.
View 2 Replies
Jul 17, 2015
i am working on add to basket pagei have three browser in my pc when i use chrome browser and Add Prodcut into basket with session .
then how it will show on every browser untill session expire.?
View 1 Replies
Mar 5, 2013
I have a problem with all multiple tab browsers due to session object. I have a requirement that whenever user opens a new browser I need to show different values, so I thought of using Session as in IE 6 every browser creates a new session. But all other multiple tab browsers IE 8 and FF shares the session(If user has already open the browser and try to open different browser). How can I create new session whenever user opens a new browser window. My application is basically in ASP.NET and server side we have C#.
View 1 Replies
Oct 29, 2010
Im looking to create a web application using ASP.NET MVC or PHP (not decided yet!) and I want to use the local ActiveDirectory to register users.Can anyone point out how to do this on PHP or ASP.NET?answers on any of the technologies
View 1 Replies
Mar 12, 2010
I have a bunch of EC2 servers that are load balanced. Some of the servers are not sharing session, and users keep getting logged in and out. How can I make all the server share the one session, possibly even using a partitionresolver solution
public class PartitionResolver : System.Web.IPartitionResolver
{
private String[] partitions;
public void Initialize()
{
// create the partition connection string table
// web1, web2
partitions = new String[] { "192.168.1.1" };
}
public String ResolvePartition(Object key)
{
String oHost = System.Web.HttpContext.Current.Request.Url.Host.ToLower().Trim();
if (oHost.StartsWith("10.0.0") || oHost.Equals("localhost"))
return "tcpip=127.0.0.1:42424";
String sid = (String)key;
// hash the incoming session ID into
// one of the available partitions
Int32 partitionID = Math.Abs(sid.GetHashCode()) % partitions.Length;
return ("tcpip=" + partitions[partitionID] + ":42424");
}
}
View 1 Replies
Jul 27, 2010
I have 2 different Virtual Directories on my local IIS 7.0 server. I want to do session Management in such a way that Session variable created in one Virtual Directory is easily available in another Virtual Directory. I want to achieve this using SQL Server 2005. Till now I have done the following things
1) In my web.config file I have added the following entry
<sessionState mode="SQLServer" sqlConnectionString="Data Source=11.11.11.11;Integrated Security=False;User ID=uid;pwd=pwd" sqlCommandTimeout="30" >
</sessionState>
2) In SQL Server I have a database called ASPState that has 2 tables ASPStateTempApplications and ASPStateTempSessions and also some Store Procedures
Now If I create Session variable called Session["ProductID"] in Virtual directory A how can I access Session["ProductID"] in Virtual directory B.
View 5 Replies
Mar 9, 2010
I have hosted my web forms files and reports files two different IIS instance in same server. When user login i keep username inside session variable. According to that session variable i checking roles each web forms page load event. i share session variable between two difereent IIS instance in same server?
View 1 Replies
Jul 20, 2010
I'm having trouble getting 2 identical ASP.NET MVC applications to share the same Session using a Session StateServer. The reason I'm trying to do this is we will eventually be deploying this app across 3 web servers that need to share the same state. We need to use StateServer because we are trying to minimise use of the db for non data-related storage.
The Setup: I've deployed the same code base to http://localhost/App1 and http://localhost/App2
both have identical Web.Config files with the following:
<system.web>
<sessionState mode="StateServer"
cookieless="false" [code]....
The Result:For both deployments, when the page first loads I can see that the mode is StateServer and the timestamp is getting set to the same time as the realtime value.. However, if this was working, only the first page should have the same time as the realtime value. The second page load should read from the StateServer because that timestamp value is no longer null, and display that time value. But instead, it's displaying the realtime value again.
When I refresh the page, I the timestamp stays the same and the realtime value is always updating. This indicates that the timestamp is being saved to the Session, but the time stamp value is always different for both deployments when it should be the same, so this indicates that the Session is not being shared.
View 4 Replies
Mar 10, 2011
I have hosted an application on my local system and people on company intranet will be accessing that. I have windowxp SP3. I have heard from someone that only a limited no. of users( around 20) can access my application if I am hosting it on XP.
View 4 Replies
Jul 15, 2010
I have a website live in asp.net
now if user closes browser. the session does not get killed.
I spoke with friend and he said that cannot be done as sessions are on server.
but i see banking website who kills session when browser is closed.
View 10 Replies
Aug 5, 2010
I have been spending a better part of a week trying to track down why I am not able to clear all session variables in a web app (vs 2010, vb.net). What I have tracked it down to is that when I remove or abandon sessions that my html pages or codebehind access, it works, but for some reason in any of my class files where I use "Public Shared strConnection as String = HttpContext.Current.Session("strConnection").ToString" to access a session variable, it finds the old one and not the current one. I have to wait for it to time out, go in again, and it will find the new one.
I do not use Linq, and there is only one place in the whole web app that I place the connection string in a variable whcih is when a person logs in. It points them to the correct database. The sqlconnection is set for all of my listviews in Page_Init to make sure that they aren't using any session variable that they create on their own. Interestingly enough that if I use debug to go in each time, exit debug, enter debug again trying to access a different database, it works correct each time. I assume that debug is correctly killing the session variable for the classes for me.
View 4 Replies
May 20, 2010
I would like to check if someone tries to access the application with the same username from a different browser/pc/etc. All usernames and passwords are stored in a MSSQL db.
What I am doing at the moment is: In the global.asax-file in Application_start(..) I initialize [Code]....
Now with every user that logs in I can check whether he is allready in ( in that case, he won't be able to log in, he'll be redirected to the login page ). Let's say it's the same user who wants to login but for some reason he wants to start the application from a different pc, maybe in a different building. Unless he hasn't forget to logout, he won't be able to login on this different computer. So he would has to go back and logout or wait for the timeout.
Now wouldn't it be more convenient to abandon the first session and let the same user login to the pc where he is right now?
The question is, is it possible to end the first session without beeing in it? Or is there any other solution for that problem? Since I have the SessionID stored in Application["UserList"] is there any possibility to end that specific session?
View 3 Replies
Jun 22, 2010
how to see the current URL from browser?
Is the user coming to my page directly via www.mypage.com/myapp or through apps.facebook.com/myapp
View 2 Replies