Problems with Activated and Well-known objects

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi group and excuse for my english:

This is the situation: I have a class which I want to access remotely.
The code of the class is as follows:

public class clsClass:MarshalByRefObject
{
public clsClass() {}
public clsClass(string strParam): this() {}

public string strTime () {
return DateTime.Now.ToString();
}
}

If I define a client.config in this way:

<client url="http://header";> ("header" defined at the DNS)
<activated type="Classes.myClass, Classes" />
</client>

And the web.config is:

<service>
<activated type="Classes.myClass, Classes" />
<wellknown mode="Singleton" type="Classes.myClass,Classes"
objectUri="myClass.rem" />
</service>

And I try to access to a method of this class:
Classes.myClass objClass = new Classes.myClase();
Classes.myClass objClase2 = new Clases.clsClase("Prueba");
textBox1.Text = objClase.strTime();

When I try to access to the "strTime" method, the server sends an error
"Server encountered an internal error. To get more info turn on
customErrors in the server's config file."

I've tried to solve this error by changing the client.config in this
way:

<client url="http://header";> ("header" defined at the DNS)
<wellknown mode="Singleton" type="Classes.myClass,Classes"
url="http://header/myClass.rem"/>
</client>

Now, I can access to the class methods but, in this case, the problem
comes from the constructor with parameters. I've seen that "It's by
design Well-known(server activated) objects are instantialized by
default constructor only"

That's my problem, anyone could tell me what I'm doing wrong?

Thank you all in advance!

.



Relevant Pages

  • Re: Posting Trivia (FWIW)
    ... server software package that's being used) of *THE NEWS SERVER MACHINE* ... This line is added to the header of a posted article by the server. ... domain name of the client host posting the article. ... the DNS on the IP address of the client. ...
    (misc.rural)
  • Re: Posting Trivia (FWIW)
    ... server software package that's being used) of *THE NEWS SERVER MACHINE* ... This line is added to the header of a posted article by the server. ... domain name of the client host posting the article. ... the DNS on the IP address of the client. ...
    (misc.rural)
  • Re: Clients cannot find sharepoint
    ... The client machines had an entry in the append DNS ... Get ipconfig/all result on SBS and client computer. ... This newsgroup only focuses on SBS technical issues. ...
    (microsoft.public.windows.server.sbs)
  • Re: Internet Speed
    ... I think what we are trying to say is to use the DHCP from the SBS and NOT ... DNS and WINS point to the SBS. ... as the server IP address. ... it is recommend to configure all SBS client computers' IP and DNS ...
    (microsoft.public.windows.server.sbs)
  • Re: GPO problems
    ... It was the ISA 2004 firewall client. ... DNS settings and network properties on the server and client computers. ... > Service of SBS is configured to be the DNS server on the problematic ...
    (microsoft.public.windows.server.sbs)