Frequently Asked Questions

The following Frequently Asked Questions, answered by the authors of this book, are designed to both measure your understanding of the concepts presented in this chapter and to assist you with real-life implementation of these concepts. To have your questions about this chapter answered by the author, browse to www.syngress.com/solutions and click on the "Ask the Author" form.

Q: Is the Try-Catch-Finally block available in C# as well?

A: Yes, the Try-Catch-Finally block is available in both VB.NET and C#.

Q: Can I use both structured and unstructured error handling within a function/subroutine?

A: No, you cannot use both error handling mechanisms at the same time. It is recommended you use structured error handling in .NET.

Q: When I try to run my ASP.NET application in VS.NET, I encounter this error message "Error while trying to run project: Unable to start debugging on the Web server.The project is not configured to be debugged."Why does this occur?

A: This is caused by the setting of the debug attribute within the <compilation> element. During development stage, set the value of the debug attribute to "true." Remember, however, to set this attribute to "false" when you are ready to deploy your application.

Q: I noticed during tracing that the Session ID for my application changes when I refresh my page or when I do a postback.Why is this happening?

A: For performance reasons, the .NET Framework does not maintain state between the Web server and the Web browser automatically, hence the Session ID is always different between submissions. However, when the Session object is used or when the Session_OnStart() event is added to the global.asax file, the Session ID would be maintained between postbacks.

0 0

Post a comment