473,602 Members | 2,751 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Running a Windows APP from ASPX page

Is it possible to execute a C# Windows app from an ASPX (C#) web application.

My app runs over the Intranet and on one page I want to run a C# program
which does some things I can't do from the web.

The program runs (via a javascript) like this:

Page.RegisterSt artupScript("xx ","<script>wind ows.href=abc.ex e</script>")

The program runs, but when I exit and return to the Web App, I get a CGI
Error.

CGI Application misbehaved. Something about incomplete HTTP headers.

Is there a way around this? A better way to launch the program?

Thanks.
Jul 21 '05 #1
2 1552
Hi Andy,
My app runs over the Intranet and on one page I want to run a C# program
which does some things I can't do from the web.
Like what?
The program runs, but when I exit and return to the Web App, I get a CGI
Error.

CGI Application misbehaved. Something about incomplete HTTP headers.


This is not specific to Windows or .NET, you tend to get this error if
you've sent a stream to a browser without setting up the headers
correctly. If you're EXE has output, you need to make sure it's HTTP
compliant.

--
Gerry Hickman (London UK)
Jul 21 '05 #2
My windows app launches WORD, reads in a document and merges it with the data
record selected by the user. It then sends the document back to the web app
and closes Word. I looked into Automation over the web but had trouble doing
that as well.

Launching the program from the internet, I get ACCESS DENIED when the
program tries to start WORD. After reading the help, newsgroups, etc, I
concluded that this wasn't the best method. I did try the DMCNG (something
like that) to let office start from Web app, but it didn't change anything.

My EXE does not have any screen output. It opens, makes the file, saves it
and closes. How to I make it HTTP compliant?
and how should I launch the application? Is the Page.RegStartup Script the
best method?

Thanks.

"Gerry Hickman" wrote:
Hi Andy,
My app runs over the Intranet and on one page I want to run a C# program
which does some things I can't do from the web.


Like what?
The program runs, but when I exit and return to the Web App, I get a CGI
Error.

CGI Application misbehaved. Something about incomplete HTTP headers.


This is not specific to Windows or .NET, you tend to get this error if
you've sent a stream to a browser without setting up the headers
correctly. If you're EXE has output, you need to make sure it's HTTP
compliant.

--
Gerry Hickman (London UK)

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
1937
by: Andrew Chalk | last post by:
I have just moved a project to my laptop and get the message "Visual Studio ..NET has detected that the specified Web server is not running ASP.NET v1.1. You will be unable to run ASP.NET Web applications or services" Presumably there is a d/l on MSDN to rectify this, but I can't find it. Does anyone know the URL? Many thanks.
10
3465
by: ThunderMusic | last post by:
Hi, How can I get if the Windows running is a server version? Is there a property somewhere that can tell me if the Windows version is a server edition (including server, advanced server, web server, etc) or just a workstation (if it's not a workstation, then it's a server). My app must verifies that for security reasons. It should work from at least windows 2000 (Windows 98 and ME, would appreciated to, but if it's not possible, I'll...
6
1252
by: Arsalan | last post by:
How do i run ASP.net page (.aspx) I've installed Visual Studio and my IIS is working fine (delivering asp pages but not aspx pages)
5
557
by: Shahnaz Yousuf | last post by:
Following is the sample code of my .aspx file <%@ Page Language="C#" %><Script Runat="Server"> void Page_Load(Object sender, EventArgs EvArgs) { Response.Write("Hello World"); } </Script> THis file resides in wwwroot folder when i run the code by writing http://localhost/Hello1.aspx I get the following error HTTP 500.100 - Internal Server Error - ASP error
8
2755
by: TS | last post by:
Hi, i have inherited a page from another user. The page is the target frame in a frameset. for some reason the whole page runs twice (page_load, init, etc. all run twice) I can't figure out how this is happening. there are no transfers or redirects that are occurring in the pages. the page runs thru all of its events then starts all over again. Trying to inspect the stack track doesn't help because when i get to the init the 2nd time,...
4
1956
by: ImSoLost | last post by:
I'm running a really long process from ASP.NET and need some help... I am making a method call when the user presses a button from my webpage, which goes into a database and parses a file. This process could exceed an hour, so the user is expected to press the button to start the process and minimize the IE window and do other work while the application is processing. Anyway, after a certain period in time, the page becomes "Page could...
1
6008
by: Anonieko | last post by:
Query: How to display progress bar for long running page Answer: Yet another solution. REFERENCE: http://www.eggheadcafe.com/articles/20050108.asp My only regret is that when click the browser back button, it loads the progress bar again. Any solution to this?
0
3506
by: Rob Roberts | last post by:
I have developed an ASP.NET 2.0 application using localhost on my Windows XP workstation, and it all works fine there. I tried to copy it to my test web server, which is a domain controller running Windows 2000 Server SP4. I can't get it to work on the server. For testing, I created a simple aspx page with nothing on it except for a label. Even that simple page won't work on the server. This error message appears in the browser when I...
4
1468
by: Chris | last post by:
Good Morning, I have spent a considerable amount of time trying to get aspx pages to render in IIS 5.1 to no avail. At first I thought it was a problem with the installation of the Quickstarts since they were the first failure I saw after loading framework and SDK 2.0. The problem presents itself as follows: When I attempt to load static content (HTM) the page renders as expected. But when I attempt to load even the simplist .net...
1
1733
by: pintoo | last post by:
Hi, I have 2 sites (Site A, B) running on same windows 2003 server pointing to different home directories. User logs into site A and is shown a.aspx page and user credentials are saved in cookies. There is a link to launch site B from Site A. User clicks the link and is shown Site B - b.aspx. I have a crystal report on b.aspx which user can run. Crystal report is exported into pdf and saved to a folder on the server and displayed to...
0
7993
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7920
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8404
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8054
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6730
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
3944
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2418
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1254
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.