I'm using vb 2008 with asp.net 3.5. The program writes a batch file on the server using a streamwrite like this. It then runs the batch file using a shell command as per the last line.
There are two errors I want to trap.
The ID and password are incorrect.
The file was not present on the server being accessed by the batch file.
If an error happens I want to display a meaningful message in Internet Explorer. How do I do this?
The batch file is attached (with hostname, ID and password changed).