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


Similar Messages:

WCF / ASMX :: Web Service Process In Parallel Support?

Mar 14, 2011

I am seeking your expertise in ASP.Net with regards to multi-thread support of WebService in a scenario , that is If a WebService-Client is making simultaneous calls from the same process, the requests will be serialized at the WebServices so that only one-call will execute at any one time , on the contrary, if those calls are sent from different WebService-Clients ( Instances/Processes) , they are processed in-parallel by WebServices.

Have you ever experienced the same with ASP.Net, and what configurations/Settings should be followed, in order for a WebServices to concurrently process simultaneous calls form a single WebClient , when deploying a large number of Web-Clients' instances/processes is impractical in a project-context.

View 1 Replies

IIS 7 To Process The Request Queue In Parallel?

Apr 20, 2010

Currently we are developing an ASMX, ASP 2.0, IIS 7 web service that does some calculations (and return a dynamically generated document) and will take approx. 60 seconds to run.Since whe have a big machine with multiple cores and lots of RAM, I expected that IIS tries its best to route the requests that arrive in its requests queue to all available threads of the app pool's thread pool.But we experience quiet the opposite:When we issue requests to the ASMX web service URL from multiple different clients, the IIS seems to serially process these requests. I.e. request 1 arrives, is being processed, then request 2 is being processed, then request 3, etc

View 2 Replies

WCF / ASMX :: WCF Deadletter Queue Service Stops Picking Up Messages

Dec 15, 2010

I have a custom dead letter queue service to pick up messages from DLQ. This service picks up failed message from DLQ and tries to resend to a different end point. If the new endpoint doesn't work, it rolls back transaction. This works great. Here is the code.

{
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single,
ConcurrencyMode = ConcurrencyMode.Single,
AddressFilterMode = AddressFilterMode.Any)]
public class FDPDLQService : IFDService
{
FDPManager _fdpManager = new FDPManager();
[OperationBehavior(TransactionScopeRequired = true, TransactionAutoComplete = true)]
public void ProcessFDMessage(FDMessage message)
{
//System.Diagnostics.Debugger.Launch();
try
{
MsmqMessageProperty mqProp =
OperationContext.Current.IncomingMessageProperties[MsmqMessageProperty.Name] as MsmqMessageProperty;
// if message log required, and configured, log the incoming message
try
{
ChannelFactory<IFDPRouter> factory = new ChannelFactory<IFDPRouter>("IFDPRouter_EP");
IFDPRouter proxy = factory.CreateChannel();
string ep = proxy.GetNextEPForGivenEP(OperationContext.Current.IncomingMessageHeaders.To.ToString());
if (ep == null || ep == string.Empty)
{
throw new EndpointNotFoundException(Common.Constants.FDP_NOT_FOUND_EXCEPTION_MESSAGE);
}
// Process message with next end point available
_fdpManager.ProcessFDMessage(message, ep);
}
catch (EndpointNotFoundException enfe)
{
ExceptionManager.HandleException(enfe);
Transaction.Current.Rollback();
//throw;
}
catch (Exception ex)
{
ExceptionManager.HandleException(ex);
Transaction.Current.Rollback();
//throw;
}
}
}
}

