473,779 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using System.Diagnost ics.Process From ASP.NET

Ram
Hey,
I'm trying to use the following code inside an ASP.NET project:

System.Diagnost ics.Process objProcess;
objProcess = new System.Diagnost ics.Process();
objProcess.Star tInfo.FileName= @"c:\WINDOWS\Mi crosoft.NET\Fra mework\v1.1.432 2
\gacutil.exe";
objProcess.Star tInfo.Arguments = " /if c:\MyDLL.dll";
objProcess.Star tInfo.RedirectS tandardOutput = true;
objProcess.Star tInfo.UseShellE xecute = false;
objProcess.Star t();
return objProcess.Stan dardOutput.Read ToEnd();

Even though I configured the projects virtual directory to run with a local
Administrator account,
I still get in the standardOutput stream: "Failed Registering Assembly,
Acess Denied"!

And when I mark the lines of the "UseShellExecut e" and the
"RedirectStanda rdOutput" lines,
It works, but I cant get the output of the gacutil!

Thanks ahead

--Ram
Nov 19 '05 #1
2 4009
Since you are running this as an asp app, try changing the process model
section of the machine.config file. The username currently should read
"machine" and the password should be "autogenerated" . Try changing it to
your local admin account and see if you can run it.
And when I mark the lines of the "UseShellExecut e" and the
"RedirectStanda rdOutput" lines,
It works, but I cant get the output of the gacutil!
Mark the lines how? Comment them out?

bill
"Ram" <ni***@bezeqint .net> wrote in message
news:O$******** ******@TK2MSFTN GP15.phx.gbl... Hey,
I'm trying to use the following code inside an ASP.NET project:

System.Diagnost ics.Process objProcess;
objProcess = new System.Diagnost ics.Process();
objProcess.Star tInfo.FileName= @"c:\WINDOWS\Mi crosoft.NET\Fra mework\v1.1.432 2 \gacutil.exe";
objProcess.Star tInfo.Arguments = " /if c:\MyDLL.dll";
objProcess.Star tInfo.RedirectS tandardOutput = true;
objProcess.Star tInfo.UseShellE xecute = false;
objProcess.Star t();
return objProcess.Stan dardOutput.Read ToEnd();

Even though I configured the projects virtual directory to run with a local Administrator account,
I still get in the standardOutput stream: "Failed Registering Assembly,
Acess Denied"!
Thanks ahead

--Ram

Nov 19 '05 #2
Ram
Hey Bill, thanks for your reply!
Yeah - when I comment this 2 lines,
The "gacutil" installs the chosen Assembly successfully...
I'll check out what you said about the machine.config. ..
Thanks again!

--Ram

William F. Robertson, Jr. wrote:
Since you are running this as an asp app, try changing the process model section of the machine.config file. The username currently should read "machine" and the password should be "autogenerated" . Try changing it to your local admin account and see if you can run it.
And when I mark the lines of the "UseShellExecut e" and the
"RedirectStanda rdOutput" lines,
It works, but I cant get the output of the gacutil!
Mark the lines how? Comment them out?

bill
"Ram" <ni***@bezeqint .net> wrote in message
news:O$******** ******@TK2MSFTN GP15.phx.gbl...
Hey,
I'm trying to use the following code inside an ASP.NET project:

System.Diagnost ics.Process objProcess;
objProcess = new System.Diagnost ics.Process();

objProcess.Star tInfo.FileName= @"c:\WINDOWS\Mi crosoft.NET\Fra mework\v1.1.432 2
\gacutil.exe";
objProcess.Star tInfo.Arguments = " /if c:\MyDLL.dll";
objProcess.Star tInfo.RedirectS tandardOutput = true;
objProcess.Star tInfo.UseShellE xecute = false;
objProcess.Star t();
return objProcess.Stan dardOutput.Read ToEnd();

Even though I configured the projects virtual directory to run with a local
Administrator account,
I still get in the standardOutput stream: "Failed Registering

Assembly, Acess Denied"!
Thanks ahead

--Ram


Nov 19 '05 #3

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

Similar topics

0
8375
by: grutta | last post by:
I am writing a windows service that will recieve notification when a USB Device is insterted into the machine. I have used the RegisterDeviceNotification and the RegisterServiceCtrlHandlerEx with a handler. The handler portion seems to fail indicating that my parameters are invalid. I am getting an error code 126 when i try to register the handler and 28 when i register for event notification. Any ideas as to what the deal is? I am...
4
5670
by: Ohad Young | last post by:
Hi, I need to open (launch) an external application from my winform application. The application is not a dot.net application, for example the windows calculator. I'm using the System.Diagnostics.Process class, for example: .... System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.EnableRaisingEvents = false;
0
3300
by: Daniel Reber | last post by:
I am trying to start a process from a windows service but when the process starts the command window that the process runs in never shows. Is this because I am calling it from a windows service? Is there something else that I need to do? Here is my code: System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo();
3
6903
by: vbMark | last post by:
Here is my C# code in the ASP.NET page. public static void DoConvert ( string sFile ) { string cmd = "foo.exe" ; string param = " /bar.txt" ; Process myproc ; // <-- Error here ProcessStartInfo startInfo = new ProcessStartInfo ( cmd , param ) ; startInfo.CreateNoWindow = true ; startInfo.WindowStyle = ProcessWindowStyle.Hidden ;
1
6080
by: Morten | last post by:
Hi! Does anyone know why the code below always returns an "access is denied" error? private void Page_Load(object sender, System.EventArgs e) { System.Diagnostics.Process meProc = System.Diagnostics.Process.Start ("cmd.exe", " /c echo y| CACLS C:\\Temp /E /T /G test:F");
1
3065
by: Heiko Besemann | last post by:
Dear group, I created an aspx page using System.Diagnostics.Process() to launch "tracert" from shell and redirect output to Response.Output which prints it as text/plain into my browsers window. Now that works fine so far. My problem is that while tracert process is running and ASP ..NET is putting data into the pages output stream, my webapplication is locked until tracert process exits. How can I stop locking my application and be...
3
13382
by: K.NagaKiranKumar | last post by:
Hi I have stucked up on a problem.... I am developing an application in VB.NET Here I have to put a button on a form and by clicking on that button, an exe should run. see the code I am using... ------------------
0
1804
by: Daniel | last post by:
System.Diagnostics.Process.Start fails on windows server 2003 the process returns process.ExitCode == 0 but executing any process with System.Diagnostics.Process.Start on windows xp works fine. anything to do different for windows server 2003? some special permission for the process that executes another executable with System.Diagnostics.Process.Start ?? here is the code:
5
8362
by: rohitkumar | last post by:
I am trying to build a web application which can execute dos print command on the client machine. This application will read a file stored in server and it will create a folder on client machine and store the file there for future reference.it will also print the contents on the printer attached on client machine. I M using dos command because other options requires manual file>print options to print the file and number of files is too...
4
8462
by: =?Utf-8?B?YmlsbA==?= | last post by:
i'm using VS2005, VB.NET windows forms application when I try to open a web page using process.start, i get an error: "application not found" I'm using this syntax: System.Diagnostics.Process.Start("http://www.microsoft.com/") It works if I do it like this (thank you HKW), but what if the user doesn't use IE, but uses some other browser?
0
10306
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10138
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10074
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8961
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7485
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2869
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.