ASP.NET Not Working?

Its not everyday I get to setup a new Web Server, and when I do, there is one step that I seem to forget every time, and ASP.NET (Or any other server side technology) does not work. The Web Service Extensions!

Not to be confused with ASP.NET Web Services, the Web Service Extensions feature (introduced in Windows Server 2003) provides additional layer of security in IIS 6.0. Any Web Server Extension executable (PHP, PERL or even ASP.NET) must be explicitly enabled in this section for IIS to delegate processing to them.

When ASP.NET (or the .NET Framework) is installed on a server, it installs all required files, sets up script mapping in IIS for ASP.NET, adds Default.aspx as one of the Default documents and even adds a X-Powered By ASP.NET Custom Header in IIS. It even adds ASP.NET to the Web Services Extensions Section, but DOES NOT 'Allow' it by default.

So when trying an ASP.NET Website, you get a 404 File not found, and that is confusing! As a matter of fact the first thing that comes to my mind when I see it is that there is some (lack of) permission issue on the folder or files.

Here is a Screen shot of Web Services Extensions in IIS MMC Snap-in

Web Services Extensions in IIS

In case ASP.NET is not working on a newly installed server, take a look in the Web Service Extensions section and make sure the correct version of ASP.NET is 'Allowed'.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Queue vs FIFO Buffer

The Queue is a type of FIFO data structure. If you were wondering why I created my own FIFO Buffer, here are the key differences between them:

  1. A Queue can not be fixed size. It keeps growing as you add more items to it. The FIFO Buffer is specified a fixed size and it throws away older items as you add items and the size exceeds.
  2. You can not remove items randomly from a Queue. They must be removed by using the Dequeue method, in the order in which they were added.

That's all there is! So if these two features are not a required, you should rather use the built in generic Queue class.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Generic FIFO Buffer in C#

The System.Collections.Generic Namespace in .NET 2.0 includes various commonly used data structures, but a generic FIFO (First in First out) Buffer is missing. FIFO buffers can be handy at times. For example, recently I needed to implement a 'recently viewed items' feature where the last 25 items viewed by a user will be remembered by the application. This is a session level FIFO buffer that keeps up to 25 items. When this limit is reached, it throws away older items as new items are added to it.

Another application of a FIFO buffer would be keeping a live log (in memory) of recent user activity. For example, at www.houselocator.com we have a FIFO buffer keeping a list of recent homes for sale searches performed by the users.

Since the FIFO buffer I wrote is generic, you can download this and use it for anything that suits your application.

Implementation of the FIFO Buffer

Internally, the FIFO Buffer uses a List<T> with the specified size and a rotating index. Once the size of the buffer is reached, it starts rotating the index and replaces older items with new ones.

An interesting feature is that you can randomly remove items from the Buffer.

Using the FIFO Buffer

  • Create an instance by specifying the Item Type and Size of the Buffer. For example, a FIFO Buffer of Product with a size of 25 Items:
    FifoBuffer<Product> buffer = new FifoBuffer<Product>(25)
    
  • Add items to the Buffer using the Add(T item) Method, just like you would Add Items to a List<T>.Add() Method.
  • To Enumerate, use the foreach loop, and items will be returned in the reverse order, the most recently added item being the first.
  • To Remove an Item, use the Remove(T item) or RemoveAt(index) Methods.
  • Reset the Buffer by calling the Clear() Method.
  • And that's about it!

Possible Improvements

The Enumeration (For Each Loop) support is implemented with yield statement, which is easy but I believe not the most efficient way of doing it. I didn't have the patience to implement the full IEnumerable<T> Interface.

If you find it helpful, please post a comment and let me know.

Download: FifoBuffer.zip (~1KB)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Ubuntu 8.10 on Hyper-V

Reporting successful installation of Ubuntu 8.10 Server Edition (With LAMP) on Hyper-V. No patch was necessary like it was for Ubuntu 7.10. Over a Remote Desktop connection to the Hyper-V host, installation screens appear very slow. But the installation was otherwise smooth.

Remember to use a 'Legacy Network Adapter' for the virtual machine if you would like networking to work out of the box. Installing Linux Integration Components should enable standard Network Adapter and improve network performance.

I have yet to try Linux Integration Components on an Ubuntu Installation.

If you know a tutorial for installing the Integration Components, please post a link.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Download xsd.exe

Are you looking for a xsd.exe download because it no longer ships with Visual Studio? It is hard to understand why, but many little utilities like this keep going missing from Visual Studio. Recently, I had to look up older installation of Visual Studio when I needed xsd.exe for a Project.

Here is the download: xsd.zip (23kb)

XSD.EXE Documentation on MSDN:

XML Schema Definition Tool (Xsd.exe)

This download is provided for your convenience, and you must consider all applicable licensing issues associated with this utility.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5