PrintTask not working with proxy.ashx, 500 Error

5160
2
Jump to solution
01-21-2015 02:42 PM
DaveHighness1
New Contributor II

I am using the ArcGIS Server Javascript API PrintTask Execute with the proxy.ashx file based proxy. The PrintTask is Synchronous and often takes 30 seconds or more to complete. I am getting a 500 Error from the proxy.ashx after about 30 seconds. If I turn off a bunch of the layers and run it, it takes less than 30 seconds and completes. I have not found a way to keep the proxy.ashx from timing out. Any ideas?

Thanks, Dave

0 Kudos
1 Solution

Accepted Solutions
DaveHighness1
New Contributor II

I figured out the problem. I did two things:

Added this to the web.config of the proxy.ashx application:

<configuration>

     <system.web>

          <httpRuntime executionTimeout="180"/>

     <system.web>

</configuration>

This site is also behind an IIS Reverse Proxy which had a request timeout of 30 seconds. So I went to the Server Farm setting on the proxy machine and changed the proxy timeout from 30 seconds to 180 seconds.

Between the two settings it now works.

View solution in original post

0 Kudos
2 Replies
DaveHighness1
New Contributor II

The proxy.ashx is working fine with all the other requests.

Gad, I wish PrintTask.execute() used Post instead of Get! Sticking web maps into the URL seems kinda ridiculous!

DaveHighness1
New Contributor II

I figured out the problem. I did two things:

Added this to the web.config of the proxy.ashx application:

<configuration>

     <system.web>

          <httpRuntime executionTimeout="180"/>

     <system.web>

</configuration>

This site is also behind an IIS Reverse Proxy which had a request timeout of 30 seconds. So I went to the Server Farm setting on the proxy machine and changed the proxy timeout from 30 seconds to 180 seconds.

Between the two settings it now works.

0 Kudos