Calling An Executable From Web Page

Dec 21, 2010

I want to call an Executable from a Web Page. I used the following code :

System.Diagnostics.Process.Start("c:\WINDOWS\system32\notepad.exe");

Works fine when executing (debugging) from Visual Studio. But when deployed as a website on IIS, the UI of the Notepad application is not seen. As it is executed as an anonymous user (Network Service in IIS 6.0) it is seen in task manager but cannot be seen as an executing application.

So now I applied Impersonation :

Code file (ASPX.cs File)
System.Security.Principal.WindowsImpersonationContext impersonationContext;
impersonationContext = ((System.Security.Principal.WindowsIdentity)User.Identity).Impersonate();
System.Diagnostics.Process.Start("c:\WINDOWS\system32\notepad.exe");
impersonationContext.Undo();
(Web.Config)
<authentication mode="Windows" />
<identity impersonate="true" userName="DomainUserName" password="password" />

In the application's virtual Directory in IIS go to properties and go to Directory Security Tab. In the Authentication and access controlclick Edit. Default Settings are: Enable anonymous access and Integrated Windows authentication are checked. This will give the following Error : An anonymous identity cannot perform an impersonation......................

View 5 Replies


Similar Messages:

Calling An Executable File From Web Server

Nov 20, 2010

i am working on a project where i have to give call to an .exe file to access the scanner on client side. i am using System.Diagnostics.Process.Start(Server.MapPath("~/bin/Scan.exe").ToString()"); to call exe file in my bin folder on to the server, but it is not getting called.

View 4 Replies

Web Forms :: Calling A Page And Getting The Result In The Calling Page?

Jan 3, 2011

I've a question I don't know if this is possible or not. I've tried a lot of things till now but could not accomplish on what I wanted to do.

What I want to do is call a web page from another page and some how execute either the page load event or page init event and get the result of the page in the first page.

Page A calls page B. Page B has static text and a label which is being set in page load event.

Page B - Code behind

[Code]....

Page B -- HTML code

[Code]....

Till now what I've tried is using the code below from page A. But this code just returns the Html code and nothing else.

[Code]....

View 3 Replies

Async Thread To Run Executable

Nov 16, 2011

I have a page which has populated a database with a set of information that needs to be processed. This could take a considerable amount of time and I want it to run in the background, mean while I will have my web app display a page with an intermittent meta refresh showing me progress of the records in the DB being processed.

What I think I need to do is start an executable, in a different thread running in the backgound on the server which will run until it is complete, without interfering with other web activity.

Can this be done? Do I start it in a different thread? How can I start the exe in that thread and just leave it to do its work?

View 2 Replies

Converting Project Into Executable (.EXE) File

Mar 6, 2010

does someone know the utility/procedure for converting an ASP.net project containing multiple files into one executable (.EXE) file?

View 3 Replies

Running Executable Asynchronously From Web Application?

Apr 13, 2010

What are the alternatives to System.Diagnostics API for running external EXE or BAT files under IIS hosted web application?

I would like to run external EXE program from my ASP.NET-MVC web application. I don't need to wait till the program exits. I just want to start the program. The execution can take some time or it may crash, so I would like to run it separatelly from IIS in such a way that the web application only triggers its execution.

View 1 Replies

Web Services Deploy As A Single Executable File

Oct 22, 2010

I have developed multiple WebServices in my project in ASP.NET. Now I need to deploy them as a single executable file. How can i do that?

View 1 Replies

Launching External Executable In Windows Azure?

Jul 15, 2010

My current ASP.NET site requires to launch FFMPEG.EXE to convert uploaded videos. With shared web hosting server, can't be done but via a Virtual Private Server (VPS) or a dedicated server.

I've been reading some info about Windows Azure but haven't found any info regarding:

1. Be able to launch external executable

2. Be able to remote desktop into the allocated virtual machines

View 1 Replies

C# - Get The Path For Executable File That Started The Application?

Feb 3, 2010

i am working on a web application using C#,

i know that in window application how to give the path for executable file that started the application (if (!System.IO.File.Exists(Application.StartupPath + "gsdll32.dll")))

but i dont know how to give that path in web application using c#

View 2 Replies

Security :: Block A Executable File From Upload?

Apr 6, 2010

I'm doing a project in component management system. I need to block executable files from getting uploaded. Blocking should not be based on the extensions. For example, i've a file named abc.exe i'm going to change the file extension to abc.jpg in this case that abc file should not get updated. Similar to that in gmail file attachment.

View 2 Replies

Security :: Block An Executable File From Upload?

Feb 28, 2010

I'm doing a project in component management system. I need to block executable files from getting uploaded. Blocking should not be based on the extensions. For example, i've a file named abc.exe i'm going to change the file extension to abc.jpg in this case that abc file should not get updated. Similar to that in gmail file attachment.

View 1 Replies

Web Forms :: Calling Javascript Method During Page Load From Content While Using Master Page

Mar 30, 2010

I want to call a javascript method during page load. I am using application.master of the sharepoint server 2007 as the master page . In the content page i want to call a custom method named OnLoadFun() during loading the content page. I have written the function inside script tag in the PlaceHolderAdditionalPageHead id section of the content page.

[Code]....

How do i call the OnLoadFun method so the i is being called onload time. i tried putting window.onload=OnLoadFun surrounded by script tag within the PlaceHolderMain content section.

View 1 Replies

C# - How To Get Common Library To Read App.config Of Current Executable

Apr 28, 2010

I have a common library and two executables. Each executable refers to the common library for some functionality. I would like the common library to read from the app.config of the exe which is currently running. Is there specific API calls to do this?

View 1 Replies

Visual Studio :: Compiler Executable File Csc.exe Cannot Be Found?

Feb 9, 2011

I formatted my system which has Windows XP serive pack 2 and after that Installed the VisualStuido 2008 setup.But,when I run any website then it says

Compiler executable file csc.exe cannot be found. Description: An unhandled exception occurred during the execution of the current web request.

I searched but could not find any suitable soution for it.Before formatting .Net was working quite fine.

It only work if I change version value to 2.0 from version=3.5 in webconfig file

<compilers>
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4"
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>

Kindly reply I wasted whole day for it but could not get the way for it.

View 1 Replies

Web Forms :: Calling Page In Div - The State Information Is Invalid For This Page And Might Be Corrupted

Aug 5, 2013

I am using Jquery Load and calling a page in a div.

Now while doing postback m getting this errorĀ The state information is invalid for this page and might be corrupted.

SO what might be the possible solution for the same.or is this error due to some other thing.

All this error am getting while doing postback.and when i refresh the page and do the same thing again it works absolutely fine.

View 1 Replies

Web Forms :: Calling A Function On Master Page From A Content Page?

Jun 26, 2010

i have this function on my master page, i want to call it from one of my content page, what should i do?

function showAddress() {
var txtAddress = document.getElementById('txtAddress');
var address = txtAddress.value;
geocoder.getLatLng(
address,
function (point) {
if (!point) {
alert(address + " not found");
}
else {
map.setCenter(point, 15);
var marker = new GMarker(point);
map.addOverlay(marker);
marker.openInfoWindow(address);
}
}
);

View 5 Replies

C# - Differentiate Whether A Managed Library Is Running In The Context Of Application Or In A Executable?

Mar 24, 2010

how to differentiate whether a managed library is running in the context of asp.net application or in a executable?

View 2 Replies

Web Forms :: Which Is The Method Providing The Web Page Calling Another Web Page

Feb 3, 2010

let us say 'default.htm' (.aspx is not possible due to whatever reason) is "calling" 'start.aspx' as following:

<a href="start.aspx"></a>

now i would like to have a method in 'start.aspx' letting me know, from which page 'start.aspx' had been "called" (in my sample this would be 'default.htm'). what would the c#-code look like?

View 9 Replies

VS 2008 - Calling Content Page Sub From Master Page?

Apr 27, 2010

I want to know if there is a way to call a content page Sub routine from a master page. Is this possibile or I must create a class?

View 16 Replies

Calling Page Methods Of UserControl / Page Using MSAJax?

Apr 9, 2010

Is it possible to call usercontrol methods/events using MSAJAX. I wanted to update my usercontrol by calling one of its events when a property from its parent page changes.

View 2 Replies

C# - Creating An Executable Script Which Accesses Aspx Form Components And Runs Function?

Jul 28, 2010

I have created and application which contains a gridview that is populated by an SQL database. I built a function which converts the gridview into an excel file and stores it on the server.

I would just like to know how I can write an executable script(which I will set to run at a certain time on the server) that will access the gridview in the .aspx file containing the gridview and run the convertToExcel() function located in the .cs file attached to the .aspx file and then close.

View 1 Replies

Calling An ASPX Page Into A Main Page?

Oct 28, 2010

I have a simple website that I'm building (practicing). In the main page, I'm using <div> to format my page.However, I have another page that I wish to load into/or view in the Main page. Can I do this without using a MasterPage?

View 10 Replies

Calling .NET Page From A Classic ASP Page On The Same Machine?

Jun 3, 2010

I am attempting to call an ASP.NET page from a classic ASP page on the same machine. The ASP page is located in c:inetpubwwwroot. The ASP.NET page is located in C:InetpubwwwrootWebServiceWrapper

Here is the ASP code to call the page:

Dim objHttp, strQuery
set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")[code]....

The ASP.NET code, which calls a web service and sets a cookie, works if I call it from the browser directly. However, using the Msxml2.ServerXMLHTTP object, it does not. The cookie is not generated and there is no error. There are no events in Event Viewer.The ASP.NET page was developed in Visual Studio 2005, .NET 2.0. Changing the POST to a GET has not helped.

View 3 Replies

Calling A Sub On A Different Page?

Mar 11, 2010

how do you call a sub from one webpage that is on another page?

So

webpage1 calls sub Test
webpage2 contains subTest

I dont seem to be able to call a sub on other pages and I cant find anything online regarding this.

View 12 Replies

C# - How To Get The Page Calling The Usercontrol

Aug 31, 2010

I have a user control .Is there some way to get the page in which usercontrol is available ?

View 2 Replies







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