Jump to content
RajeshRayudu

Worked in Local host, but not in IIS

Recommended Posts

Hi, 

I am running an exe file through Autoitx in dotnet core Api. It is working fine in local, but when I deployed in IIS, it is not working. Window is not getting focussed. I tried WinActive command, but no luck. Please help me

Share this post


Link to post
Share on other sites

Sorry for that. 

This is the code I have tried. 
 

                AutoItX.Run("C:\\Program Files (x86)\\RAMAS Risk Calc 4\\RiskCalc.exe", "C:\\Program Files (x86)\\RAMAS Risk Calc 4");
                AutoItX.Sleep(15000);

                AutoItX.WinActivate("Risk Calc", "");
                AutoItX.WinSetOnTop("Risk Calc", "", 1);

                AutoItX.ControlSetText("Risk Calc", "", "[CLASSNN:TSRichEdit1]", "Sending");

                AutoItX.Send("Text");


                var response = AutoItX.ControlGetText("[Class:TMainForm]", "", "[CLASSNN:TSRichEdit1]");

                IntPtr winHandle = AutoItX.WinGetHandle("Risk Calc");

                AutoItX.WinKill(winHandle);

 

In localhost, I am getting response as "Sending Text", but in hosted environment, getting empty string as response. 
Please let me know if you need more information

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...