Over a million developers have joined DZone.

Simple Steps to Convert Code Behind Files or Class Files Into One DLL File

A quick tutorial to keep your application secure by creating a package that does not explicitly contain code behind files or class files.

· Web Dev Zone

Start coding today to experience the powerful engine that drives data application’s development, brought to you in partnership with Qlik.

Background

A few days back, I got a requirement from a client saying that they needed a package of the project which should not explicitly contain any code behind files or class files, because their code had some confidential data and they didn't want to explicitly transfer it. You can find the solution to our problem below. 

Step 1

First, develop your ASP.Net web application. Once everything is ready for deployment just go the option Build->Publish Web Site like the screen shot given below.

Step 2

Give any profile name appropriate to the project.

Step 3

Here, select the option as "Web Deploy Package" like below:

Step 4

Here's a very important step: Just click the "File Publish Options" drop down menu and tick the box that says "Precompiled During Publishing".

Note

Above is the option which converts into dlls.

Step 5

Verify the location where you want to store the files.

Step 6

Finally click the Publish button below:

That's it. After a few minutes, it will generate the files required and put it like the below structure.

Output

Note

All the code behind files were converted to the APP_Code.dll, since we have placed some other class files in the APP_Code folder of the project. Even if we had plenty of code files it will just convert into this one app_Code.dll file.

Hope the above information was useful! Kindly share your feedback or thoughts.

Create data driven applications in Qlik’s free and easy to use coding environment, brought to you in partnership with Qlik.

Topics:
c# ,asp.net ,classes

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}