C# - Run Command And Make Sure It Ends Before Continuing?

Feb 4, 2010

i am running a command line program from inside my c# code behind page. the command looks like so.

String runMe = baseDir + @"Binffmpeg.exe";
String convertVideo = " -i "" + fullFileName + "" -ab 64 -ar 44100 -b 200 -y -f flv "" + fullFileNameWOextension + ".flv" ";
String makeImages = " -i "" + fullFileName + "" -r 1 -ss 00:00:01 -t 00:00:15 -f image2 -s 120x96 "" + imagesPath + "" + filename.Substring(0, filename.IndexOf(".")) + "_images%05d.jpeg"";
EdgeCastHelper.ExecuteCommandSync(runMe, convertVideo);
EdgeCastHelper.ExecuteCommandSync(runMe, makeImages);

There are some bits missing which are passed in as parameters. Once i have converted the video i upload it to separate file server.

What i would like to know: Is there a way to stop the upload process happening until the exe has run its course, ie fully converted the video.

View 1 Replies

Similar Messages:

How To Ensure Background Thread Ends When Application Ends?

Aug 12, 2010

I have an asp.net application with a background thread. The thread starts when the application starts and it is gracefully stopped when the application ends. I am running the website on a shared host. Unfortunately sometimes the application does not trigger the Application_End event when it ends. I would think that the threads would be killed anyway, but that's not the case. I currently have 4 threads running in the background. Three from previous times the application started and 1 from the current application session. How can I ensure that the threads are shutdown when the application ends? Is there a way for the threads to check if the application was reset or had been reset? Or is there a way to check for these rogue threads at application startup and kill them?

View 1 Replies

Security :: CreateUserWizard Not Continuing To Desired Page?

Apr 19, 2010






View 10 Replies

Extract Exception Name And Continuing Sentence From File - String Manipulation In C#

Mar 8, 2010

I have the following text, I need to extract the exception name and the continuing sentence from the file, but the file has continuous sentences without a space.


I need to extract the following keywords: ConnectException, javanetConnectException and any exception as well as its exception type.

View 2 Replies

Access :: Make A 'True' Or 'False' Value Using Select Command?

Apr 2, 2010

I have a table and on this table I have two column showing NumberOfDays and TotalPrice. I have my select command just like below;

"Select ([NumberOfDays]*[TotalPrice]) as MyResult From MyDatabase Order By [MyResult]"

My aim here is to create a new data depanding on 'MyResult' value. If MyResult value is under 10, I want a data value as 'False'. Else, I want a data value as 'True'. How could I write it in sql code?

View 7 Replies

Can Make A Dropdown List Act As A Command Button In A Lintview Control

Mar 19, 2011

I have a listview control that collects address among other things. I have a dropdown list for the country that defaults to "United States". For the state/region, I have another dropdown list populated with the states, and a textbox. I want either the state drop down list or the text box to be visible and enables at a time. The default is to have the dropdown list displayed. If the user changes the country, the state dropdown list should only be displayed if the user selects "United States" again. If any other country is selected, the text box should be displayed instead

View 4 Replies

AJAX :: Checkbox Placed Next To Slider Ends Up On Next Row

Jan 25, 2010

In a div element, I have a slider (using the Ajax Toolkit slider extender on a textbox). I then want to place a checkbox control right next to the slider - on the same row. However, on the page, the checkbox ends up one row below the slider. It looks like the slider adds a line break after itself. Is this expected? How can I avoid this?

For information, this code is placed in a content section of a page that has a masterpage attached to it. The content section is more than wide enough to contain the slider and the checkbox.

This is the relevant code snippet


View 2 Replies

Keep Some Datas In A Session When Countdown Ends

Jun 15, 2010

I write a countdown timer in jQuery and i need to keep some datas in a session when countdown ends. Datas have to be sent to server to update. How can i handle this situation. I am new in jQuery and asp.net so could you explain this briefly

View 4 Replies

Log Out User When A Session Times Out Or Ends?

Dec 10, 2010

Whats the best way to log out a user when a session ends or expires?

View 2 Replies

Membershipprovider: Automatically Logging Out When Session Ends?

Sep 9, 2010