Below is config entries.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<netMsmqBinding>
<binding name="DLQServiceBinding" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" deadLetterQueue="Custom" customDeadLetterQueue ="net.msmq://localhost/private/FDPDLQ"
durable="true" exactlyOnce="true" maxReceivedMessageSize="65536"
maxRetryCycles="2" receiveErrorHandling="Fault" receiveRetryCount="5"
retryCycleDelay="00:30:00" timeToLive="00:01:00" useSourceJournal="false"
useMsmqTracing="false" queueTransferProtocol="Native" maxBufferPoolSize="524288"
useActiveDirectory="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport msmqAuthenticationMode="WindowsDomain" msmqEncryptionAlgorithm="RC4Stream"
msmqProtectionLevel="Sign" msmqSecureHashAlgorithm="Sha1" />
<message clientCredentialType="Windows" />
</security>
<!--deadLetterQueue="System">-->
</binding>
<binding name="DefaultBinding" >
<security mode="None" />
</binding>
<binding name="FDService_EP" closeTimeout="00:01:00" openTimeout="00:01:00" deadLetterQueue="Custom" customDeadLetterQueue ="net.msmq://localhost/private/FDPDLQ"
receiveTimeout="00:10:00" sendTimeout="00:01:00"
durable="true" exactlyOnce="true" maxReceivedMessageSize="65536"
maxRetryCycles="2" receiveErrorHandling="Fault" receiveRetryCount="5"
retryCycleDelay="00:30:00" timeToLive="00:01:00" useSourceJournal="false"
useMsmqTracing="false" queueTransferProtocol="Native" maxBufferPoolSize="524288"
useActiveDirectory="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport msmqAuthenticationMode="WindowsDomain" msmqEncryptionAlgorithm="RC4Stream"
msmqProtectionLevel="Sign" msmqSecureHashAlgorithm="Sha1" />
<message clientCredentialType="Windows" />
</security>
</binding>
<binding name="FDChecking_EP" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" deadLetterQueue="System"
durable="true" exactlyOnce="true" maxReceivedMessageSize="65536"
maxRetryCycles="2" receiveErrorHandling="Fault" receiveRetryCount="5"
retryCycleDelay="00:30:00" timeToLive="1.00:00:00" useSourceJournal="false"
useMsmqTracing="false" queueTransferProtocol="Native" maxBufferPoolSize="524288"
useActiveDirectory="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport msmqAuthenticationMode="WindowsDomain" msmqEncryptionAlgorithm="RC4Stream"
msmqProtectionLevel="Sign" msmqSecureHashAlgorithm="Sha1" />
<message clientCredentialType="Windows" />
</security>
</binding>
</netMsmqBinding>
<netNamedPipeBinding>
<binding name="Teletrac.EFX.Interfaces.FDService.IFDPRouter" />
</netNamedPipeBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="DLQServiceBehaviour">
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="Teletrac.Customer.Services.FDPDLQService.FDPDLQService" >
<endpoint address="net.msmq://localhost/private/FDPDLQ" binding="netMsmqBinding"
contract="FDPServiceRef.IFDService"
bindingConfiguration="DefaultBinding"></endpoint>
</service>
</services>
<client>
<endpoint address="net.msmq://localhost/private/fdmessageQueue"
binding="netMsmqBinding" bindingConfiguration="DLQServiceBinding"
contract="FDPServiceRef.IFDService" name="FDService_EP" />
</client>
</system.serviceModel>
</configuration>

This works great.

But if all endpoints are not available for a long period of time, and if service rolls message back to the DLQ for a long period of time, after a certain period of time service stops picking up messages from DLQ. I am not sure which configuration is responsible for this.

View 2 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

How Parallel Requests Are Processed?

Oct 21, 2010

Let's imaging there are 2 pages on the web site: quick and slow. Requests to slow page are executed for a 1 minute, request to quick 5 seconds.Whole my development career I thought that if 1st started request is slow: he will do a (synchronous) call to DB... wait answer... If during this time request to quick page will be done, this request will be processed while system is waiting for response from DB.[URL] One instance of the HttpApplication class is used to process many requests in its lifetime. However, it can process only one request at a time. Thus, member variables can be used to store per-request data.Does it mean that my original thoughts are wrong?Could you please clarify what they mean? I am pretty sure that thing are as I expect...

View 2 Replies

Webservice And Two "parallel" Requests From Client

Nov 5, 2010

I have such a problem. Suppose we have a client (WinForms app), which invokes some methods from webservice. Every 5 minutes (Interval of Timer) I invoke asynchronously webmethod A. Suppose that time of its execution take a 1 minute. When this operation runs, I open some Window, and invokes webmethod B synchronously... or i try to do it. Application suspended, wait until webmethod A ends, then process webmethod B (or I have an exception - Connection was closed, or Timeout...). Is there any possibility to run this A, B webmethods 'parallel'?

View 1 Replies

WCF / ASMX :: Multiple Classes In Single Web Service?

May 19, 2010

want to create one web service but I have many classes. I want to call all classes in single wsdl.For example [Assume web service implemented in this class]

[Code]....

my Asmx file is User.asmx.Now when I add webservice reference in website, I want to access as following way

[Code]....

View 8 Replies

ASMX :: How To Write Self Hosting For Wcf Service With Multiple Svc File

Dec 23, 2010

How to write self hosting for wcf service with multiple svc file ServiceHost myServiceHost = null;

View 1 Replies

WCF / ASMX :: Creating .Net Web Service To Send Multiple XML Files

Apr 27, 2010

