0

When an ASP.NET application is published using the publish option in Visual Studio a series of DLLs are produced in the BIN folder on the web server. What is the difference between the DLLs generated by Visual Studio specifically for ASP.NET and a standard Class Library?

I am wanting to reuse code in classes that are contained in an ASP.NET application.

One option for me is to convert the ASP.NET classes into a class library and hence the reason for this question. The other option is to use a web service to expose the functionality required by other applications.

3 Answers 3

1

There is no difference between DLL's generated by ASP.NET and a standard class library. Although the web application project produces a DLL, which can't really be reused (well it could, but it contains the code-behind of your pages and user controls, but not the markup), every other DLL can be reused.

Using services and implementing Service Oriented Architecture (SOA) is another option too, so it really depends on what your requirements are, and what you are trying to reuse.

Sign up to request clarification or add additional context in comments.

Comments

0

The main reason for choosing a class library over built in classes is so they can be shared with other projects, or the DLL could be distributed for further use.

The benefits of a class library that I can think of are:

  • Tidier project structures
  • Quicker Project build time
  • Different versions of your library can be referenced, hence resilient to upgrades

I generally use web services for projects that require communication between applications/servers, rather than wrapping common code.

Comments

0

You should extract the code you want to reuse in a separate assembly and reference it in the web project and in the other project. Don't use the assemblies with the web pages and other application specific code in another application.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.