Video Screencast Help

Unable to attach multiple files in Change Request

Created: 06 Jun 2013 | 4 comments
snm1502's picture

Hi,

If we attach multiple files (combined size within allowed limit i.e. <4 MB) at first screen (Feeder Form) of Change Management it never generates the number. Attaching one file works fine. Below are the findings of the investigation:

1. Error Logs (please refer below) refer to IIS. Upon investigation found couple of links guiding to modify web.config files. I have added executiontimeout and maxrequestlength with reasonable values in both Feeder and Main CM workflows, still no luck.

Error,Friday, June 07, 2013 3:25:30 AM,Exception at Run method with message :System.Web.Services.Protocols.SoapException: There was an exception running the extensions specified in the config file. ---> System.Web.HttpException: Maximum request length exceeded.
   at System.Web.HttpRequest.GetEntireRawContent()
   at System.Web.HttpRequest.get_InputStream()
   at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
   --- End of inner exception stack trace ---
   at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
   at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response)
   at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)

 

Reference Link: http://www.easyalgo.com/knowledgebase/system.web.httpexception-maximum-request-length-exceeded.aspx

2. While debugging the project we found that the array that is holding multiple files is not completely readable to SubmitChangeTicket component. i.e. if 2 files are attached it will be stored as below:
AttachedFiles = array
 [0] Doc 1.doc : 562176
 [1] Doc 2.doc : 2941952

In the exception logs found while in Debug mode, Doc 1 is not readed and it jumps to Doc 2 directly. Not sure if my understanding is correct, please refer to below logs:

ExceptionComponentClassName = "SD.Components.ServiceCalls.SubmitChangeTicket"
ExceptionComponentName = "Submit ChangeTicket"
ExceptionTriggerComponentID = "xxxxxxxxxxxxx"
ExceptionTriggerExceptionClassName = "System.Web.Services.Protocols.SoapException"
ExceptionTriggerMessage = "System.Web.Services.Protocols.SoapException: There was an exception running the extensions specified in the config file. ---> System.Web.HttpException: Maximum request length exceeded.
   at System.Web.HttpRequest.GetEntireRawContent()
   at System.Web.HttpRequest.get_InputStream()
   at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
   --- End of inner exception stack trace ---
   at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
   at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response)
   at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)"
ExceptionTriggerStackTrace = "System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: There was an exception running the extensions specified in the config file. ---> System.Web.HttpException: Maximum request length exceeded.
   at System.Web.HttpRequest.GetEntireRawContent()
   at System.Web.HttpRequest.get_InputStream()
   at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
   --- End of inner exception stack trace ---
   at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
   at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response)
   at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at SD.Components.ServiceDeskChangeManagement.ChangeManagement.SubmitChangeTicketAndReturnPID(ChangeRequest NewChangeRequest, FileDataType[] AttachedFiles)
   at SD.Components.ServiceCalls.SubmitChangeTicket.Run(IData data)
   at LogicBase.Core.ExecutionEngine.SinglePathProcessComponentExecutionDelegate.Execute(IData data, IOrchestrationComponent comp, String& outputPath, IExecutionEngine engine, TLExecutionContext context)
   at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.RunComponent(TLExecutionContext context, IData data, IOrchestrationComponent comp)"
fileListUndoHolder = array

FileToAdd = Doc 2.doc : 2941952
HTTP_INPUT_PARAMS = array

Thanks in advance for any guidance / reference / tips.

Thanks
snm1502

Operating Systems:

Comments 4 CommentsJump to latest comment

reecardo's picture

I would boost maxRequestLength to the largest value allowed (I think max val is 2097151, but I could be wrong), if you havent done so already

snm1502's picture

Hello Reecardo,

Thanks for the response.

Have entered executiontimeout as 300 and maxrequestlength as max value. That worked in first test. However, would be performing couple of more tests. Will keep you all updated.

Still, if we set the maxrequestlength to max, wouldn't be a problem, because if a user unknowningly attaches a file larger than allowed limit (4 MB in our case) that will still go?

Thanks
snm1502

snm1502's picture

Hello,

Test failed in our PROD environment and returned the same error. PFB are the logs of unhandled exception task in CR for reference:

The following unhandled exception has occured in the Change Management process.  Please choose which step of the process to return this request.  If you do not want to continue this process you can choose to end the process now.

At Component: Add Data For Process (Non Cached)

Error Message: Execution Engine Exception

Stack Trace: System.Exception: Execution Engine Exception ---> System.Exception: Execution Exception ---> System.Net.WebException: The operation has timed out at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request) at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at LogicBase.Core.Ensemble.DocMan.Docman.AddDocument(String sessionID, DocumentInfo documentInfo, String[] categoryIDs, DocumentPermission[] permissions, Int32 releaseVersion, Int32 majorVersion, Int32 minorVersion, Byte[] versionData, String versionNotes, DocumentKeyValuePair[] pairs) at LogicBase.Components.Ensemble.AddDocument.Run(IData data) at LogicBase.Core.ExecutionEngine.SinglePathProcessComponentExecutionDelegate.Execute(IData data, IOrchestrationComponent comp, String& outputPath, IExecutionEngine engine, TLExecutionContext context) at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.RunComponent(TLExecutionContext context, IData data, IOrchestrationComponent comp) --- End of inner exception stack trace --- at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.RunEngine(List`1 executionQueue) --- End of inner exception stack trace --- at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.RunEngine(List`1 executionQueue) at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.ExecuteComponent(IData data, IOrchestrationComponent component) at LogicBase.Core.Models.EmbeddedDecisionModel.EmbeddedDecisionModelExecutionEngine.Run(IData data) at LogicBase.Components.Default.Process.EmbeddedModelComponent.Run(IData data) at LogicBase.Core.ExecutionEngine.SinglePathProcessComponentExecutionDelegate.Execute(IData data, IOrchestrationComponent comp, String& outputPath, IExecutionEngine engine, TLExecutionContext context) at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.RunComponent(TLExecutionContext context, IData data, IOrchestrationComponent comp)

Any guidance / references / advise???

Thanks
snm1502

snm1502's picture

Adding to above, if we attach any file (single / multiple) at the first screen while raising a CR, it generates a number however, goes to Exception state.

Any guidance / reference would be of great help.

Thanks
snm1502