I have to define a web method which will fetch XML documents from another web service based on the list of projects from the database. Now I need to send these XML documents in different SOAP envelopes. XML documents can be more than one.

View 1 Replies

WCF / ASMX :: Hook Multiple Role Providers With One Service?

Sep 10, 2010

Is it possible to hook multiple role providers with one service? I want client A to connect to service A with roleprovidername A & client B to connect to service A with roleprovidername B

View 3 Replies

JQuery :: Call Asmx Service That Returns Multiple Data

Mar 3, 2011

I want to call .asmx service from jquery

.asmx service will return multiple data from database.

I need to get those data to jquery on client side

and then i need to put each data into their respective textfield on the client side

View 6 Replies

MVC :: Asynccontroller Multiple Tasks In Parallel Failed Sometime?

Jul 29, 2010

I am experimenting AsyncController feature. What I did is set up two tasks to run in parallel. As in the code below, the problem is that sometime all tasks finished and return successfully, sometime only one task finish and sometime each task finish half of it's work and return. It is weird, what did I do wrong?

[Code]....

View 29 Replies

C# - Shared Messaging Queue For Multiple Worker Threads In IIS?

Nov 1, 2010

I'm currently trying to interface our new intranet (ASP-MVC) with the web front end of our pager system. The pager system's front end is about 10 years old, poor interface and no documentation. To do this I have the form on the intranet post to the server, our server then sends an HTTP POST to the pager server that mimics what its own form sends.

While testing this for overloading (we sent about 10 messages almost concurrently) the pager server crashed, as the system is a black box and the only difference we noticed was the concurrent POSTs the least we can do is try to prevent this happening.I want to have all messages go into a queue that sends at most once every 5-10 seconds but I'm not sure how to implement this,

I didn't specify this earlier but the process should be synchronous from the point of view of the browser, ie webserver gets the http POST request from the browser, message is put into the queue, message is sent from the queue, webserver sends http response to the browser. This is not a high volume service and I expect simultaneous requests to be rare so response will be near instantaneous, it is more of a throttle to prevent potential issues with concurrent requests.

View 2 Replies

MVC :: Getting Error With Multiple Subscriber Listening The Same Publisher Queue Using NService Bus

May 3, 2010

I was working with asp.net + nservice bus Its working fine with one subscriber but when I specify another subscriber in webconfig It throws me error.

<UnicastBusConfig>
<MessageEndpointMappings>
<add Messages="EmailChannel" Endpoint="MyServerInputQueue"/>[code]....

View 5 Replies

Queue Access To The Database To Avoid Multiple Cache Items?

Jun 7, 2010

I have a music related ASP.NET web site which caches a lot of static information from the database on the first request.Sometimes, the application is reset and cache is cleared while the application is on heavy load and then all http requests go to the database to retrieve that static data and cache it for other requests.

How can I ensure that only one request go to the database and cache the results, so that other request simply read that info from cache and not needlessly retrieve the same info over and over again.Can I use thread locking? For example, can I do something like lock(this) { db access here }?

View 2 Replies

JavaScript - Multiple Create Requests Means Multiple Button Click Events For The Same Time?

Oct 19, 2010

I have a form which inserts data in DB on Submit button click but the problem is when client click the button multiple times its sends multiple create requests means multiple button click events for the same time of same data, which must not be.

I tried to disable the button when client click the Submit button first time but after this it does not call server click event handler or not fire the server click event once it got disabled.

How to handle this multiple click problem..

I used the following code to disable the button

[code]....

View 3 Replies

Wcf Will Then Check For New Queue And Using Teh Queue To Send Out A Sms?

Dec 21, 2010

Currently i'm developing an apllication that sends sms via the asp.net. I'm using msmq for the queuing incase of multiple sending of sms. The wcf will then check for new queue and using teh queue to send out a sms. I've a few question.How do i create a new queue for the msmq via asp.net

View 1 Replies

C# - Multiple Asp Requests From Multiple Clients Share Information?

Dec 9, 2010

Imagine a website where individual clients can see each-other's presence - like a social network or a chatroom.

For example:

Client1 connects to my website.The back-end C# code updates a static field to indicate Client1's presence.
Client2 connects to my website.Will the back-end C# code for the second request see the information stored in the static field from the first request? Is there anything I need to do to guarantee that these seperate instances of my ASP application are sharing static data?

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

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







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