为什么我的 MarshalByRefObject 对象没有命中断点?
我在 Windows 7 上的 IIS 7.0 中工作。我有一个派生自 MarshallByRefObject 的类。当我构建它时,它会按照应有的方式给我我的代理。我在相关对象上设置了断点。该类是从另一个从 IIS 处理的 GET 请求运行的类调用的。调用者正在 IIS 工作进程 (w3wp.exe) 上运行,并且其断点被命中(即,我在 [1] 和 [2] 处都有断点,但只有 [1] 处的断点被命中)。
public class Caller
{
public void Process()
{
var callee = new Callee();
callee.Method(); // [1]
}
}
public class Callee : MarshallByRefObject
{
public void Method()
{
DoSomething(); // [2]
}
}
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]
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你如何引用被调用者?我假设它们不在同一个项目中,因此请检查:
How do you reference the Callee? I assume they are not in the same project, so check that:
因为 MBR 上的方法不会在同一进程中执行(我假设您不只是在单个进程内跨越 AppDomain)。您仅拥有对代理的引用,但方法主体实际上并未在调用者 AppDomain 中执行。
检查您是否已连接到可能存在的服务流程。
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.