.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

.NET Matters: Handling Messages in Console Apps

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

Many developers who use the Microsoft .NET Framework think that application type is tied to the libraries that can be used in that application. Stephen Toub clarifies.

Stephen Toub

MSDN Magazine June 2007

View Complete Post

More Related Resource Links

Test Run: Testing Silverlight Apps Using Messages


Silverlight greatly simplifies the process of building rich Web applications, and we'll walk through an example of using Messages as a quick method of interactively testing simple Silverlight apps.

James McCaffrey

MSDN Magazine March 2010

Mobility: Add Keyboard Support to Compact Framework Apps by Trapping Windows Messages


The Compact Framework Control class doesn't provide direct access to Windows messages. However, with P/Invoke, a few lines of native code, and the Compact Framework MessageWindow class, it's still possible to access underlying Windows messages. This can be used to work around any .NET Framework features, including keyboard support, that are not included in the Compact Framework.

Alan Pulliam

MSDN Magazine April 2004

Running console apps on host vs dev machine

I've always assumed that you could not run code against a remote SharePoint server outside of webservices. Is this correct or is there something similar to the ICredentials / NetworkCredentials objects that you use for webservices.   I wanted to use an app I wrote on a MOSS 2007 Dev machine but the SPS 2003 machine does not have the needed libraries v12.0 libraries. This makes sense but of course I tried to get it to run anyways. Now I'm in the middle of installing Visual Studio on a SPS 2003 dev machine and wanted to see if there was a different way.   Thanks

Error handling, multiple error messages

Hi all. Have you noticed that sql server catches only last error message? Try to run this: exec('create table #t ( t1 timestamp not null default 0 )') You get: Msg 1755, Level 16, State 0, Line 1 Defaults cannot be created on columns of data type timestamp. Table '#t', column 't1'. Msg 1750, Level 16, State 0, Line 1 Could not create constraint. See previous errors. Now try to run the same thing in try catch: begin try exec('create table #t ( t1 timestamp not null default 0 )') end try begin catch declare @Error varchar(max) set @Error = error_message() raiserror(@Error, 16, 1) end catch The error message this time is: Msg 50000, Level 16, State 1, Line 10 Could not create constraint. See previous errors. Does anyone have any better ideas how to handle sql server errors? Thanks      

Handling Messages in Windows Application (C#)



Hi all,


As known, regular windows application has following entry point:


Code Block


static void Main()







while Application.Run(); command starts application message loop.


I have another process (MFC application) that sends custom message

Serving Silverlight Apps from Windows Mobile

Even if mobile dev is not my every day work, thanks to the .Net Compact Framework, it's still .Net programming.

Here is the scenario:

You come back home, you have a windows mobile phone wifi capable and you want to quickly get access to your phone pictures from your home network.
You just activate the Wifi, run my app and then browse to the provided link from any computer on the network.


Every self-respected programmer should include exception handling techniques. Sometimes your application will generate an error. Regardless of who was responsible for this error, the programmer or the user, it is up to the first to include the necessary exception handling techniques to keep his/her program from crashing. The .Net environment provides useful techniques for avoiding disastrous errors such as try-catch statements and user-defined exceptions.

Practical Multithreading for Client Apps

Writing applications that use multiple threads is often considered an advanced programming task, prone to errors. In this month's column, I'll focus on a practical application of multithreading in Windows® Forms applications with some real benefits, while attempting to keep things simple. My goal is to present multithreading in an approachable way that addresses a very common need: writing applications with a user interface that remain responsive to the user.

Global Exception Handling with ASP.NET

After your global exception handler has done its work, you'll want to redirect the users of your website to a friendly page that tells them that something has gone wrong, and then provide them with customer support information as well as a link back to your web application's home page.

SQL Server 2005 Try and Catch Exception Handling

I'm pretty excited to see that there is some real error handling for T-SQL code in SQL Server 2005. It's pretty painful to have your wonderfully architected .NET solution tainted by less-than-VBScript error handling for stored procedures in the database. The big difference being the addition of TRY..CATCH blocks. Let's take a look:

Handling 404 page not found with Error page



      How do i handle 404 page not found?

User messages without hard coding


Hi All,


How to manage user messages to avoid hardcoding messages accross the web application.





Error while using exception handling block el 4.1


Hi Folks,


i am trying to use tyhe exception handling block of Enterprise library 4.1.


I just createda polisy and used IndexOutOfRangeException and added a replace handler and a logging handler to it.

I am using the NotifyRethrow PostHandlingAction to the exception.


During runtime I am getting an exception on the HandleException event, The exception is added below:



Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

Line 42:             catch (Exception ex)
Line 43:             {
Line 44:                 bool reThrow = ExceptionPolicy.HandleException(ex, "ReplacePolicy");
Line 45:         

iPhone and mobile apps


Hi Guys,


I would like to develop a mobile application such as the one you find in iPhones but I don't know from where to start!!? I'm not looking for something complicated, just an a static application of an eBook that users can read an flip the pages, I don't think that you can do such animation easily in ASP.net so does anyone knows what tool that I can use to develop such application?






ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend