Configuring and Deploying Web Applications

by John Lockwood 28. November 2009 03:10
  • Configure providers. May include but is not limited to: personalization, membership, data sources, site map, resource, security
  • Configure authentication, authorization, and impersonation. May include but is not limited to: Forms Authentication, Windows Authentication
  • Configure projects, solutions, and reference assemblies. May include but is not limited to: local assemblies, shared assemblies (GAC), Web application projects, solutions
  • Configure session state by using Microsoft SQL Server, State Server, or InProc. May include but is not limited to: setting the timeout; cookieless sessions
  • Publish Web applications. May include but is not limited to: FTP, File System, or HTTP from Visual Studio
  • Configure application pools.
  • Compile an application by using Visual Studio or command-line tools. May include but is not limited to: aspnet_compiler.exe, Just-In-Time (JIT) compiling, aspnet_merge.exe

Tags: ,

Microsoft Exam 70-562

Programming Web Applications

by John Lockwood 24. November 2009 03:11
  • Customize the layout and appearance of a Web page. May include but is not limited to: CSS, Themes and Skins, Master Pages, and Web Parts, App_Themes, StyleSheetTheme
  • Work with ASP.NET intrinsic objects. May include but is not limited to: Request, Server, Application, Session, Response, HttpContext
  • Implement globalization and accessibility. May include but is not limited to: resource files, culture settings, RegionInfo, App_GlobalResources, App_LocalResources, TabIndex, AlternateText , GenerateEmptyAlternateText, AccessKey, Label.AssociatedControlID
  • Implement business objects and utility classes. May include but is not limited to: App_Code , external assemblies
  • Implement session state, view state, control state, cookies, cache, or application state.
  • Handle events and control page flow. May include but is not limited to: page events, control events, application events, and session events, cross-page posting; Response.Redirect, Server.Transfer, IsPostBack, setting AutoEventWireup
  • Implement the Generic Handler.

Tags: ,

Microsoft Exam 70-562

Hashtable and SortedList Example

by John Lockwood 20. November 2009 09:11
using System;
using System.Collections;

class HashtableSortedListSample
{
    public static void Main(string[] args)
    {
        Hashtable ht = new Hashtable();
        ht.Add("one", "uno");
        ht.Add("two", "dos");
        ht.Add("three", "tres");
        ht.Add("four", "quatro");

        // Since Hashtables are maintained by hash value of keys, 
        // sort order is not obvious
        Console.WriteLine("Displaying Hashtable keys/values:");
        foreach (object key in ht.Keys)
        {
            Console.WriteLine("{0} => {1}", 
            key.ToString(), ht[key].ToString());           
        }
        SortedList sl = new SortedList();
        sl.Add("1", "uno");
        sl.Add("2", "dos");
        sl.Add("3", "tres");
        sl.Add("4", "quatro");

        // Here order is maintained, as you might expect given "SortedList"
        Console.WriteLine("\nEnumerating SortedList keys/values:");
        foreach (object key in sl.Keys)
        {
            Console.WriteLine("{0} => {1}", 
            key.ToString(), sl[key].ToString());
        }

        // We can also iterate the sorted list by index, rather than by key
        Console.WriteLine("\nIterating SortedList keys/values by index:");
        for (int i = 0; i < sl.Count; i++)
        {
            Console.WriteLine("{0} => {1}", sl.GetKey(i), sl.GetByIndex(i));
        }
        // Wait for user input
        Console.ReadKey();
    }
}

Tags: ,

Microsoft Exam 70-536

Roundup of Collections and Generic Collections

by John Lockwood 16. November 2009 02:11

Here are my admittedly rather sketchy connection notes. I noticed that there were a few errors in my edition of the Northrup text. I've tried to correct those here, with any luck without any new ones of my own.

Collections Generic Collections
ArrayList List<T>
StringCollection
Non-sortable, strongly typed list of strings.
 
Stack
LIFO
Push and Pop
Stack<T>
LIFO
Push and Pop
Deque
FIFO
Enque and  Deque
Deque<T>
FIFO
Enque and  Deque
Dictionaries Generic Dictionaries
Hashtable
Dictionary of key-value pairs retrievable by key.
Dictionary<TKey, TValue>
StringDictionary
A hashtable implemented as strongly typed strings.
 
ListDictionary
A dictionary optimized for small lists ( < 10 items), implemented as a singly linked list.
 
HybridDictionary
Implements IDictionary as a list when small, automatically switching to a Hashtable as the list grows.
 
SortedList (Don’t let “List” fool you – this is a dictionary sorted by key), and accessible by either key or index.  Implemented as a pair of arrays – one for keys and one for values. SortedList<TKey, TValue>
NameValueCollection
A collection of key-value pairs of strongly typed strings.  Like SortedList, it can be accessed by either key or index.
 

 

Related Topics:

IComparable Example.

Tags: ,

Microsoft Exam 70-536

Working with ASP.NET AJAX and Client-Side Scripting

