Frequent Message Requests and File Upload leads to WAS warning - WCF application

Operating System: Windows Server 2012 Standard R2
IIS Version: 8.5
ASP.NET version: 4.0
.NET Framework: 4.5

We have developed a ASP.NET/WCF application using basicHTTPBinding. This ASP.NET/WCF application exposes two methods
- to receive messages.
- to receive files (max 1MB)
The above WCF application is hosted in Server2 (shown in diagram below).

To consume the exposed method by WCF application, we have developed a ASP.NET application that is hosted in Server1. This ASP.NET application receive messages from client in the form of querystring in .aspx and send the querystring content to Server2 using the receive message exposed method. The querystring is loaded into the ASP.NET application by using Page class provided by .NET.This ASP.NET application consumes the WCF exposed method by constructing it's own SOAP envelope. Constructing a SOAP envelope involves creating a request header with SOAPAction that needs to be called and of course with correct parameters. Then a http request is sent to Server2 via HttpWebRequest. The responses from Server2 are captured using Webresponse. For our case the response that we receive is in the XML format. Thus, we parse in the XML into XmlTextReader and read to the descendent inorder to get the response value.

The overall architecture shown below:

Communication Architecture

Client  <------M1-----> Server1 <-----M2----> Server2

Client: sends a querystring message/file using .aspx
M1: http://Server1/msg.aspx?querystringcontent
Server1: receives M1 and send to Server2 through exposed methods.
M2: http://Server1/Service1.svc
Server2: receives M2 from Server 2 on ASP.NET/WCF application.

Sample request header :

HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);            
            req.Method = "POST";
            req.Headers.Add("SOAPAction", @"" + SOAPAction);
            req.Accept = "text/plain";
            req.ContentType = "text/xml;charset=utf-8";

Sample SOAP Envelope created :

"<?xml version=""1.0"" encoding=""utf-8""?>"
                                    + @"<soap:Envelope xmlns:xsi=""""                                    

xmlns:xsd="""" xmlns:soap="""">"
                                    + " <soap:Header></soap:Header>"
                                    + "<soap:Body>"
                                    + " <" + SOAPAction + @" xmlns="""">"
                                    + " <message>" + Message + "</message>"
                                    + @" </" + SOAPAction + ">"
                                    + @" </soap:Body>"
                                    + @" </soap:Envelope>");

We set the default application pool settings for the site.

The above communication works fine for a few hours until errors and warning start to appear in Windows Event Logs. Also, the Web Service throws the following error code

"HTTP Error 503 - Service unavailable".

Warning #1
Event ID: 5011
Source: Microsoft-Windows-WAS
"A process serving application pool 'x' suffered a fatal communication error with the Windows Process Activation Service. The process id was 'xx'. The data field contains the error number."

Error #1
Event ID: 5002
Source: Microsoft-Windows-WAS
"Application pool 'XXXXXXXXXX' is being automatically disabled due to a series of failures in the process(es) serving that application pool."

Could you please shine some light regarding this issue that we are facing. Below are list of questions that would help us understand better on the issue.

1) Do we need to change the IIS configuration or remain as default settings?
2) Does the type of binding we use affects the performance of our application?
3) Is WCF technology feasible for high amount of requests at a short time interval?
4) What are the limitation of WCF?

Thank you so much. We really appreciate any thoughts and help you guys can offer.
Viknes RajAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Fareed Ali KhanCommented:
Application crash is causing the App Pool crash. You need to check your application why it is crashing. And what are the errors from application log. Share the application logs or errors call stack.
Bob LearnedCommented:
You have a difficult situation to overcome, and it is even more difficult for us on the outside.

Debugging help:

1) HOWTO: Understand and Diagnose an Application Pool Crash

Personally, I always attach a debugger to gather a stack trace whenever I suspect a crash. Depending on your debugging skills, this can tell you a whole lot of info, sometimes sufficient to directly fix the issue. Guessing at solutions based on non-specific symptoms can never do this reliably. It is all up to you. :-)

2) Debug Diagnostic Tool

How to use the Debug Diagnostics tool to troubleshoot an IIS process that stops unexpectedly

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
To get more information on the WCF service side error, enable tracing using this link,

Can we know why ur creating your own SOAP action ? instead of creating proxy or ChannelFactory to access your wcf service ?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.