Run A Batch File With IIS?
Sep 29, 2010
Apologies if my question is too broad but I eed pointers on how to tackle the following problem. Currently, I run a batch file that launches a series of automation tests on QTP (a test automation tool). The batch file contains a vbs script path and it takes three parameters. Each time smeone needs to run the automation, I have to do this manually.What I'd like to be able to do is to allow other members of the team to access this functionality via an intranet web page. They would be able to login, choose the tests to run and then run them. My only other requirement is that the solution be based on .net and C# if possible. My current server is 2003 SP2.What is the best way to achiveve what I want? What is the recommended version of IIS and .NET framework to use? How do I configure IIS to be able to run the vbs script? I'm looking for a step-by-step approach if possible. I don't care if I have to convert the batch file into an executable or run the script directly, just as long as it is launched.
View 3 Replies
Similar Messages:
Jan 25, 2010
I have a text file (test.txt) which contains n number of data like:
1234778
4567444
8970451
1212455
testhsdd
weresdfy
.
.
.
etc
I need to fetch first 75 data or lines and insert in the sql table. Again next 75 data or lines and insert in the sql table. Again next 75 data or lines and insert in the sql table until it finish all.How i can do it in ASP.NET with C#
View 6 Replies
Mar 24, 2010
How to enable a batch file to create output file on the Server side?
View 1 Replies
Dec 3, 2010
I have a problem which is a recent development. We used to be able to run a batch file from IIS, but now we can't. I have tried several different approaches to this issue, none of them have worked. I tried to run the batch file under cmd using CreateProcess, CreateProcessWithLoginW, CreateProcessAs User, none of which worked. I now know that CreateProcesswithLogonW won't work on Windows 2003 Server. This is a C++ webservice by the way, running on Windows 2003 server using IIS 5.1. I have also tried running the batch file from a vbs script and calling the script in C++ using system("Scriptname") and that does not work either. I have run out of options, or at least the options that I know about.
I learned that "EXEs in System32, which like CMD.EXE have "special" ACLs that prevent them from being launched remotely from IIS. CMD.EXE has further security checks inside of it to prevent being used to launch batch scripts launched remotely from IIS." So I have abondoned even attempting to run CreateProcess of anykind where I invoke "cmd.exe" to run a batch file. Which was why I tried the vbscript. I know this is a security issue. It has to do with either the NETWORK SERVICE account or the ASPNET account not having permission to do this. I have QA breathing down my neck at this point and I really need to figure out what to do. If it is a security setting that can be set without compromising security on the server then great (although I bet that isn't the case).
View 1 Replies
Jan 17, 2011
I need to know, how can one create a batch file(.bat) and run the same at a specified time (say everyday at 12am midnight) in asp.net(C#).
View 4 Replies
Sep 4, 2010
I am creating an intranet application which runs a batch file and create an xml file as result. Which i am using for further processing. My problem is when i am running my application from local machine batch file is running fine and creating xml,but when i am running it through iis nohting is happening,
it meance process.start coudn't start command Prompt.
I am using following code. I have given all permission to iis.
Dim ProcessInfo As Diagnostics.ProcessStartInfo
ProcessInfo = New Diagnostics.ProcessStartInfo("cmd.exe", "/C " + Server.MapPath("~myScript.bat"))
Dim Process As New Diagnostics.Process
ProcessInfo.CreateNoWindow = False
ProcessInfo.UseShellExecute = False
[code]...
View 3 Replies
Jan 13, 2011
I'm using the System.Diagnostics.Process class to run a batch file. I need to be able to take an output from the batch file and then display it on the web-page, basically to know if it succeeded or not, since the batch runs an .exe that doesn't always succeed.
the values returned by the .exe and have the batch run a script depending on the value returned. The script could be a VBscript that sends info to the webpage, but even then I'm not sure how to accomplish this.
View 4 Replies
Feb 4, 2010
I have a batch file on another server on a different domain or network that I need to run from an ASP page. I found a simple enough script that opens a CMD prompt, goes to the location of the batch and runs it. If everything is on the same machine, it runs fine.
The issue I've run into now is that the batch file is on a file server and the ASP page is on a IIS server. The File server is on a internal network (separate domain) and the IIS server is on an external network (or different domain), both servers are hosted here.
When I try it and look at the event logs I can see a failure audit and its trying to login with the machine name.
View 1 Replies
Sep 29, 2010
I have to open a batch file automatically in sql. So i have used the below command.EXECUTE master.dbo.xp_cmdshell 'D:Databasesatch123.bat'Its worked for few times. After that its not working.One time i have stopped before the process is complete.May be this is the issue.Now its returns null value.
View 4 Replies
Jan 8, 2010
i have made one web site which is generating screensaver(MSI) dynamically.So to generate the MSI file i have to build a WIX project.So i executed using batch file which will use MSBuild.exe and cmd prompt. so its gave me an error "Access is Denied". i have also tried by making a windiws service but still the same error occurs.
View 1 Replies
Dec 28, 2010
Is there anyways to launch Cassini web server from a command line? The exe appears to be in this path, C:Program Files (x86)Common Filesmicrosoft sharedDevServer10.0
View 1 Replies
Sep 12, 2010
i am trieng to create a batch task that will publish my site in release mode
but with no luck...my script for doing so is this:
aspnet_compiler -errorstack -nologo -fixednames -v / -p "C:projectsmysiteCOMPONENTSsitefolder" -f -u "C:projectspublish-mysite"
my site has about 10 other projects in the solution. so i expect them to all be published in release mode. (the site refrence those projects)
View 1 Replies
Sep 7, 2010
I've written a aspx.net(C#) page that after the user has done what they do on the page they hit a Submit button. The Submit button
1) takes the work the users was producing on the page and writes it to a file.
2) attempts to execute a batch file.
The call to the batch file is executed via:
protected void Execute123EDI()
{
try
{
string File = @"c:80sAdminSendV80s.bat";
lblCancelled.Text = lblCancelled.Text + File;
Process proc = new System.Diagnostics.Process();
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.LoadUserProfile = false;
proc.StartInfo.UserName = "administrator";
proc.StartInfo.RedirectStandardOutput = true;
System.Security.SecureString secPass = new System.Security.SecureString();
string paswd = "123abc";
for (int i = 0; i < paswd.Length; i++)
{
secPass.AppendChar(paswd[i]);
}
proc.StartInfo.Password = secPass;
proc.StartInfo.FileName = File;
proc.Start();
FileStream fs = new FileStream(@"c:80sAdminSendV80sOutput.log", FileMode.Append);
StreamWriter sw = new StreamWriter(fs);
sw.Write(proc.StandardOutput.ReadToEnd());
proc.WaitForExit();
sw.Close();
proc.Close();
}
catch(Exception ex)
{
lblDebug.Text = lblDebug.Text + ex.Message + "<br/>";
}
If I watch the processes tab in Task Manager on the web server I see "cmd.exe" under the context of 'administrator' but it just hangs. For test purposes c:SendV80s.bat: copy c: oot.ini c:zzz.txt
If I logon onto the webserver's console and execute SendV80s.bat it works and exits without issue. But when I execute the same batch file via the Submit button it gets stuck executing in Task Manager/Process. I believe this has something to do with the fact that cmd is not running in a full environment/desktop context. I just noticed this on the actual console of the webserver (not in my RDP console but console 0 instead)
A pop-up box stating: CMD.exe Application error The application failed to initialize properly (0xc0000142). Click OK to terminate the application. And when I click on the OK button my ASPX page's WaitForExit is satisfied and the continues processing normally.
View 2 Replies
Sep 7, 2010
I have a asp.net web site, I would like a page on that site to be able to invoke a Windows Scheduled task or a batch file on a server different to the IIS server?
Is it possible?
View 2 Replies
Aug 27, 2010
have a CMS application that used to be able to run all the commands in a batch file; however, it has been failing in the last week. For testing, we have modified the contents in the batch file like this:
echo starting > c:log.txt
whoami >> c:log.txt
net use Z: \192.168.2.123share password /user:userWithAdminRightsInTarget
copy c:aTestFile.txt Z:Success.txt
net use Z:/DELETE
Let's say ComputerSource is the computer where IIS is hosting the CMS website and where the batch file resides, and ComputerTarget is the computer where I want to copy the files to.If I run the batch file manually by double clicking it, all commands are run successfully; the result of whoami in c:log.txt displays the user account that is logged into the server, and the file is copied successfully.However, if I run the batch file from the CMS website, it executes the first line "echo starting > c:log.txt" but fails afterwards. Both commputers are part of a domainWe have tested the application by using different domain names, even domain admin accounts.We have used impersonation in the website (specified in web.config file of cms website) as well as using domain admin accounts in IIS directory security. The result of the whoami command when the batch file is run from the website is nt/network service. We have practically tried almost anything.
View 2 Replies
Oct 28, 2010
What is the right approach when users (authenticated domain admins) should be able to start batch jobs (usually exe files) from an IIS (7.x) aspx (c#) page? This is an intranet site. The batch jobs have to run on the web server as Domain Admins. The website pool is executed by network service or some similar restricted account in AD.
Approaches I can think of (and their disadvantages):
1. Start exe file with System.Diagnostics.Process.Start with another account. This feature is disabled in IIS 7.x, how do I allow it?
2. Create a sheduled task and call scheduled task-api. This unmanaged dll is giving VS compiler warnings because it's unsafe to call from managed code.
3. I suppose there's a better approach, because the previous suggestions doesn't appear safe or robust.
View 2 Replies
May 26, 2010
For my first project in vwd2008 with asp/vb i've created a work order system and everything's going well.. I use a gridview to show all work orders, and then i've been using a hyperlinkfield to link to a seperate page so that they can view and print the work order.
I've now been tasked with making it possible to print multiple work orders at once. How can i print multiple html pages at once without the user having to choose a printer each time?
I figure i can setup a checkbox for them to select the work orders.. and then create html links to each of the work orders..And then just use a button to start printing... ..but how would i print each of them?
[URL]
View 2 Replies
Jan 5, 2010
We have a module in a system called Batch Upload. The function of this module is a user will upload a file and we have to upload the content of the file in the database. I already used excel file but it just compatible in 32bit. I think of a CSV file format then we will validate the file and upload the valid data in the database. Does anyone know how to do Batch Upload in CSV format?
View 1 Replies
Apr 12, 2010
I want to schedule a batch process in my APPLICATION SERVER every night by calling a stored in my database.
View 4 Replies
Mar 14, 2011
I've tried searching for the best method of doing batch uploads to YouTube but I've only found methods for uploading a single video to YouTube (which is fine, but not my situation).
I'd like to know the best method of uploading multiple videos to YouTube. I noticed here:
[URL]
That it needs to be spread out so you don't reach the quota. However, I noticed that Batch Processing is available here:
[URL]
Is it possible to create a batch upload to YouTube using the request.Batch call? Or is the only method to loop through the videos to be uploaded and upload them one at a time (given a 3-5 minute delay between each one)?
View 1 Replies
Aug 17, 2010
I need to add potentially a large number of items to a dataset, this currently works but is quite slow. There are some minor changes I can make to make this fast however the main culprates are the insert statements which are quite complex, With the deletes I changed the structure to be DELETE FROM TABLE WHERE ID IN () Instead of a per ID statement which made quite a difference executing for every 25 rows.The SPROC is linq enabled DbContext.MYSPROC(params) is there a way I could add the Sproc in the context to a batch group that I then execute when the currrent count of insertable items = 25? for each item in insertitems 'Don't want it to execute here
Batch.AddSproc(DbContext.MYSPROC(params))
If Count = 25 THEN Batch.RunSProcs
next
View 2 Replies
Mar 17, 2010
what exactly the batch debug option in web.config (attribute) does? I can tell it debugs in batches ( >1) but I cannot find anymore background info on this setting.
View 1 Replies
Mar 19, 2010
I'm using Enterprise library, but the idea is the same. I have a SqlStringCommand and the sql
is constructed using StringBuilder in the forms of
"insert into table (column1, column2, column3) values (@param1-X, @param2-X, @parm3-X)"+" "
where "X" represents a "for loop" about 700 rows
StringBuilder sb = new StringBuilder();
for(int i=0; i<700; i++)
{
sb.Append("insert into table (column1, column2, column3) values (@param1-"+i+", @param2-"+i, +",@parm3-"+i+") " );
}
followed by constructing a command object injecting all the parameters w/ values into it.
Essentially, 700 rows with 3 parameters, I ended up with 2100 parameters for this "one sql" Statement.
It ran fine for about a few days and suddenly I got this error
===============================================================
A severe error occurred on the current command. The results, if any, should be discarded.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
[code]...
View 3 Replies
Mar 10, 2011
We have a set of about 30-50 users who periodically need an ASP.net (version 4) application directory created for them.
As these numbers grow, manually creating an application directory for each user becomes cumbersome on IIS 7.
Is there a way to create these application folders using a batched/scripted/automated mechanism of some kind?
Ideally we'd like to provide input parameters of a file that contains a batch of application-names, and have the script automatically create the application directories in IIS.
View 3 Replies
Sep 10, 2010
In a regular webform, I can enable a batch of textboxes Visibility switch on with the following command...
[Code]....
View 1 Replies