.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Sharon Maxwell
Post New Web Links

Save Workflow Runtime as Application State or Session State for a website with multiple users?

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :JavaScript/VBScript
 

I used Windows Workflow Foundation 3.5 as a page flow navigation for a ASP.NET website's Previous and Next page navigation.

The site acts like a shopping cart and each user has his own session and user data.  The app only has one WF.  I am not sure if I should generate one Workflow Runtime for every user or for simply generate one workflow Runtime for the entire application in my case?   

In the global.asax:

void Application_Start(object sender, EventArgs e)
    {
       
    } 

void Application_End(object sender, EventArgs e)
    {
                         
    }
    
    void Session_Start(object sender, EventArgs e)
    {
        // Code that runs when a new session is started
        System.Workflow.Runtime.WorkflowRuntime workflowRuntime = new System.Workflow.Runtime.WorkflowRuntime(WorkflowManager.WorkflowRuntimeKey);

      


View Complete Post


More Related Resource Links

APPLICATION STATE AND SESSION STATE HELP

  

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
  

How can I save querystringparameter to session state

  

Could someone please tell me if I can save the querystringparameter to session state, I want to use the parameter in code behind. Or is there a better way to do it?

Thanks


Session State Expiration after Application pool recycle

  

Hello 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.

 

Any Suggestions?..

 

 

 

 

 

 

 

 


Error :Session state has created a session id, but cannot save it because the response was already f

  

I read the solutioin for this error, at the following link :

http://forums.asp.net/p/1046935/1576341.aspx

but 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 ???


Thanks in advance for any reply......



Creating Multiple tasks in perticular state in State Machine Workflow

  

Hi Everyone,

I'm very new to workflow so forgive me if I'm asking stupid question.

Here is my scenario :-

Once the data got submitted to a list I have create task for different states(Like HRState, ITDepartment State etc etc) and each pf the state will have more than one task with different data(in terms of title,assigned to etc). That being said my question will be how I will accomplish these I read about replicator on many bolg but I'm not sure if I can provide different data for each task or not. Also I need to keep track if someone reject the task and come back to lets say HRState than based on that data I have to go to perticular task.

Please advise me to accomplish the task.

I'm working with Sharepoint 2010 and Visual Studio 2010.

Thanks in advance.


Creating Multiple tasks in perticular state in State Machine Workflow.

  

Hi Everyone,

I'm very new to workflow so forgive me if I'm asking stupid question.

Here is my scenario :-

Once the data got submitted to a list I have create task for different states(Like HRState, ITDepartment State etc etc) and each pf the state will have more than one task with different data(in terms of title,assigned to etc). That being said my question will be how I will accomplish these I read about replicator on many bolg but I'm not sure if I can provide different data for each task or not. Also I need to keep track if someone reject the task and come back to lets say HRState than based on that data I have to go to perticular task.

Please advise me to accomplish the task.

I'm working with Sharepoint 2010 and Visual Studio 2010.

Thanks in advance.


SQL Server Session state problem.

  

Hi to all,


I have some things that I want to know. I am right now using a free asp.net webhosting ("somee.com"). The problem is that when I am visiting a page, there's a tendency that values stored in my session variables are lost. Therefore, it causes an error when the requested page is loaded.

1. I am thinking of using sessionState mode="SqlServer". Will it solve my problem?

Actualy Im working on it but Im having problems when connecting to the sql database.

2.  Is that a problem in the webhost?

3. Do free webhosting sites provide allow session state in the sql server?. Because ive tried it locally into my computer and error say's i should intall the ASP.NET Session State SQL Server version 2.0 or above.




WF How-To: Building State Machines with Windows Workflow Foundation

  

State Machine workflows represent a different way of visualizing program logic. Rather than flowing from activity to activity like sequential workflows, State Machines transition from state to state. Learn about uses for State machines and see how to design and build a State Machine workflow with Windows Workflow Foundation.

Keith Pijanowski

MSDN Magazine February 2008


Best Practices: Fast, Scalable, and Secure Session State Management for Your Web Applications

  

ASP.NET provides a number of ways to maintain user state, the most powerful of which is session state. This article takes an in-depth look at designing and deploying high-performance, scalable, secure session solutions, and presents best practices for both existing and new ASP.NET session state features straight from the ASP.NET feature team.

Mike Volodarsky

MSDN Magazine September 2005


ASP.NET: Nine Options for Managing Persistent User State in Your ASP.NET Application

  

ASP.NET provides many different ways to persist data between user requests. You can use the Application object, cookies, hidden fields, the Session or Cache objects, and lots of other methods. Deciding when to use each of these can sometimes be difficult. This article will introduce the aforementioned techniques and present some guidelines on when to use them. Although many of these techniques existed in classic ASP, best practices for when to use them have changed with the introduction of the .NET Framework. To persist data in ASP.NET, you'll have to adjust what you learned previously about handling state in ASP.

Steven Smith

MSDN Magazine April 2003


Taming the Stateless Beast: Managing Session State Across Servers on a Web Farm

  

Running a Web farm means managing session state across servers. Since session state can't be shared across a Web farm with Internet Information Services 5.0, a custom solution is required. One such solution using a tool called the session manager is described here. The article begins with a description of the SQL Server database used to store state information, the stored procedures used to update it, and the retrieval of session data. ASP code drives the session manager tool and the COM and COM+ components that run the stored procedures.

John Papa

MSDN Magazine October 2000


Session State Problem

  

Hi,

 

I just for the first time into a session state problem. So I am hoping someone

here has the answer.

 

I have written an ASP.Net website and tried to implement the common poor mans online user count.
The problem I am having is the following.

On App_Start I create a variable and assign it the value of 0;

Then increase the number on session_start and decrement on session_end.

On my local IIS it works perfectly from IE8 and Opera. The value increments correctly.
As soon as I upload to my live server. The value increments on every link I click and every page refresh when I test with IE8.
This does not happen when testing with Opera.

Could someone please shed some light on the subject.

 

Thanks

 

Louis Lews


Good news for those of you who get "Unable to make the session state request to the session state se

  

Dear all,

Due to the known problem of session variables getting lost if using InProc-server during frequent changes in development, I had to choose between SQL and ASP.NET State server, so I opted for the second. Initially, all fine, but after using it for a few days, I started to get this error:

 Server Error in '/cv2' Application.
Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and that the client and server ports are the same.  If the server is on a remote machine, please ensure that it accepts remote requests by checking the value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection.  If the server is on the local machine, and if the before mentioned registry value does not exist or is set to 0, then the state server connection string must use either 'localhost' or '127.0.0.1' as the server name.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and that the clie

How to use cookieless session state...

  
I want to know how its work and it advantage and disadvantegePls explain me with example

Session State for Listview Items?

  
Hi, I have a listview control, in it each item will have a checklist eg - Pass / Fail which will then have a label displaying the selected value. I also have datapager wired up to the listview. When i toggle between the datapages and toggle back, any result previously submitted will be wiped. I am thinking i should be using session state to temporarily store then info, and then once the session is finished use a submit button to send all values and ids into an xml. 1. Is this the right way of approaching the situation? 2. How would i specify session state for listview items, eg would i angle it through a itemdatabound event or the application itself?   Any assistance and advice would be appreciated as i have only started looking at state management and xml storage.  

Set State of workflow in code

  
Hi, i have instance of StateMachineWorkflowActivity and i cannot figure out how to change its State in code. Is there any way to do this?   Thank you in advance for your help!
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend