Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Why are source files included in the Install and Upgrade distros?Why are source files included in the Install and Upgrade distros?
Previous
 
Next
New Post
2/24/2011 4:04 PM
 
Just curious, why is the source code included in the 5.6.1 Install and Upgrade distributions?

Shouldn't they just include the aspx, ascx and dll files?  Why are all the .vb files included?  I don't want those out there on my production web server.

Is this just a mistake by the person who packaged up those files, or am I missing something?
 
New Post
2/24/2011 11:08 PM
 
Although most of the DotNetNuke framework code including various HttpHandlers and providers is compiled into various assemblies in the site's /bin folder, the website itself is a website project (WSP) which is dynamically compiled as needed. Therefore, the code behind files such as default.aspx.vb and various user controls .ascx.vb must be included in the various packages and must be uploaded to the production web server. Most module projects and other extensions use the website application project (WAP) approach and have their source code pre-compiled into assemblies. Those projects do not require .vb files to be included in the install packages or uploaded to the server.

Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
2/24/2011 11:52 PM
 
Just a heads up - there are no security or safety risks associated with having code behind elements on a production server.
There is no way to access these files unless you have root access to the file system via tools such as an ftp server or a system level file management tool. IIS blocks all attempts to access such files at the server level.

Westa
 
New Post
2/25/2011 4:02 PM
 
I must have been away for DNN longer than I thought.  It didn't used to be this way.  Why the change in direction William?

" there are no security or safety risks associated with having code behind elements on a production server."

I beg to differ Wes.  Having .vb files on the server gives you Security through Obscurity.  IIS may not serve up those files by default, but it only takes one bad configuration change, or an overly generous FTP account and suddenly the source to your entire web site is laid bare.

Most people with a bit of programming knowledge can decipher a .vb file.  That would give them all they'd need to know in order to find your customer information, the encryption format for your sensitive data, etc.

By contrast, a compiled DLL file is opaque.  I'd guess that less than 1% of experienced programmers would even be able to uncompile and decipher their contents.  The level of security shoots way up.

Wasn't this one of the big advantages ASP.NET offered over scripting languages like ASP, PHP and ColdFusion?  You could compile your code for faster execution and better security.  I don't understand why DotNetNuke would take what seems like a step backwards and ship with source code instead of compiled executables.
 
New Post
2/25/2011 7:59 PM
 
1. if your site is so badly configured that you have managed to allow a user access to a .vb or .ascx file directly via a http call thru IIS, as opposed to thru the IIS pagehandlerfactory then you site would be non-functioning.  Access to all files in the asp.net ecosystem is controlled via IIS and its handlers and filters - these would effectively need to be deactivated to access such a file.

2. if your site is exposed via FTP then you have much bigger issues than some user having access to generic DNN .vb UI code that can be downloaded for free by anyone with a web browser.

3. in fact anyone can download a decompiler for asp.net dll's - there are both free and commercial ones that can pull apart any dll and revert it to c# or vb in a matter of seconds.

4. There is actually very little performance difference in asp.net 3.5 between code in a dll and code in a .vb file.  There is a tiny impact on the first access to a .vb code page during which time the page is compiled and stored in the compile cache - but apart from that one off hit - they both run at exactly the same speed.

5. There are however HUGE development time gains to be had from developing using the WSP model for UI interface layers if your code is effectively open source.  The main advantage is no compile cycle during development ... code can be modified and run with a simple page refresh of your web browser ... as opposed to a compile cycle inside visual studio and a complete restart of the application pool inside asp.net due to a file in the bin folder being updated.

6. As for exposing your sensitive encryption format - well thats where the beauty of asp.net comes to the fore.  You CAN put code in a dll if you like - and in DNN all the core business rules, data providers, http providers - and many 3rd party modules work this way.  But for you generic UI layer it makes a lot of sense to NOT do things that way.

In dnn there are hundreds of UI modules and components that make up the visual interface that is seen by users.  These are often developed by different people and in different locations - by moving all these elements to a WSP model - there is no NEED for separate projects and dll's for each of these modules - something that would be a management nightmare.

Instead each of these modules and components simply exist with their aspx and aspx.vb code in a folder inside the WSP project - and get compiled on the fly when needed. 

Just my 2 cents.

Westa
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Why are source files included in the Install and Upgrade distros?Why are source files included in the Install and Upgrade distros?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out