I have some problems with getting my website to log out the authenticated user automatically when the session ends (the user closes the browser).

This is what I have in my web.config:


When I close the browser, the user is still logged in. How do I make the website forget the user through an option, so the user himself can decide if the website should remember or not?

View 1 Replies

MVC :: NerdDinner: Map / Ends Up On The Exact Same Coordinates On The Map Regardless Of The Address?

Nov 21, 2010

I started a website based on the NerdDinner source code, everything worked fine (more or less) but whenever I post an event, it ends up on the exact same coordinates on the map regardless of the address (Somewhere in the Gulf of Guinea!)

No idea what to do: I didn't alter the map code at all!

View 2 Replies

DataSource Controls :: DataAdapter - Issue An INSERT Command Without SELECT Command?

Jan 6, 2010

I want to issue an INSERT command for an SQL Server table using DataAdapter without first issuing a SELECT command. Could anybody send me lines of code to handle this? Also how do i manage INSERT into selective table columns (I have 10 columns but i only want to update 2 of them)?

View 2 Replies

Web Forms :: Impact Of Command Timeout Property While Working With Command Class

Jun 3, 2013

I am working with odbcCommand class, in one case I got error that QueryTimeout Expired. Even though this SP is taking only 3-4 secs in DB to execute these specific values, When I set the CommandTimeout=0, then it worked fine.

1)Is it necessary to always use this property while working with Command Class.

2)If it is not suggested to use, but still if I use it then how it will impact the performance.

Below is my code sample.

