473,406 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Protect EXE using defaulthttphandler?

Hi

I have a website which i have secured using forms authentication. I
have also secured htm, pdf, doc, xls files using the httphandlers
section in the web.config and routing the requests from IIS thru
dotnet.

Now I need to secure a .exe application in a subdir. I have made it so
we have to login, but I cannot get the application to run.... I have
tried using the defaulthttphandler in the web.config but the browser
just says the page is unreachable.

The .exe is a third party product so we cannot change it. Its
basically some sort of cgi app which works fine if we just call it via
the url http:\fred\gateway.exe?someparams (and remove the mapping in
IIS).

Do i need to write my own httphandler to execute the exe and return
the web page. If so has anyone done this and can give an example?

The line in the web.config in the httphandlers section i currently
have is
<add path="*.exe" verb="*" type="System.Web.DefaultHttpHandler"
validate="true" />

Please tell me this can be done or the line above is incorrect.......

Thanks

Mar 7 '07 #1
3 2195
Give the folder containing the CGI executable Execute permission (as opposed
to script permission).

--
HTH,

Kevin Spencer
Microsoft MVP

Help test our new betas,
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

<an**@felsconsulting.co.ukwrote in message
news:11**********************@8g2000cwh.googlegrou ps.com...
Hi

I have a website which i have secured using forms authentication. I
have also secured htm, pdf, doc, xls files using the httphandlers
section in the web.config and routing the requests from IIS thru
dotnet.

Now I need to secure a .exe application in a subdir. I have made it so
we have to login, but I cannot get the application to run.... I have
tried using the defaulthttphandler in the web.config but the browser
just says the page is unreachable.

The .exe is a third party product so we cannot change it. Its
basically some sort of cgi app which works fine if we just call it via
the url http:\fred\gateway.exe?someparams (and remove the mapping in
IIS).

Do i need to write my own httphandler to execute the exe and return
the web page. If so has anyone done this and can give an example?

The line in the web.config in the httphandlers section i currently
have is
<add path="*.exe" verb="*" type="System.Web.DefaultHttpHandler"
validate="true" />

Please tell me this can be done or the line above is incorrect.......

Thanks

Mar 7 '07 #2
Thanks for the suggestion, but I have already done this, and can be
proved by removing the mapping in IIS of .exe to the dotnet
executeble. The exe works fine then, but once its remapped, it
authenticates then just gives an "Internet Explorer cannot display the
webpage" error.

Any more ideas??

Thanks
On 7 Mar, 13:26, "Kevin Spencer" <unclechut...@nothinks.comwrote:
Give the folder containing the CGI executable Execute permission (as opposed
to script permission).

--
HTH,

Kevin Spencer
Microsoft MVP
Mar 7 '07 #3
Well finally made it work, it was very simple in the end..... I shall
explain cos google did not have any answers for this.....

Basically I had misunderstood setting IIS to route the requests to the
dotnet exe.
What I did was to route individual requests by
adding .exe, .htm, .html, .pdf to the application extensions section.
What I should have done was just add the dotnet dll to the wildcard
application maps just below it.

Because I had set the application extensions I was in fact creating a
circular reference, in that it would route it to dotnet. When i was
asking .exe. to go back to the defaulthttphandler it looked in the app
extensions and sent it back to dotnet.......
Now all requests for files goto dotnet and are then automatically sent
back to the correct handlers. This means the authentication kicks in
nice and easy.

You do not even need to add a httphandlers section in the web.config
file either, cos in the main.config it routes all unhandled types back
to IIS.

Its very easy when you know how..........................
Cheers

Mar 13 '07 #4

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

Similar topics

6
by: YK | last post by:
All, What is the best way to protect IL code? --------------------------------------------------- Typical scenario: Visual Studio .NET 2003 includes Dotfuscator Community Edition, which...
29
by: Frank Millman | last post by:
Hi all I am writing a multi-user accounting/business system. Data is stored in a database (PostgreSQL on Linux, SQL Server on Windows). I have written a Python program to run on the client,...
3
by: Narlen | last post by:
Hi there, I don't know much about web design but I proudly managed to password protect a page on my site. Later I realized that everyone looking at the source in any web browser can see the...
15
by: Fady Anwar | last post by:
Hi while browsing the net i noticed that there is sites publishing some software that claim that it can decompile .net applications i didn't bleave it in fact but after trying it i was surprised...
22
by: teejayem | last post by:
Hi, I am new to programming with databases and was wanting some help. Is there any way to password protect an access database and access sent sql commands to it via vb.net code? Any help...
4
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I protect my javascript code? ----------------------------------------------------------------------- ...
7
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi. I have an ASP.NET 2.0 web application which contains an Images directory with all website images. How can I prevent other websites from creating img tags with the source as my images? I want...
3
by: Sin Jeong-hun | last post by:
It seems like the Protect() uses the Windows accout information to encrypt data. If I know the user name and the password, can I decrypt it on another PC? If it is not, how about the exported key?...
10
by: mulamootil | last post by:
Hi - I have created multiple tables and forms for a database. We are entering data into the tables using forms which in turn are linked to items on a switchboard. I would like multiple users in...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.