开发者

Line numbers do not appear in stack trace of exceptions thrown from COM+ Applications. Why?

The title basically summarizes it.

I have a COM+ Server Application implemented using VB.NET 2010, that was configured to gather data from its own .config file by using the procedure described in http://msdn.microsoft.com/en-us/library/windows/desktop/ms685134(v=vs.85).aspx .

So far, it seems t开发者_StackOverflow社区o work like a charm. And I, foolishly, assumed that should be enough for it to know where to pick the .pdb files containing debug info, and include such info when unexpected exceptions arise from it. (The .pdb files are there, btw... right next to the .dll files that comprise the COM+ Application).

Looks like I was wrong, after all; all exceptions thrown from the COM+ Application show the functions being called, but not the related line numbers.

Do I need to do something else in order to make my COM+ Application to return not only function names, but also line numbers in the stack trace returned by exceptions being raised on it?


Bingo!

After 1 year of intermittently looking for the answer, I think I finally found something that works.

You see, as a recommended practice, MS asks you to place your COM+-exposed assemblies in the GAC. Guess what? If you place the .pdb files inside the GAC folder that contains these assemblies, all of a sudden, .NET can now find the damn .pdb files! And now all stack traces have the line numbers in them! YAY me!

UNFORTUNATELY, there doesn't seem to be a way to (or tool that) places .pdb files automatically next to the .dll files in the GAC. Oh well, guess I'll have to do it on the installer...

But for now, mission accomplished!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