473,406 Members | 2,843 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,406 software developers and data experts.

running application in asp.net process.

I want to run a application (console or window) in the asp.net process,
because i need an running application on the server that can acces the same
data/singleton object as my asp.net application.

Does someone know how i can achive this thing, if it is not posible in any
way to open a window form in the asp.net process. How can I then solve this
problem.

Best Regards

Anders Both, Denmark
Nov 18 '05 #1
6 1249
shell out to the command process using ProcessInfo.Start static method

ProcessStartInfo psi = new ProcessStartInfo("notepad.exe");
psi.WindowStyle = ProcessWindowStyle.Hidden;

Process p = new Process();
p.EnableRaisingEvents = true;
p.Exited += new EventHandler(MyExited);
p.StartInfo = psi;
p.Start();

..... do stuff ...

p.Kill(); // Try killing the process

private void MyExited(object sender, EventArgs e)
{
MessageBox.Show("Exited process");
}

--
Regards,
Alvin Bruney
Got DotNet? Get it here
http://home.networkip.net/dotnet/tidbits/default.htm
"Anders Both" <an********@hotmail.com> wrote in message
news:uc**************@TK2MSFTNGP12.phx.gbl...
I want to run a application (console or window) in the asp.net process,
because i need an running application on the server that can acces the same data/singleton object as my asp.net application.

Does someone know how i can achive this thing, if it is not posible in any
way to open a window form in the asp.net process. How can I then solve this problem.

Best Regards

Anders Both, Denmark

Nov 18 '05 #2
you can not open a window from a asp.net process. just supply a webservice
that can access your data, and a console or window app can call/pool the
webservice.

"Anders Both" <an********@hotmail.com> wrote in message
news:uc**************@TK2MSFTNGP12.phx.gbl...
I want to run a application (console or window) in the asp.net process,
because i need an running application on the server that can acces the same data/singleton object as my asp.net application.

Does someone know how i can achive this thing, if it is not posible in any
way to open a window form in the asp.net process. How can I then solve this problem.

Best Regards

Anders Both, Denmark

Nov 18 '05 #3
Since it's not possible, why don't you describe what your business
requirements are, so we can help you think of an alternative design?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Anders Both" <an********@hotmail.com> wrote in message
news:uc**************@TK2MSFTNGP12.phx.gbl...
I want to run a application (console or window) in the asp.net process,
because i need an running application on the server that can acces the same data/singleton object as my asp.net application.

Does someone know how i can achive this thing, if it is not posible in any
way to open a window form in the asp.net process. How can I then solve this problem.

Best Regards

Anders Both, Denmark

Nov 18 '05 #4
Copy .exe application to asp.Net application bin directory, then run it?
"Anders Both" <an********@hotmail.com> wrote in message
news:uc**************@TK2MSFTNGP12.phx.gbl...
I want to run a application (console or window) in the asp.net process,
because i need an running application on the server that can acces the same data/singleton object as my asp.net application.

Does someone know how i can achive this thing, if it is not posible in any
way to open a window form in the asp.net process. How can I then solve this problem.

Best Regards

Anders Both, Denmark

Nov 18 '05 #5
Thx, for the reply´s. I need it because i want to have a tcp-service-program
running in my asp.net process. But ofcause i can maybe make it without a
visible interface (or with a web-interface). If I can use Asynchronous
Socket's from within the asp.net process. I will try it out now.

Can I make some setting causing the asp.net to start some code, (call a
method) when asp.net starts up ?

Thx.

p.s. I can not use the ".exe solution" for anything. Because this will just
start a new process.

p.p.s. I think that a web-service or .NET remoting solution will be far to
dificult to make, it would make my hole system much more complicated.

p.p.p.s If it shows up that it is not posible to make an Asynchronous
Socket's from within the asp.net process as well, i will think that asp.net
is not so cool anyway.

"Kevin Spencer" <ke***@takempis.com> wrote in me Asynchronous Socket's
ssage news:OE**************@TK2MSFTNGP11.phx.gbl...
Since it's not possible, why don't you describe what your business
requirements are, so we can help you think of an alternative design?

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Anders Both" <an********@hotmail.com> wrote in message
news:uc**************@TK2MSFTNGP12.phx.gbl...
I want to run a application (console or window) in the asp.net process,
because i need an running application on the server that can acces the

same
data/singleton object as my asp.net application.

Does someone know how i can achive this thing, if it is not posible in any way to open a window form in the asp.net process. How can I then solve

this
problem.

Best Regards

Anders Both, Denmark


Nov 18 '05 #6

It´s me the ask´er again.

I found out that there seems to be no problem´s using sockets from the
asp.net process. So my solution will just be to make my applikation without
any Visual Interface, or maybe with a web interface.

How does i Run some special start up code, everytime the asp.net process
start´s ?
"Anders Both" <an********@hotmail.com> wrote in message
news:um**************@TK2MSFTNGP12.phx.gbl...
Thx, for the reply´s. I need it because i want to have a tcp-service-program running in my asp.net process. But ofcause i can maybe make it without a
visible interface (or with a web-interface). If I can use Asynchronous
Socket's from within the asp.net process. I will try it out now.

Can I make some setting causing the asp.net to start some code, (call a
method) when asp.net starts up ?

Thx.

p.s. I can not use the ".exe solution" for anything. Because this will just start a new process.

p.p.s. I think that a web-service or .NET remoting solution will be far to
dificult to make, it would make my hole system much more complicated.

p.p.p.s If it shows up that it is not posible to make an Asynchronous
Socket's from within the asp.net process as well, i will think that asp.net is not so cool anyway.

"Kevin Spencer" <ke***@takempis.com> wrote in me Asynchronous Socket's
ssage news:OE**************@TK2MSFTNGP11.phx.gbl...
Since it's not possible, why don't you describe what your business
requirements are, so we can help you think of an alternative design?

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Anders Both" <an********@hotmail.com> wrote in message
news:uc**************@TK2MSFTNGP12.phx.gbl...
I want to run a application (console or window) in the asp.net process, because i need an running application on the server that can acces the

same
data/singleton object as my asp.net application.

Does someone know how i can achive this thing, if it is not posible in any way to open a window form in the asp.net process. How can I then solve

this
problem.

Best Regards

Anders Both, Denmark



Nov 18 '05 #7

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

Similar topics

1
by: Marc | last post by:
I want to write a C#/ASP.NET application where a user can go to a web page, start running a job, close their browser, and then come back later and see the results. The purpose for this application is...
0
by: Walter G | last post by:
I have a VB.Net application that can be executed with parameters. If parameters are received, the I execute a function that will open a form within the application. On top of that, I'd like to...
3
by: Thom Little | last post by:
During an uninstall, how can I check to see if the application I an uninstalling is currently running? -- -- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd. --
8
by: ChrisBowringGG | last post by:
When you use Application.Quit() on an Excel application, there can still be an instance of Excel running, as seen in Task Manager. You can try following the advice on MSDN: ...
0
by: WATYF | last post by:
This is my problem... I have some code that starts a Process and returns it to a variable... (prcBat) At any time while that process is running... I want to be able to Kill it by pressing a...
4
by: sneffe | last post by:
Hi, im writing a program to keep track of which programs is currently running. I would like to have the caption of running programs displayed in a textbox on my form. I cant seem to find an easy way...
2
by: anonieko | last post by:
Avoid running several simultaneous instances of the same application on a single machine. ( Checking if application is already running) (Book Excerpt Practical C#2) Thanks to the static...
3
by: Michel | last post by:
Hi, I wrote an app in .Net and I whant only 1 instance of this app open for the user; the user open my app, do some works and try to open another instance of my app, I whant to show a message to...
1
by: daniel_xi | last post by:
Hi all, I am running a VS 2003 .NET project on my client machine (Win 2000 SP4, ..NET framework 1.1), running an ASP.NET application on a remote web server (Win 2000 Server, IIS 6.0, .NET...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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,...
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
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...
0
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,...

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.