cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

IIS 7.5 generating empty xml after website is published

mkhan-2
1-Visitor

IIS 7.5 generating empty xml after website is published

Good Morning,

When I run bat file on my local host it runs fine. After publishing it on the server it generates empty XML file this is the command I am running

im viewsegment --xmlapi > test.xml --user="user" --password="Pass" --fields=ID,"Text English" 1235545. I am not sure what needs to be done as I have given all the appropriate permissions on the folder.

Any help will be greatly appreciated.

7 REPLIES 7

Hello Muhammad Khan‌,

I would expect some sort of output, even if the ID is not a valid document item (in which case I'd expect an MKS150782 error).

What happens if you run im viewsegement -g --user="user" --password="Pass" --fields=ID,"Text English" 1235545 ?

Regards,
Kael


Kind Regards,
Kael Lizak

Senior Technical Support Engineer
PTC Integrity Lifecycle Manager

it runs perfectly and produces the results. I am not sure what I have to do in order to Integrity commands runs under IIS because this seems to be only issue that's happening somehow empty xml get created.

dthierjung
12-Amethyst
(To:mkhan-2)

Hello ,

 

what Version of Integrity are you running? Because since 10.7 the option --xmlapi is removed from all cli commands. This was only intended for debuging and was replaced by the mksAPIViewer.exe application. Maybe you use an older client, than the server version and this is why it is working on your local machine?

Look at Kael Lizak's answer to your question here im viewissue question - PTC Community. It might help you get xml output.

 

Regards,

Dominik

Thank you I checked it is 10.6. and when I run it on command prompt it produces results.

Hello Muhammad Khan‌,

Just be aware that what you're doing won't work when you upgrade.  At that point you'll have to use the method Dominik Thierjung‌ referred to, including possibly changing how the XML is parsed (the --xmlapi output doesn't always match out tot he actual XML produced by the API).

Does the user running IIS also have the Integrity client in its %PATH% variable?  Even if it doesn't, I'd expect some sort of error to be returned.  Is there an error logged somewhere by IIS explaining why the results returned are blank?  If you run other CLI commands through IIS, do you get any results?

Regards,
Kael


Kind Regards,
Kael Lizak

Senior Technical Support Engineer
PTC Integrity Lifecycle Manager

Hi Kael,

I change my bat file with the following which was running fine when I run it through command prompt. but when I tried and run the command from my website sometimes it give "unauthorized user" and sometimes nothing at all and generate empty xml file. I even enabled error logs and that's how I figured out.

mksAPIViewer.exe --iplocal --xml> %1test.xml im viewsegment  --fields=ID,"Text English" 1235545

Hello Muhammad Khan‌,

I'm not sure what to suggest at that point.  It sounds like you should probably open a case with Integrity LM Support.

Regards,
Kael


Kind Regards,
Kael Lizak

Senior Technical Support Engineer
PTC Integrity Lifecycle Manager
Announcements


Top Tags