Run A Batch File At Server Side?

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


Similar Messages:

How To Enable A Batch File To Create Output File On The Server Side

Mar 24, 2010

How to enable a batch file to create output file on the Server side?

View 1 Replies

C# - How To Show The Size Of Zip At The Client Side While Zippping Large Batch Of Files On Web Server

Nov 8, 2010

When the user selects the list of files from a page and hit's download selected, then a post back happens to server and starts zipping on the server. This works great until we hit the timeout on the page ( which is default to 90 seconds ) and just returns the process to the page even though the backend process is still zipping. Is it possible to show the size of zip file when the file is being zipped instead of waiting till the end to provide the download link?

View 1 Replies

Web Forms :: Batch By Batch Reading Of A Text File?

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

C# - How To Invoke A Windows Scheduled Task Or A Batch File On A Server Different To The IIS Server

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

Security :: Run Batch File On Another Server Different Domain?

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

SQL Server :: Open A Batch File In Sql Store Procedure?

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

Can Launch Cassini Web Server From A Command Line Or Batch File

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

Move File From Client Side To Server Side?

Feb 18, 2010

To my understanding the clinet side can only send data to the server either by get or post. so basically either through query string (get) or through body of the page (post).

So when we upload a file from client machine and send it to server, what exactly is happening behind the scenes? are we doing a post?

View 2 Replies

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

Security :: Cannot Run Batch File From Under IIS

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

Create And Run A Batch File?

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

Web Forms :: Can't Start File Download From Server Side Using .aspx File In IE7

Mar 26, 2011

This below code i have used in my aspx page for file download.

Response.AppendHeader("content-disposition", "attachment; filename="" + emailAttachment.FileName + "";");
Response.ContentType = "application/octet-stream";
Response.OutputStream.Write(emailAttachment.Data, 0, emailAttachment.Data.Length);
Response.End();

This block of code display Download file Dialog for Open or Save the attached file.It's working fine in Mozila Firefox and IE8 but doesn't display Download file Dialog box in IE 7

View 2 Replies

Returning Value From Process (batch File) To Webpage?

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

Security :: Cannot Execute The Windows Service As Well As Batch File On Web

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

Publishing A Site In Release Mode Using Aspnet_compiler In Batch File?

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

C# - Start The Bat-file At Web Server Side?

Mar 30, 2011

I need to call a console application to load data into another desktop application on the remote server that located within the corporate domain.

Users will enter the web page and upload data to asp.net web server, which after transformation should call that console application. Users are located remotely and do not have any other access except the web server.

I decided to lower the security web application context and let the asp.net working process to start the console application on the current IIS 6.0 web server

What I have done:

I changed the security account for the application pool for Local System;

I added ASPNET Account and IIS_WPG IIS Process Account to Administrators group;

I added "Allow service to interact with desctop" for "IIS Admin Service" and "World Wide Web Publishing Service" processes and restarted the machine;


I tried to start BAT-file at server side through the test page code-behind, but failed:

[code]...

The error was "access denied".

View 2 Replies

Include A File From The Server Side?

Apr 4, 2010

I'm currently working on a CMS in which the whole page is created in runtime according to DB configuration, and I want to include a file (the name of the file is also extracted from the DB) in runtime.

View 19 Replies

Web Forms :: Upload File To The Server Side?

Aug 12, 2010

I am trying to upload photo to my website folder "upload"

View 6 Replies

Web Forms :: Create PDF File In Server Side?

Aug 29, 2010

I need to create a .pdf file which can download by client clicking on the link in my web site. That pdf should be generated using stored information in database. It has different types of fonts which has not installed in client machine and only installed in web server. In this case, I'm not interesting to use crystal report or any other third party components that need to register to use and has some limitations.

How can I do that using ASP.NET with C#?

View 3 Replies

VS 2005 - How To Download A File At A Url Programmatically On The Server Side

Aug 19, 2010

how to download a file at a url programmatically on the server side without any user interaction?

View 4 Replies

Accessing Html Controls Within File From Server Side C#

Feb 27, 2010

Following code is an example, I just want to know if this can be done. I have an test.aspx file with this server side include tag;

<!--#include file="listOfCountries.htm" -->
Within listOfCountries.htm, I have:
<html>
<div>
<select id="countryList" runat="server">
<option></option>
...
</select>
</div>
</html>

Now, Is there a way to access "countryList" in test.aspx.cs file? On another note, say I didn't have the #include "Countries.htm" in test.aspx, is it possible to access the controls within Countries.htm from test.aspx.cs ? (i.e. accessing an external html file controls in cs)

View 1 Replies

Web Forms :: File Upload Not Working In Server Side

Sep 21, 2012

The below code is working fine in local machine..

To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".).aspx

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" align="left">
<b>Attachments</b>
</td>
</tr>
<tr>
<td width="15%">

[CODE]

View 1 Replies

Web Forms :: Server Side Validation To File Upload Control?

Oct 12, 2010

how to validate a file upload control to allow maximum "100kB" Size images.if exceed it should fire a asp validation"file size must be 100KB maximum".

View 2 Replies

Html - Accessing Input Type File At Server Side?

Jan 4, 2010

I am using the <input type="file" /> tag to upload a file to the server. How do I access the file at the server side and store it at the server? (The file is an image file)The client side code is :

<form id="form1" action="PhotoStore.aspx" enctype="multipart/form-data">
<div>
<input type="file" id="file" onchange="preview(this)" />

[code]...

View 5 Replies







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