State Management :: Share Session Between 2 Virtual Directories

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


Similar Messages:

State Management :: Share Data Between Virtual Directory?

Jun 21, 2010

How to share data between two virtual directory without using Querystring?

View 6 Replies

State Management :: Different Browsers Share Same Session ID?

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

State Management :: Share Session Using Server

Apr 15, 2010

Share session using server

View 3 Replies

State Management :: Session Sharing With Virtual Folders

Jul 14, 2010

i have two solutions, 1. user management and 2. travel management. i publish the user management solution to [URL] and i publish the travel management to [URL] here i face the problem. the default home page would be [URL], its a windows authentication in page load, i capture the username, pass it to procedure which will fetch me his credentials on access. i store these in a session.

in the home page i have link to navigate to travel page, when i try to access the sessions in travel page, its empty. i tried printing the session id in both user management and travel, both are same but the sessions created in user management are empty in travel. what would be problem here and how can i resolve this.

View 2 Replies

State Management :: Session Variables In Virtual Directory?

May 22, 2010

I created a virtual directory for new .ASPX pages added to existing ASP website. I found that the new .ASPX pages are not able to access the session variables created by the existing .ASP pages (outside the virtual directory).

View 3 Replies

State Management :: Manage Session Variable In To Different Virtual Directory

Apr 13, 2010

I have a problem to manage session variable in to different virtual directory. I need to access Session value from one virtual directory to another virtual directory. For Example I have a Web Site in my IIS with one page. Page 1

[Code]....

I have another virtual directory under the same Web Site with one page as follows.

Page 2

[Code]....

I can't access session value of Page 1 from Page2!I need to access Page 1 Session value from Page 2.

View 3 Replies

Share Session State Between Two WCF Different Services?

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

To Share Session State Between Asp Classic And .net?

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

C# - Share Session Between Two Web Sites Using .net And State Server?

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

State Management :: Error :Session State Has Created A Session Id, But Cannot Save It?

Nov 18, 2010

I read the solutioin for this error, at the following link :http://forums.asp.net/p/1046935/1576341.aspxbut I am still not clear what exactly causes the error. I have two doubts :1. Can anyone please elaborate a bit on this issue, with any example ????2. Is there any drawback of this approach ?

View 4 Replies

State Management :: How Share The Application Objects Between The Server In Web Form

Mar 31, 2010

I have problem in maintaining the application objects in the server when it is deployed in the web farm.In our application i'm storing the sessionID and and the column value ( "tvktnx55vl5mzr453dmaehit " + "A101" ) in arraylist and storing it in application object. when i test this it is ok. but when we deploy it we have one issue that is we cannot share the application object in web farm.

View 1 Replies

C# - Amazon EC2 Multiple Servers Share Session State

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

C# - Unable To Share Session State Between 2 Web Apps With StateServer?

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

C# - Uniquely Identify Two Instances Of One Browser That Share Session State?

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

C# - Create Virtual Directories In IIS 7.5?

Jul 25, 2010

My asp.net web application knows how to create sub-applications (asp.net applications with web.config file, located in sub folders of the root application).

Now, I need to configure each sub-application in the IIS with a Virtual Directory, AND, make this new virtual directory an application in a specified application pool.

Is there any API for IIS7.5 using .NET ?

View 1 Replies

Setting Up App On A Vps / Need To Set Any Of The Folders As Virtual Directories

Sep 16, 2010

I just got a windows vps setup at a hosting company and about to install a big web application that is a store front. Do I need to set any of the folders as virtual directories? I'm so confused on all of this. Do I just copy the folders and files over and thats it? It has Plesk to use for the control panel. I know I have to set the directories to run as application but is there anything else?

View 1 Replies

How To Set Virtual Directories Dot Net Framework Version 2.0 To 4.0

Oct 20, 2010

I have installed VS2010. already i have VS 2005 and website working with framework 2.0.After installation, now I am unable to set ASP.net version for IIS virtual directories to Dot net Framework verion 4.0.How can i set virtual directories Dot net Framework version 2.0 to 4.0?

View 2 Replies

Accessing Multiple Virtual Directories Using A Single Web App?

Jan 13, 2011

Is it possible to look into multiple virtual directories, using a single web application?

I'm trying to develop a web app; which can create a site, save this site to a virtual directory in the same server, and make changes (i.e. add/edit webpages).

The web app will handle multiple domain names (IIS will handle the bindings going into the single web app), which are routed by the web app to their respective virtual directories.

View 1 Replies

How To Add IIS Virtual Directories And Arbitrary Files In TFS Solution

Feb 11, 2010

We have a web portal product from which we customize portals from customers. We use the precompiled web app and create a virtual directory (vd) where the customization resides. In addition to this we do some changes web.config in the web app folder. We would obviously like to keep these customizations under TFS source control.

