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


Similar Messages:

State Management :: Share Session Using Server

Apr 15, 2010

Share session using server

View 3 Replies

State Management :: Manage Custom Objects And Session State?

Oct 6, 2010

I've created a whole bunch of rather complex classes and now i'm starting to work on the ASP.net user interface. Basically the user will open 1 page which will be used to load, edit, save an object. The object has many fields and they are often other classes i've created. To create a nice interface i've used popups and used AJAX to reload parts of the page to avoid reloading the whole thing.

My plan was to create the object and save it to the session. Then each time the page is loaded copy the object values to the asp fields and do the reverse when the page has been submitted copying the asp values to the object field then updating the session object.

So the code will go something like:

onload:

if session is not null load from session otherwise create new
this.txtID.text = object.id
this.txtName.text = object.name
etc etc

on submit:

object.id = this.txtID.text
object.name = this.txtName.text
etc etc
update session.

Is this what you guys would do? or am i over thinking this, seems like a lot of code to load all the object fields each time the page is opened and submitted etc.

Just looking to bounce ideas of off other developers :D

View 4 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 :: Server-side Detection Of A Changed Form?

Mar 7, 2010

I've searched high and low for a efficient and reusable way to detect, on a postback/server-side, if any input controls on a form have been changed and I haven't found anything other than client-side solutions such as DirtyUpdatePanelExtender. I've come to the conclusion that it must be either really simple or really complicated.Ultimately what I want to do is to perform a database update, or not, depending on whether or not the user has changed any input controls on the form. The only thing I've come up with so far is to save the original values as Viewstate variables and then compare them with the Request values on a postback, but that seems far from ideal.

View 9 Replies

State Management :: How To Link The Objects Between Browser Session And Session Objects

May 10, 2010

Lets say I am doing a shoping cart. I authenticate the user with a session variable.For example:

If(Request.IsAuthenticated)
// Here I want to add to the shoping cart.
// Can I do the following
Session["Cart"] = "Washing Machine";
Now will this Session["Cart"] value which is washing machine here be unique to diff customers?

View 1 Replies

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 :: 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

State Management :: How To Serialize Objects

Jul 2, 2010

Is there any way or process to serialize the the objects?? i am trying to store the instance of few control in viewstate but it shows error msg that it is not a serialized object. should i perform some steps to serialize the objects ???

View 9 Replies

State Management :: Passing Value From One Web Application To Another Hosted In Different Server?

Sep 14, 2010

I want to redirect from one aspx page to another aspx page of different application.Both applications are hosted in different application servers. I want to pass a value from one application to another.I tried - 1. Response.redirect with Query string - But query string is not secure as it is visible to user in browser.2. Cookies - This is also not a secure way. Again if the cookies are disable in the browser it may not work.3. Server.transfer - In different web application we cant use server.transfer.Please provide any easy solution how to achieve this. I dont want to display the values to the user as it is confidential data.

View 13 Replies

State Management :: Best Practise For Caching Objects For A List Of?

Dec 7, 2010

I've created a blog for my first asp.net website. Ive got a blog class as my object. Ive created a number of methods to access my blog articles using LINQ to SQL.

Each method returns a list of objects ready to be used in the appropriate web user control.

In my head i need to cache these lists of objects that are returned, but need to know the best way of approaching this. So i have come up with two possible options

1: Make one method to retrieve all blogs in a list<Blog> and cache this list to be used for all other methods or

2: Cache only the required methods that really need it.

View 3 Replies

How To Share A Folder In A Web Application With A Win Form Client

Jul 29, 2010

In this asp.net web application, users can upload files to the server through a web interface. All the uploaded files are save in a server side folder. If I want to create a new win form desktop client (actually, its a WPF application) which can be used to upload files to that same server side folder as web interface does, how can I share that server side folder with that win form client?

View 2 Replies

State Management :: Session Objects Not Cleared As Expected After Upgrading To IIS7.5?

Sep 13, 2010

