• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 528
  • Last Modified:

Application Extension Mapping IIS

Windows 2003 Server running IIS for our intranet.  We have two executable files that we need to create links to from a web page for the end user to be able to execute.  We've tried many methods already and have not been successful.  The only time that it's worked is if we pointed the executable to another server on the LAN.  It will not run on the local IIS server.  We read somewhere that there had to be application extension mapping for executables to run.  We've had no success doing so.  Can someone please assist us with the application extension mapping or another proper way to get these executables to launch from a web page?

Thanks.
0
Jess Tolson
Asked:
Jess Tolson
2 Solutions
 
nightmare2Commented:
I don't know if I understand correctly but to run executables in IIS6, you have to go to
IIS Manager > Web Service extension and Allow 'All Unknown CGI Extensions'
Or you can 'Add a new web service extension' .exe, browse to your executables and set the status to allowed.
0
 
Gary DavisDir Internet SvcsCommented:
You need to use System.Diagnostics.Process(). An example, to run RoboCopy to copy files when a user decides to deploy them to various servers. The user on a web page clicks a link or button which posts back to the web server. The web server then runs an executable on that server.

An example follows. This came from http://www.freevbcode.com/ShowCode.asp?ID=5879

Public Sub ShellandWait(ByVal ProcessPath As String)
        Dim objProcess As System.Diagnostics.Process
        Try
            objProcess = New System.Diagnostics.Process()
            objProcess.StartInfo.FileName = ProcessPath
            objProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
            objProcess.Start()

            'Wait until the process passes back an exit code
            objProcess.WaitForExit()

            'Free resources associated with this process
            objProcess.Close()
        Catch
            MessageBox.Show("Could not start process " & ProcessPath, "Error")
        End Try
    End Sub
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now