Click here to Skip to main content
15,887,683 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.2K   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>IsResponseBodyNeededTryGetSource Method (ResponseBodyNeed, ContentType, Int32, HttpStatus, )</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="bdd21544-045f-4f3b-67cc-926c19638315" /><xml xmlns:msxsl="urn:schemas-microsoft-com:xslt"><MSHelp:TOCTitle Title="IsResponseBodyNeededTryGetSource Method (ResponseBodyNeed, ContentType, Int32, HttpStatus, )"></MSHelp:TOCTitle><MSHelp:RLTitle Title="IsResponseBodyNeededTryGetSource Method (ResponseBodyNeed, ContentType, Int32, HttpStatus, ) (InsomniaSoftware.Server)"></MSHelp:RLTitle><MSHelp:Attr Name="AssetID" Value="M:InsomniaSoftware.Server.HttpRequest.IsResponseBodyNeededTryGetSource(InsomniaSoftware.Server.HttpRequest.ResponseBodyNeed,InsomniaSoftware.Server.ContentType,System.Int32,InsomniaSoftware.Server.HttpStatus,InsomniaSoftware.Server.Sources.Source@)" /><MSHelp:Keyword Index="A" Term="M:InsomniaSoftware.Server.HttpRequest.IsResponseBodyNeededTryGetSource(InsomniaSoftware.Server.HttpRequest.ResponseBodyNeed,InsomniaSoftware.Server.ContentType,System.Int32,InsomniaSoftware.Server.HttpStatus,InsomniaSoftware.Server.Sources.Source@)" /><MSHelp:Keyword Index="A" Term="frlrfInsomniaSoftwareServerHttpRequestClassIsResponseBodyNeededTryGetSourceTopic" /><MSHelp:Keyword Index="F" Term="IsResponseBodyNeededTryGetSource" /><MSHelp:Keyword Index="F" Term="HttpRequest.IsResponseBodyNeededTryGetSource" /><MSHelp:Keyword Index="F" Term="InsomniaSoftware.Server.HttpRequest.IsResponseBodyNeededTryGetSource" /><MSHelp:Attr Name="APIType" Value="Managed" /><MSHelp:Attr Name="APILocation" Value="InsomniaServer.dll" /><MSHelp:Attr Name="APIName" Value="InsomniaSoftware.Server.HttpRequest.IsResponseBodyNeededTryGetSource" /><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" /><MSHelp:Attr Name="Abstract" Value="Tries to get a source responding automatically to a request (only possible if the full source was sent at least once)" /></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">HttpRequest<span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span>IsResponseBodyNeededTryGetSource Method (ResponseBodyNeed, ContentType, Int32, HttpStatus, )</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="languageFilterToolTip" style="cursor:default;" onmouseover="languageFilterImage.src=dropDownHoverImage.src;" onmouseout="languageFilterImage.src=dropDownImage.src;" tabindex="0"><img id="languageFilterImage" alt="DropDown image" src="../icons/drpdown.gif"></img><label id="showAllLabel" for="languageFilterImage" style="display: none;">Language Filter: All</label><label id="multipleLabel" for="languageFilterImage" style="display: none;">Language Filter: Multiple</label><label id="vbLabel" for="languageFilterImage" style="display: none;">Language Filter: Visual Basic</label><label id="csLabel" for="languageFilterImage" style="display: none;">Language Filter: C#</label><label id="cLabel" for="languageFilterImage" style="display: none;">Language Filter: Visual C++</label><label id="jsharpLabel" for="languageFilterImage" style="display: none;">Language Filter: J#</label><label id="jsLabel" for="languageFilterImage" style="display: none;">Language Filter: JScript</label><label id="xamlLabel" for="languageFilterImage" style="display: none;">Language Filter: XAML</label></span></td></tr></table><div id="languageSpan"><input id="vbDeclarationCheckbox" type="checkbox" name="languageFilter" onClick="SetLanguage(this)" /><label class="languageFilter" for="vbDeclarationCheckbox">Visual Basic (Declaration)</label><br /><input id="vbUsageCheckbox" type="checkbox" name="languageFilter" onClick="SetLanguage(this)" /><label class="languageFilter" for="vbUsageCheckbox">Visual Basic (Usage)</label><br /><input id="csCheckbox" type="checkbox" name="languageFilter" onClick="SetLanguage(this)" /><label class="languageFilter" for="csCheckbox">C#</label><br /><input id="cCheckbox" type="checkbox" name="languageFilter" onClick="SetLanguage(this)" /><label class="languageFilter" for="cCheckbox">Visual C++</label><br /><input id="jsharpCheckbox" type="checkbox" name="languageFilter" onClick="SetLanguage(this)" /><label class="languageFilter" for="jsharpCheckbox">J#</label><br /><input id="jsCheckbox" type="checkbox" name="languageFilter" onClick="SetLanguage(this)" /><label class="languageFilter" for="jsCheckbox">JScript</label><br /><input id="xamlCheckbox" type="checkbox" name="languageFilter" onClick="SetLanguage(this)" /><label class="languageFilter" for="xamlCheckbox">XAML</label><br /></div></div><div id="mainSection"><div id="mainBody"><div id="allHistory" class="saveHistory" onsave="saveAll()" onload="loadAll()" /><div id="header"> </div><div class="summary">
            Tries to get a source responding automatically to a request  (only possible if the full source was sent at least once)
            </div><p />
      <b>Namespace:</b> InsomniaSoftware.Server
    <br />
      <b>Assembly:</b>
     
      InsomniaServer (in InsomniaServer)<br /><b>Version:</b> 1.0.2.1
    <h1 class="heading"><span onclick="ExpandCollapse(syntaxToggle)" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey(syntaxToggle, event)" tabindex="0"><img id="syntaxToggle" onload="OnLoadImage(event)" class="toggle" name="toggleSwitch" src="../icons/collapse_all.gif"></img>Syntax</span></h1><div id="syntaxSection" class="section" name="collapseableSection" style=""><div id="syntaxCodeBlocks" class="code"><span codeLanguage="VisualBasicDeclaration"><table><tr><th>Visual Basic (Declaration)</th></tr><tr><td><pre xml:space="preserve"><span class="keyword">Public</span> <span class="keyword">Shared</span> <span class="keyword">Function</span> <span class="identifier">IsResponseBodyNeededTryGetSource</span> ( _
	<span class="parameter">responseBodyNeed</span> <span class="keyword">As</span> <a href="9830e592-1beb-839e-2076-03a08f5ae482.htm">ResponseBodyNeed</a>, _
	<span class="parameter">contentType</span> <span class="keyword">As</span> <a href="e8217247-d701-cee3-a1ab-10d8d62d7594.htm">ContentType</a>, _
	<span class="parameter">contentLength</span> <span class="keyword">As</span> <a href="http://msdn2.microsoft.com/en-us/td2s409d">Integer</a>, _
	<span class="parameter">status</span> <span class="keyword">As</span> <a href="f1292848-2cd0-62f9-f140-a1e3a806c0a2.htm">HttpStatus</a>, _
	&lt;<a href="http://msdn2.microsoft.com/en-us/k8189tfc">OutAttribute</a>&gt; <span class="keyword">ByRef</span> <span class="parameter">source</span> <span class="keyword">As</span> <a href="0a29919b-8f48-2e77-7d9d-07d215e211fd.htm">Source</a> _
) <span class="keyword">As</span> <a href="http://msdn2.microsoft.com/en-us/a28wyd50">Boolean</a></pre></td></tr></table></span><span codeLanguage="CSharp"><table><tr><th>C#</th></tr><tr><td><pre xml:space="preserve"><span class="keyword">public</span> <span class="keyword">static</span> <a href="http://msdn2.microsoft.com/en-us/a28wyd50">bool</a> <span class="identifier">IsResponseBodyNeededTryGetSource</span> (
	<a href="c833eca9-9bca-66f9-b358-841c00f33d26.htm">HttpRequest</a>.<a href="9830e592-1beb-839e-2076-03a08f5ae482.htm">ResponseBodyNeed</a> <span class="parameter">responseBodyNeed</span>,
	<a href="e8217247-d701-cee3-a1ab-10d8d62d7594.htm">ContentType</a> <span class="parameter">contentType</span>,
	<a href="http://msdn2.microsoft.com/en-us/td2s409d">int</a> <span class="parameter">contentLength</span>,
	<a href="f1292848-2cd0-62f9-f140-a1e3a806c0a2.htm">HttpStatus</a> <span class="parameter">status</span>,
	<span class="keyword">out</span> <a href="0a29919b-8f48-2e77-7d9d-07d215e211fd.htm">Source</a> <span class="parameter">source</span>
)</pre></td></tr></table></span><span codeLanguage="ManagedCPlusPlus"><table><tr><th>Visual C++</th></tr><tr><td><pre xml:space="preserve"><span class="keyword">public</span>:
<span class="keyword">static</span> <a href="http://msdn2.microsoft.com/en-us/a28wyd50">bool</a> <span class="identifier">IsResponseBodyNeededTryGetSource</span> (
	<a href="9830e592-1beb-839e-2076-03a08f5ae482.htm">ResponseBodyNeed</a> <span class="parameter">responseBodyNeed</span>, 
	<a href="e8217247-d701-cee3-a1ab-10d8d62d7594.htm">ContentType</a>^ <span class="parameter">contentType</span>, 
	<a href="http://msdn2.microsoft.com/en-us/td2s409d">int</a> <span class="parameter">contentLength</span>, 
	<a href="f1292848-2cd0-62f9-f140-a1e3a806c0a2.htm">HttpStatus</a> <span class="parameter">status</span>, 
	<a href="0a29919b-8f48-2e77-7d9d-07d215e211fd.htm">Source</a>^% <span class="parameter">source</span>
)</pre></td></tr></table></span></div><h4 class="subHeading">Parameters</h4><dl paramName="responseBodyNeed"><dt><span class="parameter">responseBodyNeed</span></dt><dd><a href="9830e592-1beb-839e-2076-03a08f5ae482.htm">InsomniaSoftware.Server.ResponseBodyNeed</a><br />Return value of IsResponseBodyNeeded</dd></dl><dl paramName="contentType"><dt><span class="parameter">contentType</span></dt><dd><a href="e8217247-d701-cee3-a1ab-10d8d62d7594.htm">InsomniaSoftware.Server.ContentType</a><br />Content type for the possible response</dd></dl><dl paramName="contentLength"><dt><span class="parameter">contentLength</span></dt><dd><a href="http://msdn2.microsoft.com/en-us/td2s409d">System.Int32</a><br />Content length for the possible response</dd></dl><dl paramName="status"><dt><span class="parameter">status</span></dt><dd><a href="f1292848-2cd0-62f9-f140-a1e3a806c0a2.htm">InsomniaSoftware.Server.HttpStatus</a><br />Status for the possible response</dd></dl><dl paramName="source"><dt><span class="parameter">source</span></dt><dd><br />If a source was created, a handle to the created source (return value = true). Null if none was created (return value = false.</dd></dl><h4 class="subHeading">Return Value</h4>True if the function succeeded in creating a response, false if not.</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