WCF / ASMX :: Sharing Data Between User Requests?

Nov 7, 2010

am new to web services and have a quick question. I've some data (an c# class object) that needs to be shared between two different users (of my web service) . all the methods in the web service have a parameter called "sessionkey" which can be used to know what data to share.

i need to know how/where to store this data ?

View 4 Replies


Similar Messages:

HttpHandlers / Modules :: Sharing Data Structure Between Requests?

Feb 13, 2011

I am working on a web service that return image tiles for site using Bing Maps. The problem I am having is that All these tiles are created using a single data source. When the bing maps control calls out for the imagery it calls the service multiple times to get the tiles it needs. So if the first thread to go in gets the file all the other threads will fail until the first thread is done reading in the file. Is there an easy way to share this file between all the requests? The flow for what im trying to do is as follows: recieve request open file and read in the data to a custom class - (this is the class I would like to share for all the threads) create the image based on the data return the image.

View 3 Replies

WCF / ASMX :: Using Static Hashtable In Webservice For Sharing Common Data Among Different Users

Nov 26, 2010

We are using static hashtable in webservice for sharing common data among different users. Is it safe? Is there any better way?

View 1 Replies

WCF / ASMX :: Best Practice For Blocking Requests Until Data Is Cached?

Mar 13, 2011

I have a RESTful webservice. This webservice builds some information (which can take upwards of a couple seconds) and caches the contents.

This works well; however, suppose that many of the same requests come in at about the same time. In our current scenario, each request will build the content before caching. This is obviously not desired as it uses CPU time that could be better served elsewhere. What I would like to do is to suspend/block requests to the same url/cachekey until the content has been built and cached, at which time those other requests will be unblocked and simply fetch the content from cache.

I am not sure the best way. The following are options I have thought about:

Use string.Intern on that cache key and lock. Problem is that this could cause a deadlock if that string is used elsewhere. Use a ConcurrentDictionary and WaitHandle objects to allow other request to lookup in the dictionary if a request is being processed and then "wait" for the request to finish. This would at least give me a timeout capability but I am concerned with the performance of creating many wait handles.

View 2 Replies

WCF / ASMX :: Concurrent Requests WCF + Net.tcp?

Nov 18, 2010

we are using the WCF service and hosted using a console application, now we are using LoadRunner and hitting it concurrently

Where giving 50 hits at a time few requests (26) gets completed successfully and remaining gives error TCP error code 10061: No connection could be made because the target machine actively refused it.

View 1 Replies

WCF / ASMX :: Duplicate Requests Sent?

Sep 23, 2010

I am calling a web service in my aspx page. the web service (written in java) is acting as a middleware between my system and another system (Siebel) to which I send services and get response for these services. some requests are synchronous. Sometimes when invoking a method the response takes a long time to respond, so a time out exception is thrown.

The problem is that the web service is receiving the same request many times despite I am calling it only once.In my log file and database entries it is clear that the request is called only once. but in the middleware and Siebel side they are receving four or five requests for the same request sent by me.

Is this a bug in asp.net. is it possible that the server where my application is deployed is sending the request many times when not getting the response.Note: iam using Visual studion 2005. the application is deployed to windows server 2003.Iam not discussing the problem of time out. iam asking about the duplicate issue.

View 4 Replies

WCF / ASMX :: How To Get Raw Http Requests

Jan 20, 2011

I m invoking a web service and i would like to know if i get the raw http request?

View 4 Replies

WCF / ASMX :: PowerShell In Web Service For Ajax Requests?

Dec 9, 2010

A customer wants us to create an ajax-enabled web application that can be used to manage their IT environment (Active directory, mail, file security, ...). However, as the team that will support the web application does not know anything about these IT systems, they would like to split the coding so that all interfacing with the IT environment is done via PowerShell, which is known by the administrators of these systems. This would mean that if new functionality is required, the web team can just create an additional web page and interface and use PowerShell scripts that get created by technically skilled people in that specific topic (ie mail administrators). I don't see an issue using this approach for requests like adding a user where latency is not an issue, but I do wonder if this is feasible for interactive content with Ajax.

Ie I would like to implement a google suggest like search for AD users. This would mean that ie for every x keystrokes (or x seconds whatever approach I implement) an Ajax request will be made and the web application or web service will than use PowerShell to get the data. Taken into account that up to about 75 users can use this feature, is this something that would work? Not only performace-wise but also the number of connections (I read about the Powershell 5 remote session limit but also that it could be put to a higher number)? The example above is probably the most resource heavy Ajax requests (and can be optimized by caching), so taken into account they don't want this nice feature, are basic PowerShell scripts in ajax request really an option. My gut feeling is telling me this is a no-go, but I don't want to exclude the option just because it's not something I usually would do.

