Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Aug 26, 2010 06:47 PM by atconway
Aug 25, 2010 01:04 PM|LINK
Actually i'm creating an application in asp.net using c#.
I upload a powerpoint file and convert it to wmv format.Since the process of conversion is huge process(depends on the size of the file.Usually around 5 to 10 minutes.)i want to do in the background.So i upload a file and copy it to the server.(i using mysql
as the database).In the server i just want to do the conversion.Once the conversion is finished.it should update the table.The user can use the file some time later or the next time.How could i do this ? Could somebody help me ?
Aug 26, 2010 06:21 PM|LINK
Create a windows service which monitors your upload folder for any new WMV files. The service would then process the WMV instead of ASP.NET. Have a flag in your table which indicated the status of the processing (i.e. Not Processed, Processing, File Processed).
Your ASP.NET page would then look at the status and display a message appropriately.
Aug 26, 2010 06:47 PM|LINK
You can have your ASP.NET site upload the files to the server to a specified location. You can then create a Windows Service that can implement a
FileSystemWatcher object that will monitor a specified directory for new files. You can then run the conversion process and take the time needed. When the user returns to your site, it can check the status of the conversion, and provide an
update on its progress or completion.
Once you put the parts together, you will see that this is not too difficult to accomplish. I have actually done something similar to what you need to do. Take a look at the following link which explains what you need to do, and then click on the links
within the article to get the easy to follow MSDN code examples.
Running a Periodic Process in .NET using a Windows Service:
Hope this helps!