by John Lockwood 15. November 2009 03:11
  • Implement Web Forms by using ASP.NET AJAX. May include but is not limited to: EnablePartialRendering, Triggers, ChildrenAsTriggers, Scripts, Services, UpdateProgress, Timer, ScriptManagerProxy
  • Interact with the ASP.NET AJAX client-side library. May include but is not limited to: JavaScript Object Notation (JSON) objects; handling ASP.NET AJAX events
  • Consume services from client scripts.
  • Create and register client script. May include but is not limited to: inline, included .js file, embedded JavaScript resource, created from server code

Tags: , ,

Microsoft Exam 70-562

Simple Encoding Example

by John Lockwood 11. November 2009 22:11
using System;
using System.Text;
using System.IO;

class EncodingExample
{
    // Display some available encodings, and specify 
    // encodings when writing a file
    static void Main(string[] args)
    {
        // Display available encodings
        EncodingInfo[] theEncodings = Encoding.GetEncodings();
        for (int i = 0; i < theEncodings.Length; i++)
        {
            Console.WriteLine("Encoding name:  {0}, Codepage {1}", 
                theEncodings[i].DisplayName,
                theEncodings[i].CodePage);
        }      

        // Write some text out as ASCII
        FileStream fs = new FileStream("some_ascii.txt", FileMode.Create);
        StreamWriter sw = new StreamWriter(fs, Encoding.ASCII);
        sw.Write("Hello world");
        sw.Flush();
        sw.Close();
        fs.Close();
        FileInfo fi = new FileInfo("some_ascii.txt");
        Console.WriteLine("Ascii text file length:  {0}", fi.Length);       

        // Same text to UTF32:
        fs = new FileStream("some_utf32.txt", FileMode.Create);
        sw = new StreamWriter(fs, Encoding.UTF32);
        sw.Write("Hello world");
        sw.Flush();
        sw.Close();
        fs.Close();
        fi = new FileInfo("some_utf32.txt");
        Console.WriteLine("UTF32 text file length:  {0}", fi.Length);
        Console.ReadKey();
    }
}

Tags: ,

Microsoft Exam 70-536

Brief IsolatedStorage Example

by John Lockwood 8. November 2009 10:11
using System;
using System.IO;
using System.IO.IsolatedStorage;

class IsolatedStorageExample
{
    static void Main(string[] args)
    {
        // Normally you use GetStorageForDomain to further limit 
	// access to the file, unless it needs to be accessed 
        // by a single assembly that shared across multiple 
	// application instances.  In that case use GetStoreForAssembly instead.
        // We'll isolate to our current (default) AppDomain

        // Write a string to isolated storage
        IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForDomain();
        IsolatedStorageFileStream isfStream = 
		new IsolatedStorageFileStream("IsolatedStorageFile.txt", 
		FileMode.Create , isf);
        StreamWriter sw = new StreamWriter(isfStream);
        sw.WriteLine("Are we alone?  Can we talk?");
        sw.Flush();
        isfStream.Close();
        
        // Read it back
        isf = IsolatedStorageFile.GetUserStoreForDomain();
        isfStream = new IsolatedStorageFileStream(
		"IsolatedStorageFile.txt", FileMode.Open, isf);
        StreamReader sr = new StreamReader(isfStream);
        string theString = sr.ReadLine();
        sr.Close();
        isfStream.Close();

        Console.WriteLine(theString);
        Console.ReadKey();
    }
}

Tags: ,

Microsoft Exam 70-536

Troubleshooting and Debugging Web Applications

by John Lockwood 4. November 2009 03:11

Configure debugging and custom errors. May include but is not limited to:

  • Set up an environment to perform remote debugging.
  • Debug unhandled exceptions when using ASP.NET AJAX. May include but is not limited to: client-side Sys.Debug methods; attaching a debugger to Windows Internet Explorer
  • Implement tracing of a Web application. May include but is not limited to: Trace.axd, Trace=True on @Page directive,
  • Debug deployment issues. May include but is not limited to: aspnet_regiis.exe; creating an IIS Web application; setting the .NET Framework version
  • Monitor Web applications. May include but is not limited to: health monitoring by using WebEvent, performance counters

Tags:

Microsoft Exam 70-562

BlogEngine.NET Comments Don’t Work Under Internet Explorer

by John Lockwood 1. November 2009 04:44

This has been posted on the Blogengine.NET forums, but I haven’t seen a working fix for it.  Does anyone know of one?

I can’t stop to fix it now, because I have to write a post about Phil Ochs and the dangers of Knee Jerk Open Source-ialism.

Better Deadhat than Redhat.

Stay tuned to this channel.

Tags:

General

Working With Data And Services

by John Lockwood 31. October 2009 03:10
  • Read and write XML data. May include but is not limited to: XmlDocument, XPathNavigator, XPathNodeIterator, XPathDocument, XmlReader, XmlWriter, XmlDataDocument, XmlNamespaceManager
  • Manipulate data by using DataSet and DataReader objects.
  • Call a Windows Communication Foundation (WCF) service or a Web service from an ASP.NET Web page. May include but is not limited to: App_WebReferences; configuration
  • Implement a DataSource control. May include but is not limited to: LinqDataSource, ObjectDataSource, XmlDataSource, SqlDataSource
  • Bind controls to data by using data binding syntax.

Tags:

Microsoft Exam 70-562