Select to view content in your preferred language

Export Map in Custom Application

746
5
03-01-2011 06:05 AM
francescodi_vito
Deactivated User
Hi guys,
i developed a widget to export my map in a cutom application in flex 4.
this is the script that i used:
public function PrintPDFx():void
   {
    var sURL:String;
    sURL = "http://193.204.163.134/ArcGIS/rest/services/Roma/Carg_Roma/MapServer/export";
    sURL += "?bbox="+myMap.extent.xmin+","+myMap.extent.ymin+","+myMap.extent.xmax+","+myMap.extent.ymax; 
    //sURL+="&layers=";
    sURL+="&size="+myMap.width+","+myMap.height;
    sURL+="&format=pdf";
    sURL+="&trasparent=false";
    //sURL+="&dpi";
    sURL+="&f=image";
    sURL+="&width"+myMap.width;
    sURL+="&height"+myMap.height;
    navigateToURL(new URLRequest(sURL),'_blank');
   }

now i have a problem. this script in another application it's ok. now i my custom application i added a geocoding service and when i click my print function i have a server error. this is the error:
Exception from HRESULT: 0x800706BE code 500
help me
Tags (2)
0 Kudos
5 Replies
RobertScheitlin__GISP
MVP Emeritus
Francesco,

   The url seems to be requiring a login yet you are not supplying one in the url. Did you change the security setting of your IIS for this url?
0 Kudos
francescodi_vito
Deactivated User
thanks Robert. yes i have a user name and pass. i will change it
thanks
0 Kudos
francescodi_vito
Deactivated User
Robert but if i would like to keep the user name and pass?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Francesco,

  I am not sure... I guess you would have to figure out how to pass a token or transmit the user name and password in clear text (probably not the best idea).
0 Kudos
francescodi_vito
Deactivated User
ok thanks Robert
0 Kudos