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

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(ByVal sender as System.Object, ByVal e as
System.EventArgs) Handles btnGo.Click
Dim objInfo As New ProcessStartInfo()
objInfo.FileName = "c:\program files\gammadyne
mailer\gm.exe"
objInfo.Arguments = "/t e:\temp\cba\eecm.txt"
Dim objProc As New Process()
objProc.Start(objInfo)
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 3553
Hello Sandy,

Do u use impersonalization 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(ByVal sender as System.Object, ByVal e as
SSystem.EventArgs) Handles btnGo.Click
SDim objInfo As New ProcessStartInfo()
SobjInfo.FileName = "c:\program files\gammadyne
Smailer\gm.exe"
SobjInfo.Arguments = "/t e:\temp\cba\eecm.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
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...
2
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...
1
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...
2
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,...
2
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...
4
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...
5
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...
2
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...
1
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...

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.