When I try to add the precompiled web app (which I don't want to add to source control), a warning tells me that the vds cannot be added. If I only add the folder that is referenced to by the vd, I lose the references to assemblies in the precompiled web app.

My questions are:

How do I structure a solution for adding IIS (sub application level) virtual directories and still retain the references to assemblies? Is it possible to add other directories/files from the web application level (like App_Theme, web.config etc.) to the solution?

Since we already use Visual Source Safe, we have established a tree structure for each customization project:

Project Root
|
|-Custom Sql
|
|-Custom Portal Files (which is added as a virtual directory)
|
|-Other Customizations

I could probably do a lot of this manually through the source control explorer, but I'd like to have everything done through a solution.

I've followed the instructions using this article: [URL], but this doesn't address the exact problem that I have. Oh, and we are currently using Visual Source Safe for portal customizaton, but are eager to make the move to TFS.

View 2 Replies

Base URL In .net Master Pages With Virtual Directories?

Mar 16, 2010

I have an ASP.net master page. In this master, I have all my css and javascript files defined. I also have a few images and a few buttons and hyperlinks.All the urls are all declared as relative ie "/scripts/ian.js"Everything works fine if this site is the root website, but I need it to work in a virtual directory.My problem is when I place this website in a virtual directory under a root site, all my links are pointing to the root site. so my links point to www.root.com/scripts/ian.js but it should be pointing to www.root.com/virtualDir/scripts/ian.jsI thought the Base Href tag in the header would help, but so far it does not seem to be helping in anyway. All the links are still pointing to the root website when i hover over them.

View 3 Replies

State Management :: Session Mode State Server - Sending Asynchronous Request

Nov 5, 2010

Customer were getting "View State Validation Error" due to worker process recycling at our production webserver and to fix that i applied machinekey and then move my Session state Mode from In Proc to State Server to retain session data and not kick out the customer to relogin. I had serialization issue with one object which has to be stored in session but when i moved it out of session i could able to resolve the issue.

But doing all these i was partly successfull in keeping the user in their session when Worker Process recycle event occurs.I was able to refresh the page or make a post back by clicking the refresh button and also able to retain the session values. But the Problem occurs when sending asynchronous request to server which we do periodically every 15 minutes from the moment the user logs in.The web page doesnot update data on website when sending asynchronous request.By Debugging I found at this particular code point it fails to make a postback which is required.

<%=GetHintFromServer%> (When there is no Worker Process recycle i t gets replaced by
WebForm_DoCallback('__Page',message,ShowHint,null,null,false) on postback) Everything works fine when there is no Worker Process Recyling but when it happens looks like sending request asynchronously using javascript fails .Remember When I make a post back by manually clicking submit button everything works fine.

SendRequest(Asynchronous)
function SendRequest(msg, isBusy, chartMsg, vesselMsg)
{
try
{
//confirm("msg"+msg+"isBusy"+isBusy+"chartMsg"+chartMsg+"VesselMsg"+vesselMsg);
_busy = isBusy;
if(chartMsg != null)
{
//confirm("chartMsg"+chartMsg);
_element.SetMessage(true, chartMsg);
}
if(vesselMsg != null)
{
confirm("chartMsg"+vesselMsg);
_element.ShowVesselLoading(true, vesselMsg);
}
_stuckWatchdog = setTimeout( "ClearPendingRequest();", 60000);
var message = msg;
var context = '';
<%=GetHintFromServer%>
}
catch(e)
{
alert( "Exception error on SendRequest(): " + e);
}
}

View 2 Replies

State Management :: Unable To Serialize The Session State In 'StateServer' And 'SQLServer' Mode

Dec 12, 2010

I am new to .net 4.0 and am using EF Model and SessionState Mode=SqlServer and I am getting this error below:

Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. The same restriction applies if similar serialization is done by the custom session state store in 'Custom' mode.

I checked the stack trace and its complaining about

[assembly: global::System.Data.Objects.DataClasses.EdmSchemaAttribute()]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("PoplarGroveModel", "tblMenuRole", "tblMenu", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(PoplarGroveDataModel.Menu), "tblRole",

[Code].....

I marked it as serializable but then it complains about System.Data.Objects.ObjectContext is not marked as serializable and hence throws the same error.

View 1 Replies

State Management :: Recreate State Session Database In SQL Server 2008?

Apr 5, 2010

Our ASP.NET App uses ASP State Session Management and has been rebuilt about 2 years ago [With .NET Framework 2.0]. We are currently in .NET framework 3.5 and have moved to SQL Server 2008 - but continue to use the same ASPState database. The State database has been upgraded to SQL Server 2008. Since then we have are seeing timouts/locks on ASPStateTempSessions table. I am wondering if we have to rebuild this database from scratch with some newer scripts?

View 2 Replies

State Management :: Asp Create New Session State Cookie Each Time On Debugging?

Jan 21, 2011

I'm using the following line of code to display the number of users currently logged on:

lblNoOfUsers.Text = Membership.GetNumberOfUsersOnline().ToString()

I'm still debugging my application so it's on the local server. As I debug and stop then debug again, eventually lblNoOfUsers.text turns to "0" instead of "1", even as I'm navigating my application. It only turns to "1" again if I log out and sign back in. It's almost as though Membership.GetNumberOfUsersOnline my login are referencing two different session states. How is this possible? Does asp.net create a new session state cookie each time I start debugging?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved