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

  • Thread starter Thread starter Luther Miller
  • Start date Start date
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?
 
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
 
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
 
Just needed to check :-)

Good stuff!!

--

Regards

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