Deploy smart client as part of ASP.NET project - problem with .DLL / .EXE?

L

Luther Miller

There is a small windows forms piece to a larger ASP.NET application
that integrates and uses web services.

I have done some experimenting on the deployment side of things, and
it appears that when I either embed the forms control in a page, and
thus reference the DLL assembly, or when I link to a standalone EXE,
the web server (IIS) tries to process the EXE or DLL as if were going
to execute a CGI program and return a reponse.

Instead, I want IIS to simply "download" the EXE or DLL... I have
found I can work around this by deploying my assemblies in another
virtual web folder, but I would like to deploy everything all in one
place. I imagine there must be an easy configuration setting to turn
off IIS's processing of the EXE and DLL files (since it is handling
them differently than, say, a .HTM file).

Ideas?
 
T

Tim Stephenson

The windows application would need to be a separate project within your
overall solution. If you've added Windows forms code to an asp.net project,
the compiler will try to compile it all into a single DLL rather than
generating a Windows forms exe.

Put your code in a separate project, and compile / test the windows exe.
Once the exe is built, place it somewhere in your site's file structure and
assuming IIS is not set to execute the file, it should serve the file for
download when requested. Check execute permissions in the IIS properties -
it should be set to "scripts only", not "scripts and executables".



--

Regards

Tim Stephenson MCSD.NET
Charted MCAD & MCSD.NET Early Achiever
 
L

Luther Miller

Tim,

Thanks - the problems was "Scripts and Executables". We were getting:

CGI Error
The specified CGI application misbehaved by not returning a complete
set of HTTP headers. The headers it did return are:

Unhandled Exception: System.Security.Policy.PolicyException: Execution
permission cannot be acquired.

After changing to "Scripts Only", this went away, the .NET assemblies
started downloading correctly, and everything worked as planned. We
already had the code in a separate project, of course.

Cheers,

Luther
 
T

Tim Stephenson

Just needed to check :)

Good stuff!!

--

Regards

Tim Stephenson MCSD.NET
Charted MCAD & MCSD.NET Early Achiever
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top