1

I have 3 differnt websites on same webserver under a root directory. A lot of the code is the same across all 3 websites.

I wanted to see if there was a way to move code from all 3 websites up one level (outside the website itself) to the root directory (where the folders for each website are contained.

EX. The root directory is c:\ (where i want to move the files to and access from each indivual website. The websites themselves are contained in c:\Website1, c:\Website2, etc.

So is it possible to move code from c:\Website1 to c:\ and access it from c:\ in the c:\Website1 website?

If you need more details or I am not clear let me know.

Thank You.

Brad
  • 3,454
  • 3
  • 27
  • 50

2 Answers2

2

I recommend putting the library DLL in the GAC.

Consider this: what if you need to update the library DLL to support new features for one site, but this introduces incompatibilities with the other sites? The GAC supports multiple versions of the same assembly, so you can update the web sites separately, if desired.

Paul Williams
  • 16,585
  • 5
  • 47
  • 82
  • The problem with the dlls is we do not have access to the QA and PROD servers to register the DLL's on those machines. So if we could just create a folder at c:\ called "SharedCode" or something and reference the .cs files and controls that would be great. The dll would work for the .cs files but not for the controls (and a few other files that are not .cs files) – Brad Feb 20 '13 at 16:15
  • How do you update the QA and PROD servers with changes? Do you have a setup program or other batch that installs the web site code? If so, then the setup program or batch should have access to the GAC. – Paul Williams Feb 20 '13 at 16:33
  • If you don't have access to those servers, it ought to be your responsibility to make an installer for your Prod/ QA maintainers that does the needed work, or to provide those people instructions on how to use [GACUTIL](http://msdn.microsoft.com/en-us/library/ex0ss12c(v=vs.80).aspx). – Reacher Gilt Feb 20 '13 at 17:19
  • We have a roll tool that was built so that we do not have access to the servers, but we can roll files from DEV (which we do have access to) to QA and then PROD. – Brad Feb 20 '13 at 17:37
  • Is it possible to modify that tool? It certainly seems justified in this case. – Reacher Gilt Feb 20 '13 at 21:10
  • No the tool is a company wide tool, it is not anything we can modify – Brad Feb 21 '13 at 14:25
  • This doesnt work for what I want it to do, but answers my question for how to do it if I need to. – Brad Feb 22 '13 at 13:27
0

Depending on what you are trying to accomplish placing them inside of a dll may make since. I would advice placing those in folder: c:\libs\ and then you could access it via: ..\libs\

Anthony Nichols
  • 1,586
  • 2
  • 25
  • 50