Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

When I use objects like System.Web.UI.Page, I can generate exceptions that will occur inside some properties or methods. For instance, If I try to access the "Session" property in the Page Constructor, it will generate an error. However, the code that threw the exception will always be hidden from me. I mean I will never see the "throw new Exception" line inside the "Session" property of the Page object in my browser. The browser will show me my own line, in witch I called the "Session" property.

 

Example:

 

public class MyPage: Page

{

 

public MyPage()

{

Session["test"] = "test";

}

 

}

 

This code will generate an exception. However, even if the exception is thrown inside the Session property, my browser will only show me my own code. I wonder how to do that with my own code. This could be very usefull.

Posted
try not building with debugging information (use release mode)

 

Ok can you elaborate? I think I understand what you mean but I dont really know how to do that in Visual studio. So you're telling me this is done without adding any kind of code in my DLL. All I have to do is to use the DLL in "release mode" instead of "debug mode". I'll try to find out by myself but If you could tell me how to do it, It'll be helpfull!

 

Thank you.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...