Select to view content in your preferred language

Javascript sample viewer - Print task error

2523
4
01-15-2014 01:06 PM
GaneshSolai_Sambandam
Regular Contributor
Hi Guys
I have downloaded the JavaScript sample viewer application and I was trying to customizing the print task with our organisation own service to create print web maps. when I use the default print service below  from ArcGIS online 

"http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%2..."
it works perfectly fine.
When I change the printurl property to own print service, it doesn't work. It comes up with error message saying request time exceeded.

I am wondering it might due the proxy settings on my application . Although I followed the procedure as per JavaScript api references proxy settings user guide,  and changed the  config proxyUrl Property in the index.html to : "/proxy/proxy.ashx"

and then in the common.config.js file - changed printTask url property:"to my own print service"

Even though setting all the proxy, it comes with request time exceeded.

I just wanted to ask is there any better way to check whether we implemented on the webserver is communicating well with the application. Can anyone give me guide to check how to test proxy is working properly.

Regards
Ganesh
0 Kudos
4 Replies
JianHuang
Deactivated User
Regarding your question "Can anyone give me guide to check how to test proxy is working properly". You can open a browser, type in the URL "http://host/proxy.ashx?your_print_service_url" to see if the print service rest end point shows up.
0 Kudos
GaneshSolai_Sambandam
Regular Contributor
Regarding your question "Can anyone give me guide to check how to test proxy is working properly". You can open a browser, type in the URL "http://host/proxy.ashx?your_print_service_url" to see if the print service rest end point shows up.


Hi Jian
Thank you very much for reply. But, just wanted to ask, the url format you provided has "host", is this hostname or localhost
or the name of the machine. or host is default for all computers.
this may be silly question, but wanted to be clear.

Regards
Ganesh
0 Kudos
GaneshSolai_Sambandam
Regular Contributor
Hi Jian
Thank you very much for reply. But, just wanted to ask, the url format you provided has "host", is this hostname or localhost
or the name of the machine. or host is default for all computers.
this may be silly question, but wanted to be clear.

Regards
Ganesh


Hi Jian
I tried with  localhost instead of host, http://localhost/proxy/proxy.ashx?yourprintserviceurl
and I am getting the following error from the browser. From the error message, it says proxy.config file is not found, although I have installed the proxy in the C:\inetpub\wwwroot\proxy, where it has proxy.ashx and proxy.config files. Any idea why it is causing problem please. The other possibility is that, since my application runs from visual studio, it is using the Asp.net built in web server and I am not sure to check whether it is running from IIS or ASP.net server.
If I use host, http://host/proxy/proxy.ashx?yourprintserviceurl, the browser ask me to check the host correctly.


Proxy.config file does not exist at application root, or is not readable.
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ApplicationException: Proxy.config file does not exist at application root, or is not readable.

Source Error:


The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

   <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
    <system.web>
        <compilation debug="true"/>
    </system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario. 

Stack Trace:



[ApplicationException: Proxy.config file does not exist at application root, or is not readable.]
   proxy.getTokenFromConfigFile(String uri) +503
   proxy.ProcessRequest(HttpContext context) +140
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +913
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +165



Please help....................


Regards
Ganesh
0 Kudos
GaneshSolai_Sambandam
Regular Contributor
Hi Jian
I tried with  localhost instead of host, http://localhost/proxy/proxy.ashx?yourprintserviceurl
and I am getting the following error from the browser. From the error message, it says proxy.config file is not found, although I have installed the proxy in the C:\inetpub\wwwroot\proxy, where it has proxy.ashx and proxy.config files. Any idea why it is causing problem please. The other possibility is that, since my application runs from visual studio, it is using the Asp.net built in web server and I am not sure to check whether it is running from IIS or ASP.net server.
If I use host, http://host/proxy/proxy.ashx?yourprintserviceurl, the browser ask me to check the host correctly.


Proxy.config file does not exist at application root, or is not readable.
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ApplicationException: Proxy.config file does not exist at application root, or is not readable.

Source Error:


The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

   <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
    <system.web>
        <compilation debug="true"/>
    </system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario. 

Stack Trace:



[ApplicationException: Proxy.config file does not exist at application root, or is not readable.]
   proxy.getTokenFromConfigFile(String uri) +503
   proxy.ProcessRequest(HttpContext context) +140
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +913
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +165



Please help....................


Regards
Ganesh


Hi Guys,
Can you help on this please.

Ganesh
0 Kudos