08.01.2015 Views

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

136<br />

CHAPTER 6 ■ DEPLOYING YOUR WEB SITE<br />

The MIME type for XAML is application/xml+xaml, which you can see configured in<br />

Figure 6-8.<br />

In addition to automatically serving configured MIME types, IIS sometimes uses<br />

ISAPI filters to process specific file types. In the previous example, you were serving an<br />

HTML file, which is a static file that is simply rendered <strong>and</strong> delivered to the browser.<br />

However, if you are instead serving an <strong>ASP</strong>X page, as in earlier chapters, to return this<br />

type of resource the server runs an ISAPI extension that is assigned to requests for content<br />

with the .aspx extension. It then receives the response from the ISAPI extension as<br />

HTML <strong>and</strong> dispatches it back to the client.<br />

Here’s an example of a simple <strong>ASP</strong>X web page. Save it in a file called Test.aspx in the<br />

same folder you used earlier (i.e., C:\InetPub\wwwroot\Chapter6TestSite).<br />

<br />

<br />

<br />

<br />

<br />

<br />

Untitled Page<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

When you use the browser to navigate to this file, the C# code will execute <strong>and</strong><br />

<strong>ASP</strong>.<strong>NET</strong> will generate HTML containing the current time <strong>and</strong> date. You can see this in<br />

Figure 6-9.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!