Objective: I need to run this executable program on this path "\172.168.0.46\Inhouse Module\Michael Panaligan\AllUnit\RunCom.exe" It's working on my local computer but not on IIS Server Side. I don't know why it's not working on IIS Server Side when It's completely fine on my local unit. Thank you.
Here's my script.
Imports System.Diagnostics
Public Class CallLegacyApp Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim networkPath As String = "\\172.168.0.46\Inhouse Module\Michael Panaligan\AllUnit" ' Rename folder without spaces
Dim executablePath As String = "RunCom.exe"
Try
' Map network drive using net use command
Dim netUseStartInfo As New ProcessStartInfo("net.exe", "use " & networkPath & " /USER:nkti\sdg programmers")
Process.Start(netUseStartInfo).WaitForExit()
' Start the program
Dim startInfo As New ProcessStartInfo()
startInfo.FileName = networkPath & "\" & executablePath
Process.Start(startInfo)
Catch ex As Exception
Response.Write("Error: " & ex.Message & "<br/>" & ex.StackTrace)
End Try
End Sub
Here's what I did. Tried to understand Shell and Process.Start function, Did some research and ask AI.
What I'm expecting is to run the executable program on client side computers.