I've just upgraded my development machine from XP SP3 (IIS5.1) to Win7 x64 (IIS7.5)

Since doing this, my app has started to behave differently. Within it I store users' preferences/access levels using an instance of a class that I store within the Session object. This class is shown:

[Code]....

My requirement is that on each page request (other than the login page), the application should check that the Session object exists. The page data is therefore shown based on the values within the session object (e.g. which customer account they are using etc)...Previously on IIS5.1 if I was logged into the app, but made some changes to a file within App_Code, or Web.Config for example, when I then continued to use the app, I would get kicked out to the login page straight away. This is the intended behaviour. Now however, on IIS7.5, the app continues to provide access to the pages, but debugging shows that the session value has had all of its values set to 0 (zero). Therefore, the pages continue to load but the data shown is corrupted because the app no longer displays it accurately. Here is the code I use which (on IIS5.1) caught this occurence. Can anyone offer any advice on just what's now happening

[Code]....

I have tried changing this line:

[Code]....

View 11 Replies

State Management :: Objects In Session Variables Now Causing Slow-downs?

Oct 24, 2010

I've noticed that once I've instantiated 3-4 objects now, my ASPX page is running slower. The response from the server (which is my own PC) is taking longer.

With one or two objects, the performance is same. After I instantiate 3, it slows a little, and 4 just completely wears it down.

I've read this article: [URL]

that says to avoid using session variables especially storing objects into them. Well thats exactly what I'm doing. My object has about 10 methods(~30 lines of code each) and 20 fields.

My question is, if I want to persist object in memory for each user session, how else could I store them on each postback if not in the session variable>? I can't use application variable because thats shared and not thread safe.

View 3 Replies

State Management :: Set The Mode Of Session State As State Server And Point To Another Server?

Aug 26, 2010

In my web application, I set the mode of session state as State Server and point to another server. After run some days, I always meet following exception:

The state server has closed an expired TCP/IP connection. The IP address of the client is 192.168.80.157. The expired Read operation began at 08/25/2010 14:18:03.

View 2 Replies

State Management :: Client And Server Side State Management?

Feb 25, 2011

when we go for client and server side state management in asp.net

View 2 Replies

State Management :: Session State Expiration After Application Pool Recycle?

Nov 1, 2010

All we have a global ships position tracking website which runs smoothly until IIS application pool recycles.When there is workerprocess recycling looks like session state expires as a result i loose all session data and when customer clicks refresh button he is redirected to login page.

In web.config Session state mode is set to InProc so i changed it to State Server but to my luck i have MAP object which is not serialiazable which is causing the maps from not appearing on the website.I tried adding serializable attribute to the object class but still not succesfull.Our website is accessed by our customers whose count is more than 1000.

Changing the session state mode from InProc to StateServer can really slow down the response time so
Is it good to go further fix the serailizable issues and move to state server?.

Is there any way I can retain my session data when application pool recyles?..

Stopping Application pool from recycling may not be a good idea considering health factor of web server.

View 8 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 The State Information Is Invalid For This Page And Might Be Corrupted While Executing Application

May 26, 2010

I am getting this error while executing my Asp.Net application.i am not able to execute application using Visual Studio Interface and when i am trying to execute application from Local IIS. its executing well but when i am trying to click any button for searching etc it is giving this error. The state information is invalid for this page and might be corrupted. The detailed information is

[Code]....

