Re: How to share code between two different sites?



re:
I am just worried about sharing code

Tell me, how do you plan on customizing each
application if you have common code for all ?

Are the applications *that* identical that the same code works for all ?

In that case, what's stopping you from having 3 different projects,
and just updating the projects with a batch file copy ?

Then, publishing to the 3 apps is only one click away for each app.




Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Neo" <pravinsable@xxxxxxxxx> wrote in message
news:1153015707.127591.232360@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Three servers are given since all they are for different clients. But
common code is just same.

I am not that much worried about update to three servers. I am just
worried about sharing code. Appearantly there doesn't seem to be any
mechanism to share code of different websites. When I say website I
don't mean sharing code on different server, I just mean sharing code
in my development machine. Update can be done later whenever there is
patch to be given. I can update three websites manually, what I am not
comfortable adding dll to each site manually (which I might forget :-))

Juan T. Llibre wrote:
re:
I have three websites on three servers.

You *really* should have mentioned that from the beginning.

That looks like it's an awful waste of resources.

What prevents you from having eveything in one server,
where you *could* share* resources ?

re:
As the code is growing, I have to find a
mechanism of automatic update of shared code

If your code is in 3 disconnected servers, I doubt you'll find one.

I don't think you'll find that feature on *any* server,
but if I'm mistaken, I'd learn something of value.

You might look, if you need 3 servers after all, into creating a cluster or a server farm.
That is not so hard to do, and it will make the multiple updates possible.

re:
Does Visual studio has any facility like that?
putting dll in multiple paths after compilation?

Not that I know of, and especially not to 3 disconnected servers.
Again, I don't think that *any* platform allows that.

re:
I am thinking of writing customize batch program which not only
compiles the common code but adds it to specified directory.
This way I can automate the compilation process.

That's a possibility which might work.



Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Neo" <pravinsable@xxxxxxxxx> wrote in message
news:1152998948.077825.59920@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
That doesn't solve my problem though. I have three websites on three
servers. As the code is growing, I have to find a mechanism of
automatic update of shared code. but looks like there isn't any.

I am thinking of writing customize batch program which not only
compiles the common code but adds it to specified directory. This way I
can automate the compilation process. Does Visual studio has any
facility like that? putting dll in multiple pathes after compilation??
-neo

Juan T. Llibre wrote:
re:
Is there really no solution from microsoft to update dll automatically?

Placing an assembly in the GAC will make the
assembly available to all applications on the server.

One dll...one dll update when needed...all applications are served.

Updating the dll is a bit trickier than usual but if you want one dll,
putting the assembly in the GAC is the only way to do it.




Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Neo" <pravinsable@xxxxxxxxx> wrote in message
news:1152995746.019315.169870@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I just checked and found
1. You can't add child project to website.
2. Whenever you add reference to a dll, it gets copied in /bin folder
so you are always using duplicate not the orignal dll.

So effecitively, when we create update dll we must add it manually to
all websites. That sounds like nightmare. Is there really no solution
from microsoft to update dll automatically???

Web services sounds real cool solution but why won't that be slower if
network between servicing site and using site is slower?

-Neo

Neo wrote:
so what you mean, is child class project can refer to files outsite the
website folder? Isn't this flaw in secuirty? Normal aspx pages must
stay in webfolder where as class files can be outsite? I was under the
imporession all class files must be in app_dir folder.
-neo

matt@xxxxxxxxxxxxxx wrote:
Harolds wrote:
If you add the "class libraries" project to each web site solution you ["dont" ? -matt]
have
to worry about the redistribution of the dll, and you can add/update the code
in the class libraries from either web site solution.

ah.. so youre saying instead of just coping the black-box .DLL to each
website, have each website's solution include the class library as a
child project.

yes that could be a better way to do it -- since each website points to
the same class project on the file system, it will build & include the
latest into that particular website.


matt



.



Relevant Pages

  • Re: How to share code between two different sites?
    ... Each website has customize code as well as re-used common code. ... Three servers are given since all they are for different clients. ... comfortable adding dll to each site manually ) ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How to share code between two different sites?
    ... Three servers are given since all they are for different clients. ... comfortable adding dll to each site manually ) ... This way I can automate the compilation process. ... You can't add child project to website. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How to share code between two different sites?
    ... servers. ... automatic update of shared code. ... One dll...one dll update when needed...all applications are served. ... You can't add child project to website. ...
    (microsoft.public.dotnet.framework.aspnet)
  • auto-refresh path
    ... Which takes care of auto-update so, adding dll ... If your code is in 3 disconnected servers, ... You can't add child project to website. ... in the class libraries from either web site solution. ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Correlating an IP address with a phone number
    ... Most dial-in servers store the caller-ID info in the MIB. ... MIB and get both the IP address and phone number of a user. ... Audit your website security with Acunetix Web Vulnerability Scanner: ... Up to 75% of cyber attacks are launched on shopping carts, ...
    (Pen-Test)