ajax - jQuery, WCF and ASP.NET -


Sorry if this is a dumb question in previous asp.NET projects, I communicate without problem with an ASMX web service. I am using jQuery to do - in which the user has the ability to enable contacts with session status.

Now I am trying to do the same thing with the world of Visual Studio 2010 and .NET 4.0 and I with an AJAX enabled WCF service.

I am getting the basics in which I have the jQuery passing data in a call to the service, it does some processing and gives a price that shows the user of the jQuery.

My question is - how do I get WCF service to access user session information? I think that my understanding of WCF is missing a lot of fundamental, any pointers will be appreciated!

[update]: Here's a good article too:

is a concept that sometimes confuses the ASP.NET developers into WCF, the notion of session state is common WCF services, all sessions state is stored in local volatile memory. Selecting a copy of parts of durable storage space in the running examples for that condition Must to damage. WCF does not come with an implicit option to enable continuous storage of a conditional condition or to access session status from other processes.

There are a few ways to make WCF more like ASP.net.

One way to create WCF like ASP.NET is by changing the ASP.NET compatibility mode to make WCF like ASP.NET. Using a WCF application hosted in IIS and Transport Binding, HTTP runs with ASP.NET pipelines but does not have access to many ASP.NET features. Turning on the compatibility mode integrates the WCF application with ASP.NET pipelines and provides many of those features. Obviously, this approach is only interesting when your WCF service is already very much like the ASP.NET application.

Another way to make WCF like ASP.NET is to replace WCF session state management, instead of local volatile memory, this approach used by workflow services to create sustainable storage sustainable applications More like, service examples and example contexts are managed by IInstanceProvider, which creates and destroys service objects. The InstanceContextProvider which creates and destroys the context of the example, and IInstanceContextInitializer which sets the newly assumed charge reference Although the durable services are different from the position of the session, however, there are general construction blocks which can be used for both. [/ Update]

I can tell you a few things other than the above: Take a look at this post for one of them: After this, using some form of cache Consider it. This can be a cache style service or it can be a cache farm. For more information on caching, see my post here:

This is basically allowing you to store a unique key for the user (Sounds like a session ID) and all the so-called session objects will prefix the user to the pseudo session ID in the caching layer. This caching layer can then be said through a web site that you are using to run your site as well as your various WCF services / projects.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -