views:

118

answers:

4

We have several VB.NET websites running internal applications. These sites are often modified with minor changes, and are maintained on the server as uncompiled code.

I'm looking for the best way to maintain classes so that we can reference them from multiple websites. Specifically, we're looking to put some common functions (error logging, common database calls, etc.) into a centralized location where they can be maintained separately from the sites and called as needed. And we'd prefer to have this on the server as uncompiled code, so it can be uploaded without precompiling.

I feel like I'm missing something obvious, but what is the best way to set this up?

+1  A: 

Depends on how your websites are hosted.

If you're using a hosting provider (like godaddy.com), you could call methods from the class via a web service.

Or if all the websites are on the same machine you could drop your DLL into the GAC and reference from there.

JMP
+1 for web service
Jason
A: 

We use source control (spec. SVN) for this kind of stuff. Set the common stuff up as external references then any updates to them will be shared to the specific websites. No branching is required.

Decker97
Thanks, that's an interesting idea. This would be one way to address our need, but I'm still wondering if there's not a way to keep from having the code copied out to multiple places on the server.
Donald Gower
A: 

I think best way to put these classes in seperate library and add reference in your multiple website, if there is change required simply change in library and update dll for other website as well

Muhammad Akhtar
A: 

One approach I've found to this is to use symbolic links. Specifically with the 'fsutil hardlink' command, I can create a hard link in the App_Code directory of each application that points to the common class file. Then it can be referenced in the code as though it is local to each application.

Donald Gower