473,408 Members | 1,907 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,408 software developers and data experts.

Cannot start .exe from aspx page

Hi All,

Hope someone can help me out with this problem.
I tried to start a process(notepad.exe) from a web form, but it is not started. Neither the aspnet_wp.exe nor my notepad.exe is shown in the Taskbar.

Here is my code:

private void Button1_Click(object sender, System.EventArgs e)
{
try
{
Process p = new Process();
p.StartInfo.FileName = "C:\\Windows\\notepad.exe";
p.StartInfo.UseShellExecute = false;
p.StartInfo.CreateNoWindow = false;
p.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
p.Start();
}
catch(Exception exp)
{
txtResults.Text = exp.StackTrace;
}
}
Awaiting for your replies
Thanks
Madhavi

---
Posted using Wimdows.net NntpNews Component -

Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
Nov 18 '05 #1
4 7999
Notepad would be useless to start. You wont be able to use any user based
app that way. Now you should be able to execute files, that's not a big
deal. Just make sure the user that ASP.NET and the Site are running under
has permissions to do this. FYI, you do realize this is trying to execute on
the SERVER right?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"DotNetJunkies User" <User@-NOSPAM-DotNetJunkies.com> wrote in message
news:eV**************@TK2MSFTNGP09.phx.gbl...
Hi All,

Hope someone can help me out with this problem.
I tried to start a process(notepad.exe) from a web form, but it is not started. Neither the aspnet_wp.exe nor my notepad.exe is shown in the
Taskbar.
Here is my code:

private void Button1_Click(object sender, System.EventArgs e)
{
try
{
Process p = new Process();
p.StartInfo.FileName = "C:\\Windows\\notepad.exe";
p.StartInfo.UseShellExecute = false;
p.StartInfo.CreateNoWindow = false;
p.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
p.Start();
}
catch(Exception exp)
{
txtResults.Text = exp.StackTrace;
}
}
Awaiting for your replies
Thanks
Madhavi

---
Posted using Wimdows.net NntpNews Component -

Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup

engine supports Post Alerts, Ratings, and Searching.
Nov 18 '05 #2
presumably, notepad...wait i thought notepad was in c:\windows\system32,
anyway you don't need the path since notepad by default is in the env. var.
but i would check to see if execute permissions existed. typically, it does
not have permissions by default.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"DotNetJunkies User" <User@-NOSPAM-DotNetJunkies.com> wrote in message
news:eV**************@TK2MSFTNGP09.phx.gbl...
Hi All,

Hope someone can help me out with this problem.
I tried to start a process(notepad.exe) from a web form, but it is not
started. Neither the aspnet_wp.exe nor my notepad.exe is shown in the
Taskbar.

Here is my code:

private void Button1_Click(object sender, System.EventArgs e)
{
try
{
Process p = new Process();
p.StartInfo.FileName = "C:\\Windows\\notepad.exe";
p.StartInfo.UseShellExecute = false;
p.StartInfo.CreateNoWindow = false;
p.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
p.Start();
}
catch(Exception exp)
{
txtResults.Text = exp.StackTrace;
}
}
Awaiting for your replies
Thanks
Madhavi

---
Posted using Wimdows.net NntpNews Component -

Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup
engine supports Post Alerts, Ratings, and Searching.

Nov 18 '05 #3
Like Curt said, your asp.net code is running on the server, so my guess is that you are starting up a whole lot of notepad session windows on the server. The admin must be real fustrated with you. You will never get notepad to open up this way. And I doubt that you can run client side code to get this to start up, since this is a security issue.

"DotNetJunkies User" wrote:
Hi All,

Hope someone can help me out with this problem.
I tried to start a process(notepad.exe) from a web form, but it is not started. Neither the aspnet_wp.exe nor my notepad.exe is shown in the Taskbar.

Here is my code:

private void Button1_Click(object sender, System.EventArgs e)
{
try
{
Process p = new Process();
p.StartInfo.FileName = "C:\\Windows\\notepad.exe";
p.StartInfo.UseShellExecute = false;
p.StartInfo.CreateNoWindow = false;
p.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
p.Start();
}
catch(Exception exp)
{
txtResults.Text = exp.StackTrace;
}
}
Awaiting for your replies
Thanks
Madhavi

---
Posted using Wimdows.net NntpNews Component -

Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.

Nov 18 '05 #4
Like Curt said, your asp.net code is running on the server, so my guess is that you are starting up a whole lot of notepad session windows on the server. The admin must be real fustrated with you. You will never get notepad to open up this way. And I doubt that you can run client side code to get this to start up, since this is a security issue.

"DotNetJunkies User" wrote:
Hi All,

Hope someone can help me out with this problem.
I tried to start a process(notepad.exe) from a web form, but it is not started. Neither the aspnet_wp.exe nor my notepad.exe is shown in the Taskbar.

Here is my code:

private void Button1_Click(object sender, System.EventArgs e)
{
try
{
Process p = new Process();
p.StartInfo.FileName = "C:\\Windows\\notepad.exe";
p.StartInfo.UseShellExecute = false;
p.StartInfo.CreateNoWindow = false;
p.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
p.Start();
}
catch(Exception exp)
{
txtResults.Text = exp.StackTrace;
}
}
Awaiting for your replies
Thanks
Madhavi

---
Posted using Wimdows.net NntpNews Component -

Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.

Nov 18 '05 #5

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

Similar topics

0
by: J. Hazell | last post by:
I am attempting to start debugging an aspx page. IE is installed in the default location. Whenever I start the debugging process it fails with the error message. Cannot start debugging. Unable...
4
by: newgenre | last post by:
I set up a simple page with vs.net. It's kust an html page and I'm trying to get people to the site through the internet. My server is Windows XP and I use IIS as the server. The problem is that I...
1
by: ericvdb | last post by:
Hi all, I'm trying to fill a PDF form with asp.net using the FDF Toolkit. I have a simple form with a textbox and a button. When the button is clicked, the pdf should open with the field filled...
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
6
by: Randy | last post by:
Hello All, Can someone tell me why when I go to the Solution Explorer and try to set a certain aspx page as the start page (Set As Start Page), it is grayed out? Thanks :)
2
by: moondaddy | last post by:
I have a simple sample site I'm building in asp.net 2.0. I created a master page and a default.aspx content page in the project's root directory. Then I created a subfolder called content and...
1
by: R.A.M. | last post by:
Hello, I have written an .aspx page which calls Calendar.aspx page to select birth date which should be assign to some text box control on first page. Here's the code of first page: Birthdate:...
1
by: Dhruba Bandopadhyay | last post by:
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm....
3
by: Administrator | last post by:
Hi, My web development server is a Windows 2000 SP4 system. Had created an aspx page with the following code which I had extracted from 1 of the Microsoft websites: Dim oExcel As Object Dim...
5
by: Masso | last post by:
Hallo to the group, my question is this: where i have to set timeout in a web application? If i set into sessionState with property Timeout="60", after 20 minutes the session is over. Always...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.