web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to run an AX .exe file after it's has been hosted in IIS ?

(0) ShareShare
ReportReport
Posted on by 135

Hi All,

I have created one web application.  To open AX.exe , I have used the below code ,

Process cmd = new Process();
cmd.StartInfo.Verb = "runas";
string commandToExecute = @"ax32.exe -startupcmd=AOTImport_C:\Table_DM.xpo";
Process.Start(@"cmd", @"/c " + commandToExecute);

This is working fine before hosting this web application.

After Host into IIS it doesn't work.

Please help me to do.

Thanks,

Karthick.M

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    300,904 Super User 2025 Season 2 on at

    Hi Karthick,

    What are you trying to achieve here? Note that AX2009 is NOT a web application.

  • karthickarden Profile Picture
    135 on at

    Hi Andrew,

    yes, i understand that AX2009 is not a web application. My requirement is to open the AX Client programatically using C# code. For this i created a new web application and tried the below code:

    Process cmd = new Process();

    cmd.StartInfo.Verb = "runas";

    string commandToExecute = @"ax32.exe -startupcmd=AOTImport_C:\Table_DM.xpo";

    Process.Start(@"cmd", @"/c " + commandToExecute);

    This is perfectly working when i excecute the above code. But when i host this in IIS, the code is not working.

    Do we have any other option to open AX Client programatically but not manually.

  • André Arnaud de Calavon Profile Picture
    300,904 Super User 2025 Season 2 on at

    You can try to use the business connector instead, but I wonder if this supports importing of XPO's. You cannot start AX.exe in a web application. AX.exe is a client program.

  • Nabil Abdelrahman Profile Picture
    1,551 on at

    Make sure you have C:\Table_DM.xpo available on same IIS server as well .

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    I do not think what you want is as trivial, since IIS is a server-bound process. After a quick search I found suggestions like this:

    forums.asp.net/.../1124574.aspx

    You should try other forums that are related to web services, since this is not an AX problem.

  • Suggested answer
    Nabil Abdelrahman Profile Picture
    1,551 on at

    This assumes the exe is somewhere you know on the user's computer:

    <a href="javascript:LaunchApp()">Launch the executable</a>

    <script>

    function LaunchApp() {

    if (!document.all) {

     alert ("Available only with Internet Explorer.");

     return;

    }

    var ws = new ActiveXObject("WScript.Shell");

    ws.Exec("C:\\Windows\\notepad.exe"); -- replace with AX.exe on client folder

    }

    </script>

  • karthickarden Profile Picture
    135 on at

    Thanks for your valuable answer..

  • Nabil Abdelrahman Profile Picture
    1,551 on at

    Hi karthickarden

    Can you please mark the correct answer as suggested solution ?

    Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans