473,498 Members | 1,911 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

project type?

I would like to do some file processing on files received via a web upload.

Basically, the end user will upload an excel file via ASP.Net app which will
store the file in an InQueue directory. It will then launch a separate
process which will move the file to a working directory, perform some
processing, and move the updated excel file back to a OutQueue directory
which will be available to the end user via the ASP app.

What is the best way to configure this while keeping the web app decoupled
from the processing app?

The straightforward approach would be to create a web app which launched a
console app for the second phase. Of course, it is running on a server so i
don't really need the console. Another option would be to create the
processing app as a windows service but it won't be that heavily used and I
see no point to keep the program loaded.

It seems like this is a common situation so I was wondering what the "right"
answer was?
Thanks,
bob
Nov 17 '05 #1
5 1245
Much as I hate to say it, a service sounds like the right answer.

Alternative write a windows app (simply easier to debug and install ) thats
in the servers startup group.

Warning : beware of file locking. The service will likely see the file
before it has finished being written!

Nov 17 '05 #2
I will suggest a windows service, console are alright but you need to
manually start it when the machine reboots (or build some batch to start it).

That's my advice.

Cheers
Salva
"Bob Weiner" wrote:
I would like to do some file processing on files received via a web upload.

Basically, the end user will upload an excel file via ASP.Net app which will
store the file in an InQueue directory. It will then launch a separate
process which will move the file to a working directory, perform some
processing, and move the updated excel file back to a OutQueue directory
which will be available to the end user via the ASP app.

What is the best way to configure this while keeping the web app decoupled
from the processing app?

The straightforward approach would be to create a web app which launched a
console app for the second phase. Of course, it is running on a server so i
don't really need the console. Another option would be to create the
processing app as a windows service but it won't be that heavily used and I
see no point to keep the program loaded.

It seems like this is a common situation so I was wondering what the "right"
answer was?
Thanks,
bob

Nov 17 '05 #3
File locking is a good point; I'm looking at that now. Also, ensuring that
those lousy COM objects get cleaned up after I'm done with excel.

I was thinking about writing a small intermediate service, that monitored
the InQueue then called the actually processing application after it
detected the new file. This approach leaves me with two questions:
1. How would I know when the file was completely written to prevent
jumping the gun? and
2. I am still stuck on my original question about what project type
to use for the processing application.

Thanks for your reply,
bob

"Josh" <s@a.com> wrote in message
news:u6**************@TK2MSFTNGP14.phx.gbl...
Much as I hate to say it, a service sounds like the right answer.

Alternative write a windows app (simply easier to debug and install )
thats in the servers startup group.

Warning : beware of file locking. The service will likely see the file
before it has finished being written!

Nov 17 '05 #4
Hello Bob,

If you use Windows Service, you can use a timer to run every x minutes, the
odds that a file will be still writing would be slim, and with error handling,
you could just wait until the next heartbeat of the timer to process the
file.

I write quite a few services, and my approach has always been to keep the
service project itself very small and reference a DLL that does the actual
work. This way, you can create a console app that also calls the DLL to
use for debugging and testing purposes. (And another DLL project to hold
your NUnit tests if you're so inclined)

To answer your questions:

1. I don't know any .net ways of looking at a file being written, maybe
there's an API call?

2. Use "Windows Service" project template.

Bria
Nov 17 '05 #5
OK, I'm convinced - a windows service it is.

Thanks for the replies!
bob

"Bob Weiner" <bo*@engr.uconn.edu> wrote in message
news:eU**************@TK2MSFTNGP15.phx.gbl...
I would like to do some file processing on files received via a web upload.

Basically, the end user will upload an excel file via ASP.Net app which
will store the file in an InQueue directory. It will then launch a
separate process which will move the file to a working directory, perform
some processing, and move the updated excel file back to a OutQueue
directory which will be available to the end user via the ASP app.

What is the best way to configure this while keeping the web app decoupled
from the processing app?

The straightforward approach would be to create a web app which launched a
console app for the second phase. Of course, it is running on a server so
i don't really need the console. Another option would be to create the
processing app as a windows service but it won't be that heavily used and
I see no point to keep the program loaded.

It seems like this is a common situation so I was wondering what the
"right" answer was?
Thanks,
bob

Nov 17 '05 #6

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

Similar topics

0
1053
by: Peter Rilling | last post by:
Okay, what I want to do is to create a new type of project that can be added to a solution. This project would have no code, but will have other control mechanisms that would launch when the...
1
4001
by: Heng Ma | last post by:
Hi, Somehow when I open a project the project Output Type is always changed to Windows Application. What is happening? --Heng
12
1634
by: Jones | last post by:
I am having problems with my C# project. The project was built using VS.net (original release with service pack 1). The project includes windows forms and a DLL (dot.net) After getting the...
1
1782
by: Jerad Rose | last post by:
Hello, I have searched all over for the answer to this, to no avail. I have a web project already set up and running on a remote server, that I created from my home computer. I am now trying...
2
2462
by: ed d | last post by:
Hi, When I try to create a new web project, or "add existing project from web" or "open from source control" i'm prompted for a URL and type in a virtual directory. -- with "add project...
4
2873
by: Christopher C. Bernholt | last post by:
We have a solution which contains 2 projects. The first project is a windows control and it references an assembly. The second project is a test windows application used to test the windows...
1
1356
by: Jennyfer Barco | last post by:
Hello I have a question. I have a project called "Primary" and in that project I have a reference to a Com application called "engine". In "engine" I have a function that does many things and calls...
3
1958
by: Ubergeek | last post by:
I have a project (Win32 application) that I want to change to a console application. Does anyone know what to edit in which file, to implement the change?
24
2748
by: =?Utf-8?B?RHIuIFMu?= | last post by:
I am incorporating three existing programs into a new "all in one" program. I have added the three projects to the new all in one project. How do I instruct the new initial menu to launch the main...
2
2413
by: HONOREDANCESTOR | last post by:
I would like to put a dll and a project in the same solution. So I created a project (of type exe) and then I chose 'new project' (of type class library) and picked the option 'same solution'. So...
0
7125
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
7165
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
7203
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...
1
4908
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...
0
3093
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...
0
3081
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1417
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 ...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
290
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...

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.