How To Run an exe file ASP.NET Core Web API

Поділитися
Вставка
  • Опубліковано 17 лис 2024

КОМЕНТАРІ • 19

  • @DriveU836
    @DriveU836 Рік тому +2

    I have Executables in UNC Path mapped on my Local machine.
    How can I run the .exe within these Folders from my ASP.NET Core Web API?
    Can you help me on this ASAP, please

    • @intcoder
      @intcoder  Рік тому

      Make sure you set workingDirectory to your UNC directory path. Just the path not the filename.

    • @DriveU836
      @DriveU836 Рік тому

      @@intcoder can you elaborate a bit please. I have already mentioned that these paths have been mapped to my local Machine. Working Directory??

    • @intcoder
      @intcoder  Рік тому

      @@DriveU836 @ 7:17 i explain what you need todo.

  • @coding-gemini
    @coding-gemini Рік тому

    Thanks for the tutorial. I was able to run the exe but there is an indefinite wait for the process to complete, its like the until i end the process (like hit the stop button on vs) the process is not ending. Any clue how to timeout if the exe does not respond back ?

  • @saurovthakur4069
    @saurovthakur4069 Рік тому +2

    But will this work if hosted in IIS...I failed to do so

    • @intcoder
      @intcoder  Рік тому

      Yes it will work if hosted.

    • @saurovthakur4069
      @saurovthakur4069 Рік тому

      True. I hosted a .net 6 web app in Win server running IIS and from within a Page btnclik trying to run a bat file having script to run/open notepad.exe. The bat file is getting called but notepad is not opening...do we need to apply some setting in IIS...i m not sure.

    • @intcoder
      @intcoder  Рік тому

      @@saurovthakur4069 make sure to follow instructions on 6:08 by using the workingdirectory property to the correct location of the exe

    • @saurovthakur4069
      @saurovthakur4069 Рік тому

      @@intcoder Ah! yes, 'otherwise its not gonna work'...got it.. Thnx .. will attempt a retry.

  • @SuhendraYohanaPutra
    @SuhendraYohanaPutra Рік тому +2

    Where I can find WebAPIConsole.exe on this project?

  • @toby645pa
    @toby645pa 8 місяців тому

    How to change the url and Port? Currently: 44386/api/test . But would like to have something like 44331/api/myCode
    And idea?

    • @intcoder
      @intcoder  8 місяців тому +1

      You can change the port number by updating launchSetting.json file.

    • @toby645pa
      @toby645pa 8 місяців тому

      @@intcoder but the url is not possible?

    • @intcoder
      @intcoder  8 місяців тому +2

      you just have to create another controller with your "myCode" name myCodeController@@toby645pa

    • @toby645pa
      @toby645pa 8 місяців тому +1

      @@intcoder best thanks for your support, you're the best!!!

  • @intcoder
    @intcoder  2 роки тому +2

    ASP.NET Web API Version
    ua-cam.com/video/hOArQa6XD1w/v-deo.html