[FormatException: Invalid character in a Base-64 string.] System.Convert.FromBase64String(String s) +0 System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +72 System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState) +4 System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) +37 System.Web.UI.HiddenFieldPageStatePersister.Load() +113[ViewStateException: Invalid viewstate. Client IP: 127.0.0.1Port: 1307User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1064 Safari/532.5ViewState: /wEPDwULLTIwOTUyMjAzMTgPZBYCZg9kFgICAw9kFgICCw9kFgICAQ9kFhgCAg8QDxYCHgtfIURhdGFCb3VuZGdkDxYFAgECAgIDAgQCBRYFEAUHQ2VudHJhbAUCODBnEAUITm9ydGhlcm4FAjgxZxAFB0Vhc3Rlcm4FAjgyZxAFCFNvdXRoZXJuBQI4M2cQBQdXZXN0ZXJuBQI4NGdkZAIJD2QWAmYPZBYKAgEPEA8WAh8AZ2QPFgUCAQICAgMCBAIFFgUQBQdDZW50cmFsBQI4MGcQBQdFYXN0ZXJuBQI4MmcQBQhOb3J0aGVybgUCODFnEAUIU291dGhlcm4FAjgzZxAFB1dlc3Rlcm4FAjg0ZxYBZmQCBw8QDxYCHwBnZGQWAWZkAgkPD2QPEBYBZhYBFgIeDlBhcmFtZXRlclZhbHVlBQItMRYBZmRkAgsPEA8WAh8AZ2RkFgFmZAINDw9kDxAWAWYWARYCHwEFAi0xFgFmZGQCCg9kFghmDw8WAh4JTWF4TGVuZ3RoZmRkAggPDxYEHgxNYXhpbXVtVmFsdWUFCTUvMjYvMjAxMB4MTWluaW11bVZhbHVlBQk1LzI2LzE5MTBkZAIMDxYQHhlDdWx0dXJlRGVjaW1hbFBsYWNlaG9sZGVyBQEuHgdDdWx0dXJlBQVlbi1VUx4bQ3VsdHVyZVRob3VzYW5kc1BsYWNlaG9sZGVyBQEsHg5DdWx0dXJlRGF0ZUZNVAUDTURZHhZDdWx0dXJlQU1QTVBsYWNlaG9sZGVyBQVBTTtQTR4WQ3VsdHVyZVRpbWVQbGFjZWhvbGRlcgUBOh4WQ3VsdHVyZU...][HttpException (0x80004005): The state information is invalid for this page and might be corrupted.] System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +106 System.Web.UI.ViewStateException.ThrowViewStateError(Exception inner, String persistedState) +14 System.Web.UI.HiddenFieldPageStatePersister.Load() +217 System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +105 System.Web.UI.Page.LoadAllState() +43 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6785 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242 System.Web.UI.Page.ProcessRequest() +80 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21 System.Web.UI.Page.ProcessRequest(HttpContext context) +49 ASP.pages__cmtickets_cmtickets_reports_cmtickets_search_aspx.ProcessRequest(HttpContext context) in c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesapp_mobily_alexmare1eddc658e6f2ba5App_Web_b9acfmsy.14.cs:0 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082

View 3 Replies

State Management :: Application State Is Not Cleared When Restart The Browser?

Feb 23, 2011

I am very new to asp.net. I developed one application. In that I have two pages. First page contains Application.Get() in page load event, here I read this Application variable, initially it returns NULL. If it is NULL, I make some buttons invisible. Then I jump to second page, in that page contains Application.Set(). Again I jump from second page to first page, this time Application.Get() is not NULL, I make some buttons visible.This is ok, if I execute the program in .net software.

But, when I publish this same program to web server like IIS, it is not working properly. After publishing very first time the first page returns NULL after that it doesnt return NULL even I closed the browser. I dont know why. In program, I used 2.0 framework. IIS also has 2.0 framework. Please clear this issue.

View 6 Replies

State Management :: Unable To Cast Application State Object?

Nov 3, 2010

global.asax:-I have defined a struct (my_struct)-I add a List of structs (List<my_struct>) to Application["MyList"] In default.aspx:-I have defined the exact struct (my_struct) and want to cast the Application["MyList"] object to the List of structs.

example: x = (List<my_struct>)Application["MyList"];

I receive this error "Unable to cast object of type 'System.Collections.Generic.List`1ASP.global_asax+my_struct]' to type 'System.Collections.Generic.List`1[_Default+my_struct]'

View 1 Replies

