Tuesday, 4 September 2012

Enabling IIS log files on Windows 7



I'm baffled. IIS 7.5 does not log to files by default, you have to enable the feature manually. In the settings it's called "HTTP logging", here's how to enable it:

If you can't find IIS log files in C:\inetpub\logs you should open your IIS Manager and check if the logging option is present in the IIS menu section (top right in the screenshot).

 
If you can't find the Logging option, go to: Control Panel\Programs -> Turn Windows Features on or off to enable IIS logging.
 

I had to close the IIS Manager and open it again for the changes to take effect. Now the IIS should log to C:\inetpub\logs.

After some intense Googling, I was able to find this article by Microsoft: Enable or Disable Logging (IIS 7). It states that logging is enabled by default in IIS 7. This does not seem to be the case on my IIS 7.5 (Windows 7 Enterprise). 

Monday, 3 September 2012

Visual Studio 2012 Launch Event in Hyderabad



Visual Studio 2012 Launch
 
Organizations that are able to move forward with velocity on realizing value opportunities through such 
modernization investments as Application Lifecycle Management (ALM) stand to attain a competitive
advantage in the industries they serve. Organizations that are first to realize such opportunities stand to 
establish ground as domain leaders. We are excited to announce the release of a new  
Visual Studio 2012 Launch Event, to help you capitalize on this opportunity immediately.
 
Rise to new opportunities with Visual Studio 2012
Date: 17 September
Time: 10:00 am - 5:30 pm
Check in: 10:00 am
Place: Taj Deccan, Banjara Hills, Hyderabad-India
 







We hope you’ll join us for this Visual Studio 2012 launch event.

Microsoft Announces "Second Shot" offer for Microsoft IT Academy Students


Hello again with great news for you and your students.  Today, Microsoft announced the Second Shot offer for Microsoft IT Academy students.  That means if your students take an IT pro or developer certifificaiton exam and don't quite make the passing score, they can take the exam again for free.  This offer comes at a good time since Microsoft recently reinvented the professional certification program to validate a deeper set of skills on the newest technologies.  Your students can enter their certification exam with a bit more confidence knowing they get a second chance at passing. This special offer is good for any Microsoft IT professional or developer certification exam with the 73 prefix, and is availble between August 28, 2012 and June 30, 2013.  To get Second Shot certification vouchers can go to the Microsoft IT Academy member site and following the instructions to order from Prometric.

Sunday, 2 September 2012

Here's Practice Test/Questions for the MCTS Self-Paced Training Kit (Exam 70-536): Microsoft .NET Framework - Application Development, 1st Edition.

  1.What is the preferred way for a service to interact with a user?

A. By writing an event to the event log
B. By opening a dialog box
C. By writing a message to a text file
D. By opening a Web browser

Microsoft Press :  The correct answer is A. Services do not have a user interface. Therefore, they cannot directly interact with the user by opening a dialog box or Web browser. Instead, you should write events to the event log. Although you could write messages to a text file, the event log is easier to manage, especially in enterprise environments.

2. You are writing an application that connects to a network resource using SslStream.

Which of the following types of exceptions should you catch so that you can retry authentication with a different set of credentials if authentication fails?

A. AuthenticationException
B. FatalAuthenticationException
C. InvalidCredentialException
D. Exception
Microsoft Press :   The correct answer is A. The NegotiateStream and SslStream classes throw an AuthenticationException when the client or server cannot be authenticated. When this exception is thrown, you can retry the authentication with different credentials.

If a FatalAuthenticationException is thrown, you cannot retry authentication.

If an InvalidCredentialException is thrown, the underlying stream is not in a valid state and you cannot retry the authentication using the NegotiateStream or SslStream instance.

While catching an Exception would catch any authentication exception, it does not allow you to distinguish between authentication errors that allow retrying different credentials.


3. Which of the following elements is NOT required if you want a custom class to raise an event?

A. A class that raises the event
B. A class that holds event data, derived from System.EventArgs
C. A delegate for the event
D. A method to add an event handler

Microsoft Press :    The correct answer is D. You do not need a method to add an event handler; that functionality is provided by the .NET Framework.

If you want to raise an event in a custom class, you need a class that holds the event data (either EventArgs or a class that inherits from EventArgs), a delegate for the event, and a class that raises the event.


4. You are in the process of isolating a complicated bug in a Console application that occurs only in rare circumstances. You need to write information to the debugging console, but you do not want to waste processing cycles when users run release versions of the application.

Which method should you call?

A. Console.WriteLine
B. Debugger.Log
C. Debug.Assert
D. Console.Write

Microsoft Press :     The correct answer is B. Debugger.Log posts information to the attached Debugger if one is present. If no Debugger is present, the result is effectively nothing.

Console.Write and Console.WriteLine are processed in both debug and release versions of code. The output is written to the console, not to the debugger.

Debug.Assert validates a value and does not output information to the debugger.

5. You need to pause a thread to ensure that other threads have sufficient processor time. You need to resume processing of the thread later.

Which method would you call?

A. Thread.Suspend
B. Thread.Abort
C. Thread.Sleep
D. Thread.Interrupt
Microsoft Press :     The correct answer is C.
hread.Sleep seems to be the correct call. MSDN - Passing and resuming Threads States: "
You can also have threads put themselves to sleep. When threads are blocked or sleeping, you can use a ThreadInterruptedException to break them out of their wait states.

The Thread.Sleep Method

--------------------------------------------------------------------------------

Calling the ThreadSleep method causes the current thread to immediately block for the number of milliseconds you pass to ThreadSleep, yielding the remainder of its time slice to another thread. One thread cannot call ThreadSleep on another thread.

Calling ThreadSleep with TimeoutInfinite causes a thread to sleep until it is interrupted by another thread that calls ThreadInterrupt, or until it is terminated by ThreadAbort.

Interrupting Threads

--------------------------------------------------------------------------------

You can interrupt a waiting thread by calling ThreadInterrupt on the blocked thread to throw a ThreadInterruptedException, which breaks the thread out of the blocking call. The thread should catch the ThreadInterruptedException and do whatever is appropriate to continue working. If the thread ignores the exception, the runtime catches the exception and stops the thread."
6. Which of the following is a first-in, first-out (FIFO) collection?

a. [b]Queue[/b]
b. [b]Stack[/b]
c. [b]List[/b]
d. [b]Hashtable[/b]
Microsoft Press :     The correct answer is A. The Queue class is a FIFO collection.

The Stack collection is a last-in, first-out collection.

The List class does not support ordered retrieval.

The Hashtable class does not support ordered retrieval.
7. You are in the process of isolating a complicated bug in a Console application that occurs only in rare circumstances. You would like to pause execution to examine the values of variables during debugging, but you do not want to pause execution when users run release versions of the application.

Which method should you call?

A. Console.ReadLine
B. Debugger.Break
C. Debug.Assert
D. Console.Read
Microsoft Press :     The correct answer is B. Debugger.Break acts just like a hard-coded breakpoint, except that you can call it programmatically. The Debugger class is only used in debug releases.

Console.Read and Console.ReadLine interrupt processing in both debug and release versions of code.

Debug.Assert validates a value and does not stop execution during debugging.

Resource :
Microsoft Press®. Books designed for the different ways you learn. And across the range of Microsoft technologies.