Question

I'm working in IIS 7.0 on Windows 7. I have a class that derives from MarshallByRefObject. When I construct it's giving me my proxy as it should. I have breakpoints set on the object in question. The class is called from another class running from a GET request being handled by IIS. The caller is running on the IIS worker process (w3wp.exe) and its breakpoints are being hit (i.e. I have breakpoints at both [1] and [2], but only the breakpoints at [1] are getting hit).

public class Caller
{
    public void Process()
    {
        var callee = new Callee();
        callee.Method(); // [1]
    }
}

public class Callee : MarshallByRefObject
{
    public void Method()
    {
        DoSomething(); // [2]
    }
}
Était-ce utile?

La solution

Because the method on your MBR doesn't execute in the same process ( I'm assuming you are not just crossing AppDomains inside a single process ). You only have reference to a proxy but the method body doesn't actually execute in the callers AppDomain.

Check to see that you're attached to the service processes that it could potentially be.

Autres conseils

How do you reference the Callee? I assume they are not in the same project, so check that:

  • Both projects are built properly
  • There is only one instance of the Callee project executable (dll or exe) on your system, including GAC. You should use GacUtil to check if your assembly is in GAC (google about it).
  • Callee project is built in debug mode.
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top