State Management :: Application State And Session State?

Oct 2, 2010

User Interface: 2 Labels; 1 Buttons

Requirements: Create a Web Page in ASPx that will do the following:

1)One label will provide a count of how many times Button 1 has been clicked in the current session.

2)One label will provide a count of how many times Button 1 has been clicked by all users of the application. The Application Code for the Button should start at 100 (set this in the Global.asax file). this is what i have so far but i cant seem to get the application state to work properly.

aspx.vb

Partial Class _Default
Inherits System.Web.UI.Page
Dim clickcount As Integer

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

If Session("ClickCount") Is Nothing Then
clickcount = 0
Else
clickcount = CInt(Session("ClickCount"))
End If
If Not IsPostBack Then
If Request.Cookies("UserName") IsNot Nothing Then
Label1.Text = "Welcome Back " & Request.Cookies("UserName").Value & "."
End If
End If
Dim clickCounta As Integer = CInt(Application("ClickCount"))
End Sub
Protected Sub PostBackSession_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles PostBackSession.Click
clickcount += 1
lblClkCnt.Text = "Current Click Count is " & clickcount
Application.Lock()
Dim clickCounta As Integer = CInt(Application("ClickCount"))
clickCounta += 1
Application("ClickCount") = clickCounta
Application.UnLock()
AppClick.Text = clickCounta
Dim nameCookie As New HttpCookie("UserName", _
TextBox1.Text)
nameCookie.Expires = Now.AddYears(1)
Response.Cookies.Add(nameCookie)
End Sub
Protected Sub PostBackSession_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles PostBackSession.PreRender
Session("ClickCount") = clickcount
Application("ClickCount") = clickcount
End Sub
End Class
global.asax
<script runat="server">
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
Dim clickCounta As Integer = CInt(Application("ClickCount"))
Application.Add("ClickCount", 0)
End Sub
Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)
Dim clickCounta As Integer = CInt(HttpContext.Current.Application("ClickCount"))
End Sub
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs when an unhandled error occurs
End Sub
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
End Sub
Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
End Sub

View 3 Replies

App Wont Share Database With Sql Server Management Studio Express?

Oct 15, 2010

I have an ASP.NET 3.5 app with a SQL 2005 Express .mdf database file in its App_Data folder. Lets call that Foo.mdf. On its own the ASP.NET app can connect to the database with no problems. So far so good. Then, if I install Sql Server Management Studio Express on the server and start it, it finds the local SQLEXPRESS instance and connects to it, but doesn't show Foo.mdf in the list of databases.

So I try and Attach Foo.mdf by right-clicking on databases and selecting Attach.. and finding the .MDF. This fails with a vague error:

CREATE FILE encountered operating system error 32(error not found)
while attempting to open or create the physical file
'C:inetpubwwwrootFooAppApp_DataFoo.mdf'. (Microsoft SQL Server, Error: 5123)

If I stop my ASP.NET site in IIS, then the attach does work, but then when I restart my ASP.NET app, it can't connect to Foo.mdf. So it looks like SQL Express 2005 will only let either my app or Management Studio connect. This seems really crap - surely Sql Express should allow more than one connection? I was expecting it to behave like regular Sql Server.

View 3 Replies

State Management :: Maintain State Of Treeview Across Application?

Mar 4, 2011

I am using a treeview in my master page and every node having link to its container page.That means click on any child node of treeview its redirect to another page by taking some value.

Now every time I click on nodes of treeview, its get collaps when child page loaded...

Now regaring maintain state of treeview across my web application...

View 13 Replies

State Management :: Pass Value To Another Form?

Aug 19, 2010

I have QuoteNumber filed in Db.aspx(ddquote.txt) i want to pass this QuoteNumber values(values should to another web form/page i.e. mail.aspx when i click mail button, Message should supposed to display in textbox(txtQuote.txt) of mail.aspx form/page is "You are sending "QuoteNumber" quotation to "MailID",

View 6 Replies







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