Diagnostics.Process class and ASP.NET

B

BCM

In a simple console app the following few lines open up an Acrobat file
without a hitch:

Process p = new Process();
p.StartInfo.FileName = @"C:\test.pdf";
p.Start();

But the same code in an ASP.NET app does NOTHING. No error message, not
anything at all. In fact, if I add the following line after process.Start:

.......
p.Start();
Response.Write(p.Responding.ToString());

SOMETIMES it returns True, but more often I DO get an error, which states
that "Process has exited, so the requested information is not available."

Now I've given the ASPNET user read rights on the file, but I can't think of
anything else that might be precluding the file from opening. Any ideas?
Thanks in advance!
 
G

Guest

You must keep in mind that Asp.net code is SERVER-SIDE code. If this do launch a process, it will on the server. I don't think that the server will launch this type of process. This is the very same reason why you cannot use vb.net MessageBox.Show("") in asp.net because this will cause a message box to show up in the server process.
 
B

BCM

Thanks: I should have made it explicit that I WANT the file to open on the
server, not the client. The file itself has an embedded script that changes
field contents upon opening. Right after the .pdf has been opened and thus
changed, I want to direct the browser to it.

Tampa .NET Koder said:
You must keep in mind that Asp.net code is SERVER-SIDE code. If this do
launch a process, it will on the server. I don't think that the server will
launch this type of process. This is the very same reason why you cannot
use vb.net MessageBox.Show("") in asp.net because this will cause a message
box to show up in the server process.
 
B

BCM

The script that runs when the .pdf opens connects to a database via Adobe's
ADBC, which depends on a system DSN that resides on the server. Once it gets
the data it needs and populates itself with that data, the browser then is
redirected to open the file.


Tampa .NET Koder said:
I am not understanding why the pdf file will have to be opened in the
server's memory in order for the client to access it. If the file is stored
on the web server then the client should be able to open it just by browsing
to it (http://server/file.pdf)
and the embedded script should be able to run on the client.
Probably someone else in here will be better able to assit you and I will
look for a solution if one is posted
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top