How to run a web application on IIS without hosting the source code on the machine?

Asked

Viewed 469 times

6

I have developed a web application (Asp.net, c#, javascript , etc) for a client. The idea is to mature this application, and turn it into a product. The question is, how can I run my web application locally, i.e., by IIS, on the client server, without leaving the source code on the machine? Is there any alternative that is not to host the application on a website? Or to "encapsulate" the program, as happens with windows app?

Thank you very much.

  • Did you use ASPX for the presentation or did you use Razor?

  • The default project is web-Forms, not MVC. I’m using as much Html5! and Asp.net tags only when needed. Hugs.

1 answer

3

Usually in Deploy everything will be compiled, except ASPX.

To pre-compile your ASPX, do the following:

  • Right click on the project > Properties;
  • In Post-build Event command line, put the command:

    %windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_compiler.exe -v / -p "$(SolutionDir)$(ProjectName)"
    

Works for the framework 4.0 of . NET.

In performing Build from your site, ASPX files will be pre-compiled and will no longer be readable.

  • I tried to compile (Ctrl+shift+b) : %windir% Microsoft.NET Framework64 v4.0.30319 aspnet_compiler.exe -v / -p "$C: projects[folder with Solution . sln]$[name of Solution]" But it always gives the error: '$C: out[folder with Solution . sln]$[name of Solution]' is not a Valid path. If I run without the $signs, and without the last part $[name of the Solution], it compiles, but nothing happens.

  • You copied and pasted exactly what I posted in the reply?

  • I thought you were supposed to sub-sub-sub on the way to Rs. I circled as you posted, it compiled, but nothing happened.I can open the files as text or by VS normally.

  • @Andrém Did not generate files with the extension .compiled?

  • Ciganomorrisonmendez Did not generate.

  • @Did you just do a Debug? Or did a full Publish?

  • I just built it as you said. Right click on the project name - Build Solution.

  • I got the information from here. I don’t know what could be wrong anymore.

Show 3 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.