473,407 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

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

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
Dec 16 '05 #1
2 1176
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)
"Nisha" <ni***********@rogers.com> wrote in message
news:CY******************************@rogers.com.. .
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

Dec 16 '05 #2
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.

"Nisha" <ni***********@rogers.com> wrote in message
news:CY******************************@rogers.com.. .
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

Dec 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: serge calderara | last post by:
Dear all, I have an application which is suppose to start another executable process. As soon as that process is running, I need to retrive its handle. The problem of the particular process I am...
4
by: Prince Kumar | last post by:
I joined a company recently and they have a java program which hangs (does nothing) after a while. This is no way consistent. It could succeed quite a few times and can fail a few other times....
6
by: Dmitri Shvetsov | last post by:
Hi, Can I start an external process from the Web Service? I'm using a code, compiler keeps silence, compiles ok and starts the project. When I trace in Debugger it doesn't start an external...
6
by: gizmo | last post by:
I have a requirement to initiate more than one instance of an application using the filenames. (the example below will start two instances of MS Word). My problem is that I need to kill each...
6
by: Daniel Walzenbach | last post by:
Hi, I have a web application which sometimes throws an “out of memory” exception. To get an idea what happens I traced some values using performance monitor and got the following values (for...
12
by: Raymond Lewallen | last post by:
How to wait for a process to stop completion is my goal. Obviously, the looping while waiting for the HasExited property is not a solution.. but thats the best I can come up off the top of my...
2
by: Nisha | last post by:
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...
0
by: =?Utf-8?B?Um9i?= | last post by:
I've a requirement to monitor when certain applications are started. I'm using WMI called from VS Stusio 2005 in VB to trap Excel and Word starting. I've written the following console application...
5
matheussousuke
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.