Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

The RTC SCM line command doesn't work inside a web application. Am I missing any configuration?

The RTC SCM line command doesn't work inside a aspx web application but it works in this Server machine when I call the same line command from a  Windows (DOS) prompt .
I'm using a Windows Server 2012 R2 with IIS 8.5
This is the c# call:

ProcessStartInfo processStartInf = new ProcessStartInfo("cmd.exe");
            processStartInf.RedirectStandardInput = true;
            processStartInf.RedirectStandardOutput = true;
            processStartInf.UseShellExecute = false;
            processStartInf.StandardOutputEncoding = Encoding.GetEncoding(860);
            Process processs = Process.Start(processStartInf);

           processs.StandardInput.WriteLine("PATH C:\\Program Files\\IBM\\RTCClient\\jazz\\scmtools\\eclipse;%path%");

           processs.StandardInput.WriteLine("CD C:\\Program Files\\IBM\\RTC Client\\jazz\\scmtools\\eclipse");
           processs.StandardInput.WriteLine("scm list baselines -w 1000 -C 1061 -r https://rtcRepository/ -u username -P password -m 1");
          
           string pp = processs.StandardOutput.ReadLine(); 
           
           processs.StandardInput.Close(); // line added to stop process from hanging on ReadToEnd()
             
           string outCmd = (processs.StandardOutput.ReadToEnd());
         

0 votes


Accepted answer

Permanent link
 Thank  you.
I found the answer:
- the Web Appication that uses scm command line needs in the IIS Application Pool an Identity that has to be configured with a RTC user as Custom Account. 
Ralph Schoon selected this answer as the correct answer

0 votes


One other answer

Permanent link
1. The question lacks any information that would allow to answer any question, there is no error log or even a version number
2. I have called processes but I am not aware of the specific call technique above would work or maybe block on any input or output pipe
3. I don't know what data you can access from the web application, these days web applications do not necessarily allow to execute from arbitrary folders as this would help malware
4. It is in general not a good idea to install into Program Files as this is a folder structure that is specially protected e.g. you will fail to create folders in the application if it is not explicitly run with runAs Admin

 processs.StandardInput.WriteLine("PATH C:\\Program Files\\IBM\\RTCClient\\jazz\\scmtools\\eclipse;%path%"); has no space, the next line has one in "CD C:\\Program Files\\IBM\\RTC Client\\jazz\\scmtools\\eclipse"  

0 votes

Comments
1 -  I don't have any kind of event registered on the EventViewer to show you, it isn't an error 
2 - during development in another machine  while debbugin it works well as a web application at LocalHost 
3 - I access the rtc repository  through Windows (DOS) prompt in the same server it is deployed and using the same command of the application  but it doesn't  work via web without any error message
4 - I don't need to use files yet , first I only need to get response of the scm command line
It seems you are right and maybe the web applications are not necessarily allowed to execute .exe commands like scm to improve security.
Do you know any IIS or Windows or other configuration that can be done to permit this type of execution?

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Aug 22 '16, 8:28 a.m.

Question was seen: 2,575 times

Last updated: Aug 25 '16, 2:45 p.m.

Confirmation Cancel Confirm