OdbcConnection conObj;
OdbcCommand cmdObj;
OdbcDataAdapter daObj = new OdbcDataAdapter();
public DataTable GetIFAContractNoteData(string RecipientIDIFACN, DateTime BatchDateIFACN, int TransmittalReportIDIFACN) {
conObj = new OdbcConnection(GlobalVariables.strDsnName + ";" + GlobalVariables.strDsnDataBase + ";" + GlobalVariables.strDsnUserID + ";" + GlobalVariables.strDsnPassword);


View 1 Replies

Web Forms :: Saving PDF Files By Suppressing Save Dialog Box When Running Print Command Through Command Line

Sep 2, 2010


Using above code, I got succeeded in printing PDF file through command line. But it runs the Acrobat Reader and opens Save dialog box.

In my case, I want to suppress Save dialog box and save the file on other location using c# coding. I mean I want to save a PDF file behind the scene.

View 1 Replies

Security :: User Is Staying Logged In After Session Ends

May 12, 2010

My web application uses forms authentication. One of my users who uses IE8 says that she always stays logged into the website on her computer. This is even after she closes the browser window and restarts the computer. This only happens on her computer, if she switches computers the same thing won't happen.

I'm baffled by this. Is there a setting in IE that could save her login information and automatically sign her in every time she accesses the website? Is there anything else to look into?

View 5 Replies

C# - Call Page Method After Usercontrol Events Ends?

Nov 22, 2010

How can i call a page method after a usercontol finished his method / fire a parent page method from inside the user control insted?

View 1 Replies

Web Forms :: Control Where Text Starts And Ends In Textbox?

May 19, 2010

I am trying to use a custom image for my textbox controls. In Photoshop I used an inner bevel. The only way I can find is to use the CssClass property and then use background-image in css. Problem is the text appears a few pixels to the top right in the box and is not very readable with the shadow. I need to center the text in the textbox. How can I do that?

View 3 Replies

DataSource Controls :: Automatically Column Update As Month Ends?

Jan 16, 2010

I am developing membership for website. SQL Server 2005 is at backend. I want Column <Package> to "Free" from "Premium" automatically when month ends. The website is membership per month basis. Two type of members "Free" and "Premium".

Is there any way to automatically column update as month ends. Can I do it with triggers? If yes then how?

View 5 Replies

State Management :: Lose GridView Rows When Session Ends?

Jun 8, 2010

My web application was in .NET framework 1.1 initially. It has a few ASP server grids and some third party controls (Infragistics). I had it migrated to .NET framework 3.0.

Now I've added a few ASP server grids('GridView'). The thing is when the session('InProc') ends after 20 mins, the rows of the newly added grids disappear. However, this is not happening with the grids that were present already pre-migration. I am not using any session variables to initialise or bind the new grids.

This is happening only if the controls are added in the web forms that were involved in the framework migration process. If the control is added in the new web form, then this issue's not occuring.

Also I am not allowed to change the session state to any other. It has to remain 'InProc'. Continuing the session indefinitely is also not an option.

View 1 Replies

State Management :: Session Ends Prematurely On Prod Server?

Jul 20, 2010

Kindly let me know why my appln redirects me to Session TimeOut page on a simple postback. This doesnot happen on my local pc but happens only on prod. Here is the code I m using on my PageBase.cs 's Init method


And in my web.config:

<authentication mode="Forms">
<forms name=".MY-AUTHPORTALNAME"
<sessionState mode="InProc" cookieless="false" timeout="9999" />

View 2 Replies

Data Controls :: Starts With / Ends With And Contains Search Using TextBox In GridView

May 7, 2015

i have form have label(enter)against it enter text in textbox then two radio buttons(startswith) other (contains) and button(search) i want if i choice first radiobutton sqlquery pass and retireve data from db  table start with any letter and if choice is second radio button query pas and data from db retireve contains text=""; all this done on search button click

View 1 Replies

Is It Necessary To Do Select Command Before Update Command In OracleDataClient

Aug 19, 2010

I've recently started working in ASP.NET and RDBMS.I'm making a test form where I can do basic add,update,delete operations.I'm using OracleDataClient to do the DB operations.I was able to populate a listbox using OracleDataAdapter.

Now after clicking on update button,I intend to Update in DB.I've Dataadapter with it's update property.But the update query is not happening.The examples I saw over net all have Select command before Update.Is it actually like that or am I missing some point.

How does Oracle DataClient work with Insert,Update,Delete Commands.

View 1 Replies

Forms Data Controls :: Select Command In App So Could Execute The Command And Retrive The Data Into A String Variable?

Apr 9, 2010

i'm trying to issue a select command in my app soi could execute the command and retrive the data into a string variable.the problem is that this command is overloaded with DataSourceSelectArgument and i can't figure out what it is.i'm using sql server express and when issue a n insert command for example sq.Insert(); i have no problems.this the command that's holding me:

SqlDataSource sq = new SqlDataSource();
sq.ConnectionString = ConfigurationManager.ConnectionStrings["CustomerDatabaseConnectionString1"].ToString();
sq.SelectCommandType = SqlDataSourceCommandType.Text;
sq.SelectCommand = "SELECT * FROM CustomerTable where customerID = 1";
string result = sq.Select(some overload that's stopping me);

View 5 Replies

Forms Data Controls :: Gridview Update / Delete Command Like A Update Command?

Apr 26, 2010

how would i do my Gridview delete command like a update command?

im using a datasource... and my delete command is like my update command... so i can change the status into "INACTIVE"...

DeleteCommand="UPDATE ACCOUNT_MAINTENANCE SET am_status = 'INACTIVE' WHERE (accmain_no = @accmain_no)"

UpdateCommand="UPDATE [ACCOUNT_MAINTENANCE] SET [account_type] = UPPER(@account_type), [min_deposit] = @min_deposit, [min_capital] = @min_capital WHERE [accmain_no] = @accmain_no"

when i press my delete command at gridview... the status changed into "INACTIVE" but when i refresh or press f5... it automatically update the status into "INACTIVE" also...

View 3 Replies

C# - Is A New Thread In A Visual Studio Test Project Aborted When The Test Ends

May 15, 2010

i have to do some message exchange with a 3rd party (in a website).When the client posts a page, i start the message exchange. When that doesn't succeed for some reason, i report this to the client by rendering the page with a message.On the background, in a separate thread, i start a process to send abort messages to the 3rd party. I can't do this while the user is waiting for the page to come back, because it might take a few minutes.But in a test project, the test ends when the message to the 3rd party is sent, and after the new thread is started. But it seems that the new thread also ends, when the test is done.

Is that normal behaviour?I do start the thread in a new class with a reference to 2 objects from the class which tries to send the message in the first place, may that be a problem?EDIT: it keeps running when the whole process is started in IIS

View 1 Replies

Copyrights 2005-15 www.BigResource.com, All rights reserved