Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / May 2008

Tip: Looking for answers? Try searching our database.

Source code for web applications

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Max - 08 May 2008 20:14 GMT
Is it possible for an ASP.net server (like IIS 6) to run web application
without having available the code behind forms in clear ascii? Can I provide
a compiled product to the customer, not an exe file of course, but some dll
compiled by my server ?
I'm asking that because 1. sometimes I am not happy to provide my source
code 2.customer is afraid of their internal security...

Thanks
Max
Stan - 08 May 2008 21:04 GMT
> Is it possible for an ASP.net server (like IIS 6) to run web application
> without having available the code behind forms in clear ascii? Can I provide
[quoted text clipped - 5 lines]
> Thanks
> Max

DLL files that reside in the bin directory of the site are not
compiled by the server. They are precompiled on the development
machine using Visual Studio. VS2005 and later have a Publish option
which does this. So the answer is yes you can deploy them pre-
compiled. Make sure that they are in release form not debug which can
lay them open to reverse engineering.

If you are worried about security its worth reading the Microsoft
documentation for guidance on best practices. Beware that some files,
e.g. web.config have to remain in pain text (XML formatted) so avoid
any sensitive stuff there (e.g. use encryption for passwords).

Having said that, there is no need to worry unduly about source code
file or other plain text system file content being freely available to
anyone browsing the site. It isn't. It requires local administrative
access to the web server or special hacking tools for remote access to
get into them. IIS won't touch them.

HTH
Mark Rae [MVP] - 08 May 2008 21:08 GMT
> Is it possible for an ASP.net server (like IIS 6) to run web application
> without having available the code behind forms in clear ascii? Can I
> provide a compiled product to the customer, not an exe file of course, but
> some dll compiled by my server ?

This is one of the many features of Web Deployment Projects:
http://weblogs.asp.net/scottgu/archive/2008/01/28/vs-2008-web-deployment-project
-support-released.aspx


Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Teemu Keiski - 08 May 2008 21:12 GMT
Hi,

if you develop ASP.NET application with Visual Studio and using web
application project model, you essentially deploy markup files e.g aspx
(ascx,asmx etc) and dll files to the server, and there's no need to deploy
the code-behind files. Idea is that code-behind is compiled to the dll, and
therefore isn't viewable so directly (to add: you can also obfuscate dlls).

Signature

Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net

> Is it possible for an ASP.net server (like IIS 6) to run web application
> without having available the code behind forms in clear ascii? Can I
[quoted text clipped - 5 lines]
> Thanks
> Max
Max - 09 May 2008 20:10 GMT
Understand that Express version doesn't offer this option. have looked for a
"deploy" or "publish" option but in vain, while Enterprise or Pro seem to
have it, afa I can read.
MS gave us a gift, but without the red staple.
Max

> Hi,
>
[quoted text clipped - 14 lines]
>> Thanks
>> Max
Juan T. Llibre - 09 May 2008 23:40 GMT
re:
!> Understand that Express version doesn't offer this option. have looked for a
!> "deploy" or "publish" option but in vain, while Enterprise or Pro seem to
!> have it, afa I can read. MS gave us a gift, but without the red staple.

ASP.NET comes with the tools to compile any .NET code that you
write regardless of the development environment that you prefer to work in.

Sample batch file :

set frmwk=Drive:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
set src=Drive:\vwdsite
set dest=Drive:\vwdsite\compiled
del /F /Q Drive:\vwdsite\compiled\*.*
%frmwk%\aspnet_compiler -v /vwdsite -p %src% %dest% -c

Just substitute your actual boot drive letter anywhere "Drive" appears in the batch file.
After you compile, just upload all the files in Drive:\vwdsite\compiled

Also, you can modify VWD's menu so you can automate
batch compiling your VWD-developed applications.

See this article for the details on how to do that :
http://safari.oreilly.com/9780789736659/ch03lev1sec2

More background info on this process is found at :
http://www.informit.com/articles/article.aspx?p=1073232

As you can see, your gift isn't maimed.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
> Understand that Express version doesn't offer this option. have looked for a "deploy" or "publish" option but in vain,
> while Enterprise or Pro seem to have it, afa I can read.
[quoted text clipped - 16 lines]
>>> Thanks
>>> Max
Max - 10 May 2008 08:38 GMT
Juan,
you really gave me a huge help. I was unable to find such information on the
web, and I searched a lot before posting.
I've tried, and with a syntax similar to yours, I was able to compile a
application and have a server running it (with web dev express 2005!)
Only one question, it seems necessary to have IIS running on the machine
where it is compiled. A virtual IIS directory is needed. I could not compile
in any way from a physical path to a physical path.
Is that true?

Thanks
Max

> re:
> !> Understand that Express version doesn't offer this option. have looked
[quoted text clipped - 61 lines]
>>>> Thanks
>>>> Max
Max - 10 May 2008 08:47 GMT
Correction.
I was able to compile the application from a physical path to another
physical path (C:\aaaa\ to C:\bbb\)
No IIS or virtual path involved. Really happy with that.
Gift is perfectly maimed, and now you can't look inside!!!!
Thanks again

> Juan,
> you really gave me a huge help. I was unable to find such information on
[quoted text clipped - 75 lines]
>>>>> Thanks
>>>>> Max
Juan T. Llibre - 10 May 2008 12:26 GMT
re:
!> Really happy with that
!> Thanks again

You're quite welcome, Max. It's great when obstacles can be removed.

I hope you get a zillion hits a day on your site... ;-)

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
> Correction.
> I was able to compile the application from a physical path to another physical path (C:\aaaa\ to C:\bbb\)
[quoted text clipped - 71 lines]
>>>>>> Thanks
>>>>>> Max

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.