Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


lavans
2009-05-07T11:55:14Z
Hello ,

I have downloaded Visualcron and i'm trying to use it to POST xml files to a script on a website.

the script is running at http://localhost:2000/Modules/Importer/Import.aspx

i made a job in Visualcron to have this done in a scheduler.

If i POST it manually it works o.k. but i'll get an error 405 NOT OK from the script if this is done with visualcron.

I think visualcron is not seeing the xml files to be posted.

How do i tell visualcron to look in what directory to take the files to POST it to the URL.

Can anybody help me with this ?

Ronald
Sponsor
Forum information
Support
2009-05-07T12:43:12Z
VisualCron bases posting on parameters. So, in your case I would use a Read File Task that reads the XML file into memory. Then you use the Variables to get the output from the first task and specify the parameter you want to post.

Is this a normal HTTP upload or just a parameter post? What command do you use to upload it manually?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
lavans
2009-05-08T08:18:48Z
Thanks for your reply , i will try your suggestion,

the following command i use to "POST" is manually

type %1|post http://localhost:86/Modules/Importer/XMLImport.aspx
this line is in a batchfile wich is in the same folder as the *.XML files.

so the type %1 is for posting *.xml files one by one.
Support
2009-05-08T08:21:19Z
You seem to pipe the type command to a "post" command. What kind of post command is that? Where did you find it?

I am trying to understand what kind and how you post.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
lavans
2009-05-08T08:24:07Z
normally this is the same as

1234.xml|post http://localhost:2000/Modules/Importer/XMLImport.aspx

if i post 1 file
Support
2009-05-08T08:25:53Z
But where did you get the "post" command from? It does not exist as dos command or Visual Studio command by default.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
lavans
2009-05-08T08:33:21Z
Oh , ActivePerl is installed

and there is a system path to the cmd line
Support
2009-05-08T08:37:48Z
OK, and your script Import.aspx. How does it know how to handle the Post? Which variable to you receive in the script?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
lavans
2009-05-08T08:49:22Z
do you mean whats in the xml files ?
Support
2009-05-08T08:52:01Z
No, I mean how your Import.aspx works.

Normally, when you post a value there is a variable at the script that receives the post information.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
lavans
2009-05-08T09:02:06Z
I don't know this , because this is programmed by another company. I can ask them.
Support
2009-05-08T09:18:26Z
Yes, if you could post the "parsing" source part of Import.aspx it would be great to help us how you want the information posted.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
lavans
2009-05-08T09:25:36Z
I asked them via mail , so i'll get back to you later with their answer.
lavans
2009-05-08T12:25:42Z
This is what i got from them........


Sample code of the aspx page in C# 2.0:
=========================================

StreamReader reader = new StreamReader(Request.InputStream);
String xmlDoc = reader.ReadToEnd();

If you now aspx files, in the “<%@ Page” header must add “ValidateRequest="false"” for that it works.

If you send the data URLEncoded, the code decode this (optional):
xmlDoc = HttpUtility.UrlDecode(xmlDoc, Encoding.UTF8);






Support
2009-05-08T14:41:34Z
Thanks. We will check out what might be required from our side.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2009-05-25T23:23:33Z
Please test 5.1.5. where this is implemented. This version currently located in the Beta forum.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
lavans
2009-05-27T12:48:16Z
Hi,

Posting a xml file works now 😁 😁 😁

but stil a question ,

how do i post several (*.xml) files after another and delete them after they are posted.

I want to use a wildcard for the filename.

ronald
Support
2009-05-27T20:13:31Z
Currently we have have no filter/wildcard in that field. The question is what you are trying to accomplish. Most users use the File Trigger to watch a certain folder then use Variabels passed to Tasks like this. Then you can make it dynamic.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
lavans
2009-05-28T09:38:12Z
We want to POST a bunch of XML files one after another.

the problem is that the filenames of the xml files are random so thats why i want to use the wildcard *.xml.

how can i accomplish the one by one POST ?

Support
2009-05-28T09:56:00Z
The question is where the files come from. I assumed you wanted to automate this, not create a one time post?

If you want to automate this you must think in terms - where do my files come from and when do they come?

Either way, you should use the File Trigger to watch the folder where the files come from. Then set "put job in queue" option on the Job. The use the LastTrigger variable to get the file path into your Task.

This way the files will be posted everytime a file hits that directory.

If you, for any reason, want to do this only once you can set it up the same way - and just copy the files to that directory.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
lavans
2009-05-28T13:18:05Z
how to use the LastTrigger variable to get the file path into the Task.

do you have a example ?
lavans
2009-05-28T13:41:47Z
sorry,

i've figured it out , works like a charm indeed.

grtz.

ronald😂
lavans
2009-05-29T09:25:57Z
Hello,

is there a way to extend my trail period, i've 2 days left and we are still testing with the HTML POST process.

Ronald
Support
2009-05-29T09:53:17Z
Please contact Sales for license issues.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top