.NET Classes and Different Domains

T

Trevor Oakley

I have written an account/cart/search facility at redburg.co.uk and
now I need to implement it elsewhere, eg at safavid.co.uk.

The closest parallel solution I can think of is a Java Package which
has several classes and can be accessed via a routine. Similarly I
would like to bundle the c# code (eg cart etc) into a class
(namespace) and then deploy that but allow access from some control
routines from new domains.

I need therefore to implement the classes and domains so that they can
be usuable across different domains. I tried just copying the code
into a new class but it failed on the codebehind. I would like any
help on this.

I have a working solution but just copying the whole project.
Obviously this is not very desirable as it means muliple copies of
source code.

The db design (MS SQL) and XML interfaces allow any catalog to be
built and therefore only different input data is needed. This is
obtained via data entry. But some minor changes are needed (eg
headings), they are very minor and appear in the HTML or customising
the data conversion (data load) since the input data is not formatted
the same from different sources.
 
N

Natty Gur

Hi,

If you looking for mechanism such as java Naming services ... there
isn't equivalent in .Net.
but if your solution packed in library you can sigh that library,
deploy it to GAC and load it from any application (app domain) in your
machine.

if you need to share library over machines you need to implement code
that should support naming services. contact me directly so I can guide
you.

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
 
T

Trevor Oakley

Thanks for this suggestion.

I do not want to mirror a Java solution, I only gave that as an example.

I was only introduced this year to ASP.NET and C# so I dont know a lot.

I am not a Java expert, my own background is a generalist and I have
worked with a wide range of technologies.

The basic problem I have is grouping classes in ASP.Net and when I tried
changing Namespaces I got a lot of codebehind problems. Since I am not
in control of IIS, I dont know if these are IIS related or code related.

Basically I have core functions which can work with all domains, and
then some interfacing which is unique.

eg

namespace Accounts
{
// defines all methods for accounts, eg ordering, cart, billing
public class Cart: System.Web.UI.Page
{
// handles cart options, eg add/del etc

name Safavid
{
// local application uses all methods of Cart
Accounts.Cart thisCart = new Accounts.Cart();
// read basket
thisCart.AddPart(PartNumber.Text);

I want to do something like this, so all methods of Cart are used in a
DLL.

When I tried this I got codebehind errors.

So in the end I just copied the source code compiled and deployed the
whole project.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top