View 1 Replies

WCF / ASMX :: Discarding Queued Web Service Requests?

Mar 16, 2011

If a user makes a second request to the same Web Service method while the first request is already running, is there a way to simply stop the execution of the first request and discard it immediately?

Usually what happens is users get impatient and click on a button 10 times when there's a performance blip in the system, which only makes things worse since the system now has to process 10 queued requests (the first 9 of which are now irrelevant) before any results are returned.

View 1 Replies

WCF / ASMX :: Do Multiple WCF Web Service Requests Queue Up Or Do They Run In Parallel

Mar 17, 2011

I've got a WCF web service that runs fine at the moment but there is talk about using it very heavily soon. As part of it's normal process it writes a file out, then reads it back in again (don't ask why, I know it's stupid). I'm concerned that if we start hitting it with lots of requests then the following might happen.

1. Request 1 writes the file out.

2. Request 2 comes in and overwrites the file.

3. Request 1 reads the file back in but this is now the wrong file.

My understanding is that the requests would naturally queue up so that request 2 wouldn't start until request 1 had finished, but I'm not totally sure.

View 1 Replies

WCF / ASMX :: How To Configure Webservice For Jquery Requests And Responses

Jan 23, 2011

I added a new asmx file, which start like this:

[Code]....

I have uncommented the ScriptService line to allow access from scripts.

What else do I need to set to make jquery connections?

Can I prevent access from outside my app? I only want to provide a service for signed-in users (web forms) via own webpage.

View 5 Replies

WCF / ASMX :: Capture The Outgoing And Incoming Soap Requests Using VS 2008?

May 7, 2010

How do I capture the outgoing and incoming soap requests using VS 2008? I read about the SOAP toolkit but it seems the framework now does it? Is it in the Windows SDK?I am debugging a web service on FedEx and they want to see the the SOAP file.

View 3 Replies

WCF / ASMX :: Code Within A WebService And WCF Client Work Only When Fildder Is Capturing Requests?

Mar 31, 2011

I have a piece of code written in 2 different ways, one a web service and another a WCF client which are trying to access an external 3rd party URL.

The same code when written as an exe works fine, i see my submissions on the 3rd party site, while the web code does not work.

I installed Fiddler to check traffic and to my surprise the web code works when Fiddler is capturing traffic, As soon as I stop Fiddler my code does not work.

For the web service code I get error: The remote name could not be resolved:

For the WCF client I get error: There was no endpoint listening at <<3rd party URL>> that could accept the message. This is often caused by an incorrect address or SOAP action.

Am quite sure now that this is because of some network and/or proxy on my corporate network, but not able to figure out what it can be.

View 1 Replies

Sharing Web User Control Between Various Projects?

Feb 2, 2011

Is there a way to share user controls between various projects ?

I have created user controls like login control, menu control, header control, lost password control and etc and they are all connected to sql database for data.

I would like to share these between various web site projects, it means I have same functionality and the only modifications I can do is within CSS styles.

Do I need to copy modules or is there a way to keep them as shared classes/modules and call what I need every time I need it?

View 1 Replies

C# - Sharing User Controls Across Multiple Websites?

Apr 14, 2010

I am currently working on a project which involves three different websites with a lot of common functionality. At the moment the common functionality is placed in a different website full of user controls.

The problem is sharing the user controls across the multiple websites. Looking around on SO and other websites, the only solution seems the be using virtual directories. As this is a workable solution (we us this at the moment) it doesn't seem as a "clean" solution.

Which "best practices" exist on sharing common functionality (including the GUI/HTML) between different site?

Is it (for example) possible to create a single Web Application project and deploy subdirectories (each with their own web.config) to different production environments?

View 3 Replies

How To Use Facebook Sharing And Tweet Sharing Tools

Dec 1, 2010

I see on the bottom of blog pages a sharing buttons (Twitter and Facebook), where if clicked the link behind (which is normally the blog page url) the fshare button takes the clicker to the blog site facebook page respectively.

How does one do this in asp.net 2 , does one one use the <%# %> in the url part of these share buttons, are there any examples of how this is done?

View 8 Replies

Web Forms :: Sharing A Structure Or Class Among Multiple User Controls?

Feb 2, 2010

I'm building an application where custom modules may be developed and "dropped in" to the system, where they can be picked up and utilized.

I'm building a forum module and have a user control to create a login/registration region. I plan on using a struct to store the user session data. However, i need this class structure to be shared between the forum module and the login/registration control.

Because the functionality is to be contained in the module's folder, i cant add any assemblies to the app_code folder.

How can i share a class or struct among two user controls?

View 6 Replies

