473,569 Members | 2,617 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to invoke external application through ASP.Net web application

Hi,

I am trying to invoke an external email management
program from my ASP.NET web application. For testing
purposes I created a very simple webform that has a
single button. The code behind has the following:
Sub btnGo_Click(ByV al sender as System.Object, ByVal e as
System.EventArg s) Handles btnGo.Click
Dim objInfo As New ProcessStartInf o()
objInfo.FileNam e = "c:\program files\gammadyne
mailer\gm.exe"
objInfo.Argumen ts = "/t e:\temp\cba\eec m.txt"
Dim objProc As New Process()
objProc.Start(o bjInfo)
End Sub
When I click on the Go button, I can see gm.exe in the
Task Manager, but nothing happens. The program doesnt
send out the email like it's supposed to. When I use the
same piece of code in a Windows Application or a Windows
Service it works just fine.
I know this has to do with the security of the ASPNET
user, but I have also tried executing the webform and the
web application under a different user that belongs to
the Administrators group, but with the same result. So I
don't know what to do, please advice.
Regards,

Sandeep

Mar 21 '07 #1
1 3575
Hello Sandy,

Do u use impersonalizati on to start external app?

There is a number reasons why it doesnt work, because by default the asp.net
account has no rights to interact with desktop and with network resources.

Ideally it's not a good way to start ext app from ASP.net
---
WBR, Michael Nemtsev [C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

SHi,
S>
SI am trying to invoke an external email management program from my
SASP.NET web application. For testing purposes I created a very simple
Swebform that has a single button. The code behind has the following:
S>
SSub btnGo_Click(ByV al sender as System.Object, ByVal e as
SSystem.EventAr gs) Handles btnGo.Click
SDim objInfo As New ProcessStartInf o()
SobjInfo.FileNa me = "c:\program files\gammadyne
Smailer\gm.exe"
SobjInfo.Argume nts = "/t e:\temp\cba\eec m.txt"
SDim objProc As New Process()
SobjProc.Start( objInfo)
SEnd Sub
SWhen I click on the Go button, I can see gm.exe in the Task Manager,
Sbut nothing happens. The program doesnt send out the email like it's
Ssupposed to. When I use the same piece of code in a Windows
SApplication or a Windows Service it works just fine.
S>
SI know this has to do with the security of the ASPNET user, but I
Shave also tried executing the webform and the web application under a
Sdifferent user that belongs to the Administrators group, but with the
Ssame result. So I don't know what to do, please advice.
S>
SRegards,
S>
SSandeep
S>
Mar 21 '07 #2

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

Similar topics

3
11617
by: konsu | last post by:
hello, when a web request comes to my index.php, i would like index.php to execute a php script stored in an external file and capture the external script's output to a variable. i am doing this because the external script can read the database and can emit xml that i want to use. index.php (or whatever) wants to grab this xml and pass...
2
5520
by: Kishore | last post by:
Hi, I have a small console application written in c# that takes two arguments. I am using System.Diagnostics.Process.Start("cmdApp.exe", arguments) to start the application from another .net application. But I am unable to start the console application using this method. When I write a batch file (app.Bat) like: cmdApp.exe %1 %2
1
1990
by: S. van Beek | last post by:
Dear reader, In case an application is ussing an external model library you have to address this external model library in your application. This addressing takes place in a module of the application by opening of a module and activates and than brows to the location of the external library.
2
13930
by: Martin Maat | last post by:
Hi, I am trying to create a plug-in assembly without the need to register it in the GAC. Reflection should help me out here. I got this far: private void button1_Click(object sender, System.EventArgs e) { Assembly engine = null; AssemblyName assemblyName = new AssemblyName(); assemblyName.CodeBase = assemblyPath + @"Engine.dll";
2
4566
by: Jacek | last post by:
Hello! My application has to use external native library writing to stdout and stdin. My goal is to redirect output within running process (no chance to do that in child process - Process class redirection is useless in that case) and I would like to do it without reverting to C-run time library P/Invoke calls. Any ideas how to do that?
4
2238
by: SteveS | last post by:
Does anyone know if it is possible to invoke a Javascript function in a web page from an external application? I've got some data that I want to pass from a windows application to a web page without refreshing the page (thus the javascript function). Any other possible methodologies that anyone could suggest? Has anyone done anything like...
5
3612
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As New System.Diagnostics.Process 'p.Start(MDEPDirStr & "macrun.exe", sPPTOut) p.Start("C:\WINDOWS\SYSTEM32\CALC.EXE")...
2
2386
by: lpcarignan | last post by:
Hi all, Right now, I'm debugging a C# library by starting an external application. To do this, I go in the project settings of the C# project, go in the Debug section and check the radio button "Start external program". I then specify the application that will start my library. I was wondering how VS 2005 does this under the cover. ...
1
1603
by: JasonT | last post by:
Hi. I have created a dll in VC++ 08 that exports a CLR windows form class. I call into this dll from an external (closed source, third-party) application to instantiate the form and embed it into the external application window using SetParent(). The problem is, the form runs in the external application window, but the external application no...
0
7701
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7615
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
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. ...
0
8130
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...
0
7979
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6284
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...
0
3653
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...
0
3643
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1223
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.