Click here to Skip to main content
15,894,343 members
Articles / Programming Languages / XML

Using InsomniaServer to Build a Web-interface for your Application

Rate me:
Please Sign up or sign in to vote.
4.80/5 (11 votes)
15 Jul 2011CPOL3 min read 83.6K   1.2K   41  
InsomniaServer enables you to add a fully-featured, customizable webserver to your projects. See how it works.
<html xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><head><title>ContentType Methods </title><link rel="stylesheet" type="text/css" href="../styles/presentation.css" /><link rel="stylesheet" type="text/css" href="ms-help://Hx/HxRuntime/HxLink.css" /><script type="text/javascript" src="../scripts/EventUtilities.js"></script><script type="text/javascript" src="../scripts/SplitScreen.js"></script><script type="text/javascript" src="../scripts/Dropdown.js"></script><script type="text/javascript" src="../scripts/script_manifold.js"></script><meta name="guid" content="07927234-df39-4d66-aaa1-9d4bfc1e6647" /><xml xmlns:msxsl="urn:schemas-microsoft-com:xslt"><MSHelp:TOCTitle Title="ContentType Methods "></MSHelp:TOCTitle><MSHelp:RLTitle Title="ContentType Methods  (InsomniaSoftware.Server)"></MSHelp:RLTitle><MSHelp:Attr Name="AssetID" Value="Methods.T:InsomniaSoftware.Server.ContentType" /><MSHelp:Keyword Index="A" Term="Methods.T:InsomniaSoftware.Server.ContentType" /><MSHelp:Keyword Index="A" Term="frlrfInsomniaSoftwareServerContentTypeMembersTopic" /><MSHelp:Keyword Index="K" Term="ContentType class, methods"></MSHelp:Keyword><MSHelp:Attr Name="DevLang" Value="CSharp" /><MSHelp:Attr Name="DevLang" Value="VB" /><MSHelp:Attr Name="DevLang" Value="C++" /><MSHelp:Attr Name="Locale" Value="en-us"></MSHelp:Attr><MSHelp:Attr Name="TopicType" Value="kbSyntax" /></xml></head><body><input type="hidden" id="userDataCache" class="userDataStyle" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:msxsl="urn:schemas-microsoft-com:xslt" /><input type="hidden" id="hiddenScrollOffset" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:msxsl="urn:schemas-microsoft-com:xslt" /><img id="collapseImage" style="display:none; height:0; width:0;" alt="Collapse image" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:msxsl="urn:schemas-microsoft-com:xslt" src="../icons/collapse_all.gif"></img><img id="expandImage" style="display:none; height:0; width:0;" alt="Expand image" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:msxsl="urn:schemas-microsoft-com:xslt" src="../icons/expand_all.gif"></img><img id="collapseAllImage" style="display:none; height:0; width:0;" alt="CollapseAll image" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:msxsl="urn:schemas-microsoft-com:xslt" src="../icons/collall.gif"></img><img id="expandAllImage" style="display:none; height:0; width:0;" alt="ExpandAll image" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:msxsl="urn:schemas-microsoft-com:xslt" src="../icons/expall.gif"></img><img id="dropDownImage" style="display:none; height:0; width:0;" alt="DropDown image" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:msxsl="urn:schemas-microsoft-com:xslt" src="../icons/drpdown.gif"></img><img id="dropDownHoverImage" style="display:none; height:0; width:0;" alt="DropDownHover image" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:msxsl="urn:schemas-microsoft-com:xslt" src="../icons/drpdown_orange.gif"></img><img id="copyImage" style="display:none; height:0; width:0;" alt="Copy image" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:msxsl="urn:schemas-microsoft-com:xslt" src="../icons/copycode.gif"></img><img id="copyHoverImage" style="display:none; height:0; width:0;" alt="CopyHover image" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:msxsl="urn:schemas-microsoft-com:xslt" src="../icons/copycodeHighlight.gif"></img><div id="header" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:msxsl="urn:schemas-microsoft-com:xslt"><table id="topTable"><tr id="headerTableRow1"><td align="left"><span id="runningHeaderText">InsomniaServer - Class Library</span></td></tr><tr id="headerTableRow2"><td align="left"><span id="nsrTitle">ContentType Methods </span></td></tr><tr id="headerTableRow3"><td /></tr></table><table id="bottomTable" cellspacing="0" cellpadding="0"><tr><td><span onclick="ExpandCollapseAll(toggleAllImage)" style="cursor:default;" onkeypress="ExpandCollapseAll_CheckKey(toggleAllImage, event)" tabindex="0"><img ID="toggleAllImage" class="toggleAll" alt="CollapseAll image" src="../icons/collall.gif"></img><label id="collapseAllLabel" for="toggleAllImage" style="display: none;">Collapse All</label><label id="expandAllLabel" for="toggleAllImage" style="display: none;">Expand All</label> </span><span id="membersOptionsFilterToolTip" style="cursor:default;" onmouseover="membersOptionsFilterImage.src=dropDownHoverImage.src;" onmouseout="membersOptionsFilterImage.src=dropDownImage.src;" tabindex="0"><img id="membersOptionsFilterImage" alt="DropDown image" src="../icons/drpdown.gif"></img><label id="showAllMembersLabel" for="membersOptionsFilterImage" style="display: none;">Members Options: Show All</label><label id="filteredMembersLabel" for="membersOptionsFilterImage" style="display: none;">Members Options: Filtered</label></span></td></tr></table><div id="membersOptionsSpan"><input id="inheritedCheckbox" type="checkbox" name="membersOptionsFilter" onClick="SetMembersOptions(this)" /><label class="membersOptionsFilter" for="inheritedCheckbox">Include Inherited Members</label><br /><input id="protectedCheckbox" type="checkbox" name="membersOptionsFilter" onClick="SetMembersOptions(this)" /><label class="membersOptionsFilter" for="protectedCheckbox">Include Protected Members</label><br /><input id="netcfCheckbox" type="checkbox" name="membersOptionsFilter" onClick="SetMembersOptions(this)" /><label class="membersOptionsFilter" for="netcfCheckbox">.NET Compact Framework Members Only</label><br /><input id="netXnaCheckbox" type="checkbox" name="membersOptionsFilter" onClick="SetMembersOptions(this)" /><label class="membersOptionsFilter" for="netXnaCheckbox">XNA Framework Members Only</label></div></div><div id="mainSection"><div id="mainBody"><div id="allHistory" class="saveHistory" onsave="saveAll()" onload="loadAll()" /><div id="header"> </div><p><div class="summary">
            Represents a MIME content type
            </div></p><p>The following tables list the members exposed by the <a href="e8217247-d701-cee3-a1ab-10d8d62d7594.htm">ContentType</a> type.</p><h1 class="heading"><span onclick="ExpandCollapse(PublicmethodToggle)" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey(PublicmethodToggle, event)" tabindex="0"><img id="PublicmethodToggle" onload="OnLoadImage(event)" class="toggle" name="toggleSwitch" src="../icons/collapse_all.gif"></img>Public Methods</span></h1><div id="PublicmethodSection" class="section" name="collapseableSection" style=""><table id="typeList" class="members"><tr><th class="iconColumn">
           
        </th><th class="nameColumn">Name</th><th class="descriptionColumn">Description</th></tr><tr notSupportedOnXna="true" notSupportedOn="netcf"><td><img src="../icons/pubmethod.gif"></img><img src="../icons/static.gif" alt="static member"></img></td><td><a href="8ffddec0-66b6-1ef1-2664-e88f12e1f61f.htm">AddFileExtension</a></td><td><div class="summary">
            Adds a new file extension and its belonging MIME type
            </div><br /></td></tr><tr notSupportedOnXna="true" notSupportedOn="netcf"><td><img src="../icons/pubmethod.gif"></img><img src="../icons/static.gif" alt="static member"></img></td><td><a href="c353bc83-56d9-7f9a-3528-73c48be902a1.htm">ClearFileExtensions</a></td><td><div class="summary">
            Clears all file extensions
            </div><br /></td></tr><tr notSupportedOnXna="true" notSupportedOn="netcf"><td><img src="../icons/pubmethod.gif"></img></td><td><a href="97cfc37f-cfde-bccc-ce07-7be7760eaeb4.htm">Equality</a></td><td>Overloaded.  <br /></td></tr><tr notSupportedOnXna="true" notSupportedOn="netcf"><td><img src="../icons/pubmethod.gif"></img></td><td><a href="a4d321e0-1eeb-c6ac-5162-d2a74f5e553a.htm">Equals</a></td><td><div class="summary">
            Checks whether two ContentType instances represent the same MIME string
            </div> (Overrides .<a href="http://msdn2.microsoft.com/en-us/bsc2ak47">Equals(Object)</a>.)<br /></td></tr><tr notSupportedOnXna="true" notSupportedOn="netcf"><td><img src="../icons/pubmethod.gif"></img><img src="../icons/static.gif" alt="static member"></img></td><td><a href="d40ac130-6072-33dc-28c0-d4da9f31daf4.htm">FromExtension</a></td><td><div class="summary">
            Creates a new ContentType instance from a given file extension
            </div><br /></td></tr><tr notSupportedOnXna="true" notSupportedOn="netcf"><td><img src="../icons/pubmethod.gif"></img><img src="../icons/static.gif" alt="static member"></img></td><td><a href="4d5d7ef4-42fa-94df-319f-cefa74d71c39.htm">FromFileName</a></td><td><div class="summary">
            Creates a new ContentType instance from a given file name
            </div><br /></td></tr><tr notSupportedOnXna="true" notSupportedOn="netcf"><td><img src="../icons/pubmethod.gif"></img><img src="../icons/static.gif" alt="static member"></img></td><td><a href="bc5062de-b878-9919-e903-b9ed9ac8ac25.htm">FromMIME</a></td><td><div class="summary">
            Creates a new ContentType instance from a given MIME string
            </div><br /></td></tr><tr notSupportedOnXna="true" notSupportedOn="netcf"><td><img src="../icons/pubmethod.gif"></img><img src="../icons/static.gif" alt="static member"></img></td><td><a href="051e29d9-114c-9bf3-45ef-754d2b17b0f0.htm">FromType</a></td><td><div class="summary">
            Creates a new ContentType instance from a given type
            </div><br /></td></tr><tr notSupportedOnXna="true" notSupportedOn="netcf"><td><img src="../icons/pubmethod.gif"></img></td><td><a href="75e894b6-fe29-0b0c-38bf-4cfa2288c38d.htm">GetHashCode</a></td><td><div class="summary">
            Gets a hash code for this ContentType
            </div> (Overrides .<a href="http://msdn2.microsoft.com/en-us/zdee4b3y">GetHashCode()</a>.)<br /></td></tr><tr notSupportedOnXna="true" notSupportedOn="netcf"><td><img src="../icons/pubmethod.gif"></img></td><td><a href="babf57a9-314c-715b-b22f-8c22107cd7eb.htm">GetMime</a></td><td><div class="summary">
            Gets the MIME string of this ContentType
            </div><br /></td></tr><tr notSupportedOnXna="true" notSupportedOn="netcf"><td><img src="../icons/pubmethod.gif"></img></td><td><a href="fef8ca4c-dcc6-7f57-49b1-2d0ffb4331fb.htm">Inequality</a></td><td>Overloaded.  <br /></td></tr><tr notSupportedOnXna="true" notSupportedOn="netcf"><td><img src="../icons/pubmethod.gif"></img><img src="../icons/static.gif" alt="static member"></img></td><td><a href="d1b32f27-610e-ce8f-ba0b-ba792718df67.htm">LoadDefaultFileExtensions</a></td><td><div class="summary">
            Loads default extensions and their belonging types
            </div><br /></td></tr><tr notSupportedOnXna="true" notSupportedOn="netcf"><td><img src="../icons/pubmethod.gif"></img><img src="../icons/static.gif" alt="static member"></img></td><td><a href="4b8282ec-42e7-baa9-9120-dc83e9f496e1.htm">LoadFileExtensionsFromFile</a></td><td><div class="summary">
            Loads a set of extensions and their belonging types from a specified file<br /><br /><i>This file is formatted as follows:<br />
            txt text/plain<br />
            html,htm text/html</i></div><br /></td></tr></table></div><div id="footer"><div class="footerLine"><img alt="Footer image" width="100%" height="3px" src="../icons/footer.gif"></img></div><div id="footer"><p />Send comments on this topic to
        <a id="HT_MailLink" href="mailto:webmaster%40manuel-then.de?Subject=InsomniaServer - Class Library">webmaster@manuel-then.de</a>
        <script type="text/javascript">
        var HT_mailLink = document.getElementById("HT_MailLink");
        var HT_mailLinkText = HT_mailLink.innerHTML;
        HT_mailLink.href += ": " + document.title;
        HT_mailLink.innerHTML = HT_mailLinkText;
        </script> <p /><a href="mailto:webmaster@manuel-then.de">(c)2007 by InsomniaSoftware | Manuel Then</a></div></div></div></div></body></html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Student
Germany Germany
I was born in 1987. Unfortunately too late to experience the real rise of the PC. But fortunately late enough to enjoy things like MS's .net during my school time Wink | ;)

From the time when some relative taught me a little BASIC under MS DOS, I loved to tell computers what to do - even though my real start in programming was around the age of 16.

At the moment, I am studying Software Engineering at University of Augsburg, always hoping to find time to design and program.
Besides, I like meeting friends, spent time with my girlfriend and enjoy life Smile | :)

Comments and Discussions