Share Only One Instance Between Requests For Each User?

Sep 16, 2010

i have a class that must have only one instance, so i implemented the singleton pattern but with static every user that open the website page loads the data of the first user that called the class. How can i have a singleton pattern but with only one class instance for user?

View 3 Replies

How To Handle Ajax Requests When User Is Not Authenticated

Apr 5, 2010

How do you handle ajax requests when user is not authenticated?

Someone enters the page, leaves room for an hour, returns, adds comment on the page that goes throuh ajax using jQuery ($.post). Since he is not authenticated, method return RedirectToRoute result (redirects to login page). What do you do with it? How do you handle it on client side and how do you handle it in controller?

View 4 Replies

MVC :: To Use AsyncController To Allow User Concurrent Ajax Requests?

Jun 10, 2010

In my ASP.NET MVC2 web app I have a page which goes off and gets results from a number of different web service feeds. These return times vary so I want to basically display them as they return after the page loads. I also want my user to be able to kick of requests that can run concurrently with these other requests.

At the minute my page just seems to queue up the requests. The web service calls returning one at a time in the order they are called and then the user can kick of requests.

Is this a case for the asyncController or is there an easier/better way of working this?

View 5 Replies

Selectively Redirecting HTTP Requests To HTTPS Requests?

Jun 18, 2010

What's the simplest and most effective way to selectively redirect HTTP requests to your ASP.NET page to its HTTPS equivalent? For example, if my page site URL is [URL], I want to redirect some (or all) page requests to [URL] What's the easiest way to do that?

View 2 Replies

C# - Retrieve The User Requests From A Website Using A Desktop Application?

Dec 18, 2010

had made a site for client in which users can make request for songs, there's a db haing songname, by whome, written by, sang at etc the site is hosted and working fine the way the admin gets to know what is asked for is by using the website but now he wants that there be a desktop application which diplays all the requests so he does not have to log in and use the website..

View 2 Replies

Design Patterns - Singleton Behavior With Multi-user Requests In C#?

Jan 7, 2011

I need to create a singleton that would hold lots of data for a spedesign patterns - Singleton behavior with multi-user requests in ASP.NETcific user. However, I am not unclear as to what the behavior of that singleton is in regard to multi-user app requests.

Here is the scenario:

On AppStart event I want to load common data for all users (from SQL) and store it as a collection somewhere within the ASP.NET storage mechanisms.

If I store that data in the cache, I would also have to create a static property in the Global.asax that would provide access to that the data from the cache.

This is not ideal because whenever an instance of any particular page, or generic handler, or what have you tries to query this data using Linq the property has to load the data from the cache... introducing latency. I need this data to be immediately available. (think of it as about 5K rows of data stored in collection of objects...)

I was thinking to use a singleton to get that data, and store it but I don't know how it would behave between requests (and postbacks), as well as application instances, in terms of its persistence.

On PostAuthenticate event I want to get user specific data from SQL in the form of a collection. If i store it as a singleton (in a similar manner as the common data) i am not clear as to:

How is the data persisted? What is the scope of that singleton (it should be for the duration of the user session). How can I ensure that the data is immediately available to whatever needs to consume it?
What happens between post-backs to that singleton? If another user logs in would another instance of that singleton be created for that specific application instance?

View 1 Replies

Sharing Data Between Two Web Applications?

Oct 14, 2010

I have a web application (MainApplication) where many of the pages contain a custom Web Control that looks for some content in a cache. If it can't find any data within the cache, then it goes out to a database for the content. After retrieving the content, the Control displays the content on the page.

There is a web application (CMS) in a subdirectory within the aforementioned web application. Users use this CMS to update the content pulled in by the MainApplication.

When a user updates some content using the CMS, I need the CMS to clear the relevant portion of the cache used by the MainApplication. The problem is that, as two different web applications, they can't simply interact with the same static cache object.

The ideal solution would be to somehow share an instance of a cache object between both web applications.

Failing that, what would be the best (performance-wise) way of communicating between the two web applications? Obviously, writing/reading to a database would defeat the purpose. I was thinking about a flat file?

View 3 Replies

Data Sharing - .NET - Using Another App's App_data?

Feb 4, 2010

If there is a self contained web app, let's use the Screw Turn Wiki as an example, that utilizes the App_Data to store the MDF, is there any way another web app, living in the same domain, can also use that MDF?

Example IIS Setup:

http://wiki.domain.com | c:webwiki | port 80
http://www.domain.com | c:website | port 80

My WWW web app would like to pull some data from the WIKI app. Without moving the MDF to a full fledged SQL Server is there a way to do this? Also note, the WIKI app is an installed app so I don't have access to its source.

View 2 Replies







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