Trouble with Process.start in my web application...

  • Thread starter Thread starter Bruce Barker
  • Start date Start date
B

Bruce Barker

a processes started by a service, lisk asp.net do not have access to the
desktop, so they can nott open a window. you shoudl only run commandline
programs.

-- bruce (sqlwork.com)
 
Besides Bruce's reply, Consider this:

Even you can open a "*doc" or "*.pdf" by your server app, do you really
want to open a PDF file (by Adobe Reader) on the server and have it
WaitForInputIlde? Who is going to the server room (may be located thousands
miles away from the user, or in a locked server closet/room in your company)
to read it and close it. You propbaly meant to get a PDF/doc file and send
the end user and have it open inside a web browser, rather than opeing it on
the server.
 
Hello everyone,

I have a web page which needs to open files of type .pdf (adobe) and
..doc(microsoft word).

I tried something fairly simple and have been having a lot of trouble
getting it to work.
So far just started with PDF as I figured that would be the simpler of the
two. However when that didnt seem to work.. I used a simple txt file.

Here is what I am doing

Imports System.Diagnostic
Imports System.Threading

Dim mprocess as New Process
mprocess.StartInfo.FileName = "C:\temp\readme.txt"

mprocess.Start()

mprocess.WaitForInputIdle()

Thread.Sleep(1000)



What I am expecting is to see my txt file opened up. What actually happens
is..I see notepad.exe as a process in my task manager with username ASPNET
but I do not see my file opened up...

What am I missing????

Any help and sample code in this matter would be appreciated.



Thanks in advance...

...Nisha
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top