<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Suraj Kaushik&#039;s Blog</title>
	<atom:link href="http://www.mistersuraj.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mistersuraj.com</link>
	<description>2 share my mistakes and lessons</description>
	<lastBuildDate>Fri, 02 Mar 2012 20:50:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Iphone, ipad, IOS Development on Windows Operating System &#8211; part 2 &#8211; executing Objective-c programming in windows</title>
		<link>http://www.mistersuraj.com/iphone-ipad-ios-development-on-windows-operating-system-part-2-executing-objective-c-programming-in-windows/</link>
		<comments>http://www.mistersuraj.com/iphone-ipad-ios-development-on-windows-operating-system-part-2-executing-objective-c-programming-in-windows/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 05:52:31 +0000</pubDate>
		<dc:creator>Suraj</dc:creator>
				<category><![CDATA[Research and Development]]></category>
		<category><![CDATA[IOS apps windows os]]></category>
		<category><![CDATA[IOS development on windows operating system]]></category>
		<category><![CDATA[ipad apps windows os]]></category>
		<category><![CDATA[ipad development on windows operating system]]></category>
		<category><![CDATA[iphone apps windows os]]></category>
		<category><![CDATA[iphone development on window operating system]]></category>

		<guid isPermaLink="false">http://www.mistersuraj.com/?p=173</guid>
		<description><![CDATA[To run / execute Objecitve-c programs on windows, we must have environment setup. Thus, the things required are: Installed compiler to execute programs IDE&#8217;s to write the program We&#8217;ll write code in simple text editor like notepad etc. so, the major requirement is now for compliers to execute code. listed compliers, claims to compile Objective-c [...]]]></description>
			<content:encoded><![CDATA[<p><span>To run / execute <span>Objecitve</span>-c </span><span>programs </span>on windows, we must have environment setup. Thus, the things required are:</p>
<ul>
<li><strong>Installed compiler to execute programs</strong></li>
<li><strong>IDE&#8217;s to write the program</strong></li>
</ul>
<p>We&#8217;ll write code in simple text editor like notepad etc. so, the major requirement is now for compliers to execute code.</p>
<p>listed compliers, claims to compile Objective-c code, thus give Shell prompt interface in Windows environment:</p>
<p><a title="Click to Download Objective-c compiler" href="http://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version4/gcc-4.6.2-1/" target="_blank">MINGW { You can download the complier from here and Install it }</a></p>
<p>I would like to suggest you to install mingw complier directly in drive i.e. C:/ or D:/ or E:/ etc. not in <strong>program files</strong>. The reason for this is, space within directory names may cause conflict sometimes. So, it would be better if you install it in drive directly like <strong>c:/mingw/</strong></p>
<p>After successfull Install you can launch the mingw shell prompt it will look like:</p>
<p><img class="aligncenter size-medium wp-image-187" title="Ming-shell in windows7 start menu" src="http://www.mistersuraj.com/wp-content/uploads/2012/02/ming-start-menu-239x300.jpg" alt="Ming-shell in windows start menu" width="239" height="300" /></p>
<p>and, here the shell prompt look for mingw :</p>
<p><img class="aligncenter size-full wp-image-189" title="mingw unix shell prompt windows 7" src="http://www.mistersuraj.com/wp-content/uploads/2012/02/ming-shell-prompt.jpg" alt="mingw unix shell prompt windows 7" width="704" height="297" /></p>
<p>as our main focus on objective-c, <strong>Thus you will find header file location for objective-c in</strong></p>
<p><strong>C:\MinGW\lib\gcc\mingw32\4.6.2\include\objc</strong></p>
<p>In my case mingw is installed in C: drive.</p>
<address>I will write more, when I have time&#8230;. (Any of my HAK&#8217;s friend did this work before please send me the link. It will reduce unnecessary effort) <img src='http://www.mistersuraj.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </address>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mistersuraj.com/iphone-ipad-ios-development-on-windows-operating-system-part-2-executing-objective-c-programming-in-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Iphone, ipad, IOS Development on Windows Operating System &#8211; part 1</title>
		<link>http://www.mistersuraj.com/iphone-development-on-windows-operating-system/</link>
		<comments>http://www.mistersuraj.com/iphone-development-on-windows-operating-system/#comments</comments>
		<pubDate>Sun, 22 Jan 2012 13:04:15 +0000</pubDate>
		<dc:creator>Suraj</dc:creator>
				<category><![CDATA[Research and Development]]></category>
		<category><![CDATA[IOS apps windows os]]></category>
		<category><![CDATA[IOS development on windows operating system]]></category>
		<category><![CDATA[ipad apps windows os]]></category>
		<category><![CDATA[ipad development on windows operating system]]></category>
		<category><![CDATA[iphone apps windows os]]></category>
		<category><![CDATA[iphone development on window operating system]]></category>

		<guid isPermaLink="false">http://www.mistersuraj.com/?p=109</guid>
		<description><![CDATA[This is a research work, I&#8217;m working on, thus can be continued for a few months or more. Thus, I&#8217;ve divided this research work in steps. Hence this can be closed in a bunch of posts and for readers convenience -part-n is suffixed to each post. So, here we go&#8230;&#8230;.. I appriciate all the technologies. [...]]]></description>
			<content:encoded><![CDATA[<p>This is a research work, I&#8217;m working on, thus can be continued for a few months or more. Thus, I&#8217;ve divided this research work in steps. Hence this can be closed in a bunch of posts and for readers convenience -part-n is suffixed to each post. So, here <strong>we go&#8230;&#8230;..<br />
</strong></p>
<blockquote><p>I appriciate all the technologies. So, I don&#8217;t want to hurt Intelligent Iphone/IOS Developers, <strong>gathering  things and set them to make windows environment</strong> compatible for iphone/IOS development. I don&#8217;t want to let your smart Iphone and slim/sexy Macbook&#8217;s or yours repo down. This is just a research work, <strong>hopefully, to help a little portion of the society,</strong> possibly may not be achieved. So, please don&#8217;t take it to heart&#8230;. <img src='http://www.mistersuraj.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p></blockquote>
<p>Before I move, I would like to make it sure, I am not alone, working to achieve this goal. I found a few more open source solutions providers and developers like me, putting their efforts to achieve the same goal.</p>
<p>In the last a few months, I googled a lot, test a few compliers that claims to be useful to write  <strong>Objective-C</strong> programming. As the process to achieve this is somewhat tedious, we can&#8217;t achieve all the things for IOS development via single software application or trick. Thus, we move step by step..</p>
<p>First of all.. consider the main equipment required to develop iphone/ipad/IOS application is MAC systems/MAC OS, <strong>What we don&#8217;t have..</strong> we have <strong>windows PC</strong> as our main target is to develop IOS application on windows. Well, I am using windows 7, thus all the testing will be done on this operating system.</p>
<address>&#8212;- Added Feb 4 2012</address>
<p>Besides, we must understand the actual flow, comes in existence when we<strong> run or compile</strong>  a bunch of lines or a program written in any programming language. In that case we do something like this:</p>
<ul>
<li>Write code in any IDE i.e. notepad etc.</li>
<li>Run the code using compiler</li>
<li>output comes on console.</li>
</ul>
<p>Thats it..</p>
<p>So, If are able to achieve above three mentioned steps for <strong>Objective-c</strong> in windows. we are half done then.</p>
<p>Let&#8217;s move to next step and find out the ways to run <strong>Objective-c</strong> in windows environment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mistersuraj.com/iphone-development-on-windows-operating-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>error to use a section registered as allowDefinition=&#8217;MachineToApplication&#8217; beyond application level</title>
		<link>http://www.mistersuraj.com/error-to-use-a-section-registered-as-allowdefinitionmachinetoapplication-beyond-application-level/</link>
		<comments>http://www.mistersuraj.com/error-to-use-a-section-registered-as-allowdefinitionmachinetoapplication-beyond-application-level/#comments</comments>
		<pubDate>Sun, 25 Dec 2011 12:58:26 +0000</pubDate>
		<dc:creator>Suraj</dc:creator>
				<category><![CDATA[Experiments and Implementation]]></category>
		<category><![CDATA[Results of Experiments and Implementaiton]]></category>
		<category><![CDATA[allowDefinition]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[MachineToApplication]]></category>
		<category><![CDATA[section registered]]></category>

		<guid isPermaLink="false">http://www.mistersuraj.com/?p=59</guid>
		<description><![CDATA[Error    141    It is an error to use a section registered as allowDefinition=&#8217;MachineToApplication&#8217; beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.    D:\developers\Suraj\projects\dunecorporation\new\new\StraightRootMkt\StraightRootMkt\StraightRootMkt\Web.config    43 this kind of error can be removed by altering the below code: &#60;configuration&#62;   &#60;configSections&#62;     &#60;sectionGroup name=&#8221;system.web.extensions&#8221; type=&#8221;System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, [...]]]></description>
			<content:encoded><![CDATA[<p>Error    141    It is an error to use a section registered as allowDefinition=&#8217;MachineToApplication&#8217; beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.    D:\developers\Suraj\projects\dunecorporation\new\new\StraightRootMkt\StraightRootMkt\StraightRootMkt\Web.config    43</p>
<h1><strong>this kind of error can be removed by altering the below code:</strong></h1>
<p><span style="color: #666699;">&lt;configuration&gt;</span><br />
<span style="color: #666699;">  &lt;configSections&gt;</span><br />
<span style="color: #666699;">    &lt;sectionGroup name=&#8221;system.web.extensions&#8221; type=&#8221;System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&#8243;&gt;</span><br />
<span style="color: #666699;">      &lt;sectionGroup name=&#8221;scripting&#8221; type=&#8221;System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&#8243;&gt;</span><br />
<span style="color: #666699;">        &lt;section name=&#8221;scriptResourceHandler&#8221; type=&#8221;System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&#8243; requirePermission=&#8221;false&#8221; allowDefinition=&#8221;MachineToApplication&#8221;/&gt;</span><br />
<span style="color: #666699;">        &lt;sectionGroup name=&#8221;webServices&#8221; type=&#8221;System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&#8243;&gt;</span><br />
<span style="color: #666699;">          &lt;section name=&#8221;jsonSerialization&#8221; type=&#8221;System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&#8243; requirePermission=&#8221;false&#8221; allowDefinition=&#8221;Everywhere&#8221;/&gt;</span><br />
<span style="color: #666699;">          &lt;section name=&#8221;profileService&#8221; type=&#8221;System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&#8243; requirePermission=&#8221;false&#8221; allowDefinition=&#8221;MachineToApplication&#8221;/&gt;</span><br />
<span style="color: #666699;">          &lt;section name=&#8221;authenticationService&#8221; type=&#8221;System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&#8243; requirePermission=&#8221;false&#8221; allowDefinition=&#8221;MachineToApplication&#8221;/&gt;</span><br />
<span style="color: #666699;">          &lt;section name=&#8221;roleService&#8221; type=&#8221;System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Versi</span>o<span style="color: #666699;">n=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&#8243; requirePermission=&#8221;false&#8221; allowDefinition=&#8221;MachineToApplication&#8221;/&gt;</span><br />
<span style="color: #666699;">        &lt;/sectionGroup&gt;</span><br />
<span style="color: #666699;">      &lt;/sectionGroup&gt;</span><br />
<span style="color: #666699;"> &lt;/sectionGroup&gt;</span><br />
<span style="color: #666699;">  &lt;/configSections&gt;  </span><br />
<span style="color: #666699;">  &lt;connectionStrings&gt;</span></p>
<h2><strong>change all</strong></h2>
<h2>allowDefinition=&#8221;MachineToApplication&#8221;</h2>
<h2>  To</h2>
<h2>allowDefinition=&#8221;Everywhere&#8221;</h2>
<p>or any other suitable value&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mistersuraj.com/error-to-use-a-section-registered-as-allowdefinitionmachinetoapplication-beyond-application-level/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Compiler Error Message: CS0161: &#8216;users.login(string, string)&#8217;: not all code paths return a value</title>
		<link>http://www.mistersuraj.com/compiler-error-message-cs0161-users-loginstring-string-not-all-code-paths-return-a-value/</link>
		<comments>http://www.mistersuraj.com/compiler-error-message-cs0161-users-loginstring-string-not-all-code-paths-return-a-value/#comments</comments>
		<pubDate>Sun, 25 Dec 2011 05:50:29 +0000</pubDate>
		<dc:creator>Suraj</dc:creator>
				<category><![CDATA[Experiments and Implementation]]></category>
		<category><![CDATA[Results of Experiments and Implementaiton]]></category>
		<category><![CDATA[Application]]></category>
		<category><![CDATA[c# error]]></category>
		<category><![CDATA[code path returns a value error]]></category>
		<category><![CDATA[datatype error]]></category>

		<guid isPermaLink="false">http://www.mistersuraj.com/?p=55</guid>
		<description><![CDATA[Not All code paths retun a value. comes when we set any function to return any kind of datatype value other than void as Line 25:     public string login(string userid, string pwd) above funciton must return string value in every case, no matter if it returns a blank string. Hence, if you din&#8217;t check every [...]]]></description>
			<content:encoded><![CDATA[<p>Not All code paths retun a value. comes when we set any function to return any kind of datatype value other than <strong>void</strong> as</p>
<p><span style="color: #ff0000;">Line 25:     public string login(string userid, string pwd)</span></p>
<p>above funciton must return string value in every case, no matter if it returns a blank string. Hence, if you din&#8217;t check every condition with if and else statement or any excepetions is raised at any point, this kind of error may come in existence. <strong>Thus be sure, that your every if block has supportive else block or you are using exception catch code otherwise.</strong> And your each block is  returns the value with required datatype.</p>
<h1><strong>Server Error in &#8216;/dcorp&#8217; Application.</strong></h1>
<div align="center">
<hr align="center" noshade="noshade" size="1" width="100%" />
</div>
<p><strong><em>Compilation Error</em></strong><strong> </strong></p>
<p><strong>Description: </strong>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.</p>
<p><strong>Compiler Error Message: </strong>CS0161: &#8216;users.login(string, string)&#8217;: not all code paths return a value</p>
<p><strong>Source Error:</strong></p>
<table width="100%" border="0" cellpadding="0">
<tbody>
<tr>
<td></td>
</tr>
<tr>
<td>Line 23:       }</p>
<p>Line 24:</p>
<p><span style="color: #ff0000;">Line 25:     public string login(string userid, string pwd)</span></p>
<p>Line 26:     {</p>
<p>Line 27:         db db = new db(); // database class instance;</td>
</tr>
</tbody>
</table>
<p><strong>Source File:</strong> d:\developers\Suraj\projects\dunecorporation\App_Code\users.cs    <strong>Line:</strong> 25</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mistersuraj.com/compiler-error-message-cs0161-users-loginstring-string-not-all-code-paths-return-a-value/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cannot implicitly convert type &#8216;int&#8217; to &#8216;string&#8217;</title>
		<link>http://www.mistersuraj.com/cannot-implicitly-convert-type-int-to-string/</link>
		<comments>http://www.mistersuraj.com/cannot-implicitly-convert-type-int-to-string/#comments</comments>
		<pubDate>Sun, 25 Dec 2011 05:37:20 +0000</pubDate>
		<dc:creator>Suraj</dc:creator>
				<category><![CDATA[Experiments and Implementation]]></category>
		<category><![CDATA[c# error]]></category>
		<category><![CDATA[datatype conversion error]]></category>
		<category><![CDATA[type casting error]]></category>

		<guid isPermaLink="false">http://www.mistersuraj.com/?p=53</guid>
		<description><![CDATA[Simple type casting problem, actually the value is INT datatype and trying to assign a variable with datatype string. Thats why we must convert variables to respective datatype properly before assigning to any other variable. Server Error in &#8216;/dcorp&#8217; Application. Compilation Error Description: An error occurred during the compilation of a resource required to service [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Simple type casting problem, actually the value is INT datatype and trying to assign a variable with datatype string. Thats why we must convert variables to respective datatype properly before assigning to any other variable.</strong></p>
<h1>Server Error in &#8216;/dcorp&#8217; Application.</h1>
<hr size="1" width="100%" />
<h2><em>Compilation Error</em></h2>
<p><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"> <strong> Description: </strong>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.</p>
<p><strong> Compiler Error Message: </strong>CS0029: Cannot implicitly convert type &#8216;int&#8217; to &#8216;string&#8217;</p>
<p><strong>Source Error:</strong></p>
<p></span></span></p>
<table width="100%" bgcolor="#ffffcc">
<tbody>
<tr>
<td></td>
</tr>
<tr>
<td>
<pre>Line 26:         string userid = loginname.Text.ToString();
Line 27:         string pwd = password.Text.ToString();
<span style="color: red;">Line 28: string userInfo = userObj.login(userid, pwd); </span>Line 29:         switch (userInfo)
Line 30:         {</pre>
</td>
</tr>
</tbody>
</table>
<p><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"><br />
<strong>Source File:</strong> d:\developers\Suraj\projects\dunecorporation\Default.aspx.cs    <strong>Line:</strong> 28</p>
<p></span></span></p>
<div>Show Detailed Compiler Output:</div>
<p><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"><br />
</span></span></p>
<div>Show Complete Compilation Source:</div>
<p><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"></p>
<p></span></span></p>
<hr size="1" width="100%" />
<p><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"><strong>Version Information:</strong> Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927 </span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mistersuraj.com/cannot-implicitly-convert-type-int-to-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The name &#8216;SqlHelper&#8217; does not exist in the current context</title>
		<link>http://www.mistersuraj.com/compiler-error-message-cs0103-the-name-sqlhelper-does-not-exist-in-the-current-context/</link>
		<comments>http://www.mistersuraj.com/compiler-error-message-cs0103-the-name-sqlhelper-does-not-exist-in-the-current-context/#comments</comments>
		<pubDate>Sun, 25 Dec 2011 04:28:37 +0000</pubDate>
		<dc:creator>Suraj</dc:creator>
				<category><![CDATA[Results of Experiments and Implementaiton]]></category>
		<category><![CDATA[compiler error message]]></category>
		<category><![CDATA[sql server error]]></category>
		<category><![CDATA[sqlhelper error]]></category>

		<guid isPermaLink="false">http://www.mistersuraj.com/?p=48</guid>
		<description><![CDATA[Compiler Error Message: CS0103: The name &#8216;SqlHelper&#8217; does not exist in the current context current context type error come in existence if we forget to include namepace for function/ object we are using on that particular file. OR else if you created some custom class then be sure that class is in your application scope. [...]]]></description>
			<content:encoded><![CDATA[<p>Compiler Error Message: CS0103: The name &#8216;SqlHelper&#8217; does not exist in the current context</p>
<p><strong>current context type error come in existence if we forget to include namepace for function/ object we are using on that particular file. OR else if you created some custom class then be sure that class is in your application scope. i.e. App_code folder.</strong></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mistersuraj.com/compiler-error-message-cs0103-the-name-sqlhelper-does-not-exist-in-the-current-context/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compiler Error Message: CS0103: The name &#8216;SqlHelper&#8217; does not exist in the current context</title>
		<link>http://www.mistersuraj.com/45/</link>
		<comments>http://www.mistersuraj.com/45/#comments</comments>
		<pubDate>Sun, 25 Dec 2011 04:26:33 +0000</pubDate>
		<dc:creator>Suraj</dc:creator>
				<category><![CDATA[Experiments and Implementation]]></category>
		<category><![CDATA[current context]]></category>
		<category><![CDATA[sql server error]]></category>
		<category><![CDATA[sqlhelper error]]></category>
		<category><![CDATA[sqlserver error]]></category>

		<guid isPermaLink="false">http://www.mistersuraj.com/?p=45</guid>
		<description><![CDATA[Below error came in existence if we forget to include namepace for function/ object we are using on that particular file. OR else if you created some custom class then be sure that class is in your application scope. i.e. App_code folder. Server Error in &#8216;/dcorp&#8217; Application. Compilation Error Description: An error occurred during the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Below error came in existence if we forget to include namepace for function/ object we are using on that particular file. OR else if you created some custom class then be sure that class is in your application scope. i.e. App_code folder.</strong></p>
<h1>Server Error in &#8216;/dcorp&#8217; Application.</h1>
<hr size="1" width="100%" />
<h2><em>Compilation Error</em></h2>
<p><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"> <strong> Description: </strong>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.</span></span></p>
<p><strong> Compiler Error Message: </strong>CS0103: The name &#8216;SqlHelper&#8217; does not exist in the current context</p>
<p><strong>Source Error:</strong></p>
<p>&nbsp;</p>
<table width="100%" bgcolor="#ffffcc">
<tbody>
<tr>
<td></td>
</tr>
<tr>
<td>
<pre>Line 30:         if (db.conStatus == "open")
Line 31:         {
<span style="color: red;">Line 32: object ouid = SqlHelper.ExecuteScalar(db._connection, CommandType.Text, "SELECT userId FROM users WHERE loginName = '" + userid + "' AND password = '"+pwd+"'"); </span>Line 33:             if (ouid.ToString() != "")
Line 34:             {</pre>
</td>
</tr>
</tbody>
</table>
<p><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"><br />
<strong>Source File:</strong> d:\developers\Suraj\projects\dunecorporation\App_Code\users.cs    <strong>Line:</strong> 32</span></span></p>
<p>&nbsp;</p>
<div>Show Detailed Compiler Output:</div>
<p><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"><br />
</span></span></p>
<div>Show Complete Compilation Source:</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<hr size="1" width="100%" />
<p><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"><strong>Version Information:</strong> Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927 </span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mistersuraj.com/45/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compiler Error Message: CS0161: &#8216;db.connectDB()&#8217;: not all code paths return a value</title>
		<link>http://www.mistersuraj.com/compiler-error-message-cs0161-db-connectdb-not-all-code-paths-return-a-value/</link>
		<comments>http://www.mistersuraj.com/compiler-error-message-cs0161-db-connectdb-not-all-code-paths-return-a-value/#comments</comments>
		<pubDate>Sun, 25 Dec 2011 03:37:54 +0000</pubDate>
		<dc:creator>Suraj</dc:creator>
				<category><![CDATA[Experiments and Implementation]]></category>
		<category><![CDATA[Application]]></category>
		<category><![CDATA[Compiler]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[Message]]></category>

		<guid isPermaLink="false">http://www.mistersuraj.com/?p=38</guid>
		<description><![CDATA[Server Error in &#8216;/dcorp&#8217; Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0161: &#8216;db.connectDB()&#8217;: not all code paths return a value Source Error: &#160; Line 28: } Line 29: [...]]]></description>
			<content:encoded><![CDATA[<h1>Server Error in &#8216;/dcorp&#8217; Application.</h1>
<hr size="1" width="100%" />
<h2><em>Compilation Error</em></h2>
<p><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"> <strong> Description: </strong>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.</span></span></p>
<p><strong> Compiler Error Message: </strong>CS0161: &#8216;db.connectDB()&#8217;: not all code paths return a value</p>
<p><strong>Source Error:</strong></p>
<p>&nbsp;</p>
<table width="100%" bgcolor="#ffffcc">
<tbody>
<tr>
<td></td>
</tr>
<tr>
<td>
<pre>Line 28: 	}
Line 29:
<span style="color: red;">Line 30: public SqlConnection connectDB() </span>Line 31:     {
Line 32:         //this will connect to databse and return state in string;</pre>
</td>
</tr>
</tbody>
</table>
<p><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"><br />
<strong>Source File:</strong> d:\developers\Suraj\projects\dunecorporation\App_Code\db.cs    <strong>Line:</strong> 30</span></span></p>
<p>&nbsp;</p>
<div>Show Detailed Compiler Output:</div>
<div id="compilerOutputDiv">
<table width="100%" bgcolor="#ffffcc">
<tbody>
<tr>
<td>
<pre>C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE&gt; "C:\Windows\Microsoft.NET\Framework\v3.5\csc.exe" /t:library /utf8output /R:"C:\Windows\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Data.DataSetExtensions\3.5.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"C:\Windows\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\Windows\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\Windows\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Xml.Linq\3.5.0.0__b77a5c561934e089\System.Xml.Linq.dll" /out:"C:\Users\Administrator\AppData\Local\Temp\Temporary ASP.NET Files\dunecorporation\3a861b84\50b4a9d9\App_Code.8q3unmwl.dll" /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701 /warnaserror-  "C:\Users\Administrator\AppData\Local\Temp\Temporary ASP.NET Files\dunecorporation\3a861b84\50b4a9d9\App_Code.8q3unmwl.0.cs" "C:\Users\Administrator\AppData\Local\Temp\Temporary ASP.NET Files\dunecorporation\3a861b84\50b4a9d9\App_Code.8q3unmwl.1.cs" "C:\Users\Administrator\AppData\Local\Temp\Temporary ASP.NET Files\dunecorporation\3a861b84\50b4a9d9\App_Code.8q3unmwl.2.cs"

Microsoft (R) Visual C# 2008 Compiler version 3.5.30729.4926
for Microsoft (R) .NET Framework version 3.5
Copyright (C) Microsoft Corporation. All rights reserved.

d:\developers\Suraj\projects\dunecorporation\App_Code\db.cs(30,26): error CS0161: 'db.connectDB()': not all code paths return a value</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"><br />
</span></span></p>
<div>Show Complete Compilation Source:</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<hr size="1" width="100%" />
<p><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"><strong>Version Information:</strong> Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927 </span></p>
<p><strong>Resolution:</strong></p>
<p>Please make sure, the value return by the function must be of the same data type as declared with function declaration/definintinon.</p>
<p>for e.g.</p>
<pre>Line 30: public SqlConnection connectDB() Line 31:     {</pre>
<p>connectDB() function must return a value with datatype sqlConnection.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mistersuraj.com/compiler-error-message-cs0161-db-connectdb-not-all-code-paths-return-a-value/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Compiler Error Message: CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement</title>
		<link>http://www.mistersuraj.com/compiler-error-message-cs0201-only-assignment-call-increment-decrement-and-new-object-expressions-can-be-used-as-a-statement/</link>
		<comments>http://www.mistersuraj.com/compiler-error-message-cs0201-only-assignment-call-increment-decrement-and-new-object-expressions-can-be-used-as-a-statement/#comments</comments>
		<pubDate>Sun, 25 Dec 2011 03:32:37 +0000</pubDate>
		<dc:creator>Suraj</dc:creator>
				<category><![CDATA[Experiments and Implementation]]></category>
		<category><![CDATA[compilation error]]></category>
		<category><![CDATA[Compiler]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[Message]]></category>
		<category><![CDATA[source error]]></category>

		<guid isPermaLink="false">http://www.mistersuraj.com/?p=36</guid>
		<description><![CDATA[Server Error in &#8216;/dcorp&#8217; Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement Source [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Server Error in &#8216;/dcorp&#8217; Application.</strong></p>
<div align="center">
<hr align="center" noshade="noshade" size="1" width="100%" />
</div>
<p><strong><em>Compilation Error</em></strong><strong> </strong></p>
<p><strong>Description: </strong>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.</p>
<p><strong>Compiler Error Message: </strong>CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement</p>
<p><strong>Source Error:</strong></p>
<table width="100%" border="0" cellpadding="0">
<tbody>
<tr>
<td></td>
</tr>
<tr>
<td>Line 35:         if (this._connection.State.ToString().ToLower() == &#8220;open&#8221;)</p>
<p>Line 36:         {</p>
<p><span style="color: #ff0000;">Line 37:             this._connection;</span></p>
<p>Line 38:         }</p>
<p>Line 39:     }</td>
</tr>
</tbody>
</table>
<p><strong>Source File:</strong> d:\developers\Suraj\projects\dunecorporation\App_Code\db.cs    <strong>Line:</strong> 37</p>
<p>Show Detailed Compiler Output:</p>
<p>&nbsp;</p>
<p>Show Complete Compilation Source:</p>
<p>&nbsp;</p>
<div align="center">
<hr align="center" noshade="noshade" size="1" width="100%" />
</div>
<p><strong>Version Information:</strong> Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927</p>
<p><strong>The resolution is:</strong></p>
<p><strong>this._connection in line no 37 is variable thus can’t be write as an expression; It must be like that:</strong></p>
<p>&nbsp;</p>
<p><strong>return this._connection;</strong></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p class="MsoNormal" style="line-height: normal;"><strong><span style="font-size: 24pt; font-family: 'Times New Roman','serif';">Server Error in &#8216;/dunecorporation&#8217; Application.</span></strong></p>
<div class="MsoNormal" style="text-align: center; line-height: normal;" align="center">
<hr style="color: silver;" align="center" noshade="noshade" size="1" width="100%" />
</div>
<p class="MsoNormal" style="line-height: normal;"><strong><em><span style="font-size: 18pt; font-family: 'Times New Roman','serif';">Compilation Error</span></em></strong><strong></strong></p>
<p class="MsoNormal" style="margin-bottom: 12pt; line-height: normal;"><strong><span style="font-size: 12pt; font-family: 'Arial','sans-serif';">Description: </span></strong><span style="font-size: 12pt; font-family: 'Arial','sans-serif';">An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.</span></p>
<p><strong>Compiler Error Message: </strong>CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement</p>
<p><strong>Source Error:</strong></p>
<table class="MsoNormalTable" style="width: 100%; background: none repeat scroll 0% 0% #ffffcc;" width="100%" border="0" cellpadding="0">
<tbody>
<tr>
<td style="padding: 0.75pt;"></td>
</tr>
<tr>
<td style="padding: 0.75pt;">
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">Line 35:<span>         </span>if (this._connection.State.ToString().ToLower() == &#8220;open&#8221;)</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">Line 36:<span>         </span>{</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New'; color: red;">Line 37:<span>             </span>this._connection;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">Line 38:<span>         </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">Line 39:<span>     </span>}</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin-bottom: 12pt; line-height: normal;"><span style="font-size: 12pt; font-family: 'Arial','sans-serif';"><br />
<strong>Source File:</strong> d:\developers\Suraj\projects\dunecorporation\App_Code\db.cs    <strong>Line:</strong> 37</span></p>
<p>&nbsp;</p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: 'Arial','sans-serif';">Show Detailed Compiler Output:</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: 'Arial','sans-serif';"> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: 'Arial','sans-serif';">Show Complete Compilation Source:</span></p>
<p class="MsoNormal" style="margin-bottom: 12pt; line-height: normal;"><span style="font-size: 12pt; font-family: 'Arial','sans-serif';"> </span></p>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center; line-height: normal;" align="center">
<hr style="color: silver;" align="center" noshade="noshade" size="1" width="100%" />
</div>
<p class="MsoNormal"><strong><span style="font-size: 12pt; line-height: 115%; font-family: 'Arial','sans-serif';">Version Information:</span></strong><span style="font-size: 12pt; line-height: 115%; font-family: 'Arial','sans-serif';"> Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927</span></p>
<p class="MsoNormal"><span style="font-size: 12pt; line-height: 115%; font-family: 'Arial','sans-serif'; color: red;">this._connection in line no 37</span><span style="font-size: 12pt; line-height: 115%; font-family: 'Arial','sans-serif';"> is variable thus can’t be write as an expression; It must be like that:</span></p>
<p class="MsoNormal"><span style="font-size: 12pt; line-height: 115%; font-family: 'Arial','sans-serif'; color: red;">return this._connection;</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mistersuraj.com/compiler-error-message-cs0201-only-assignment-call-increment-decrement-and-new-object-expressions-can-be-used-as-a-statement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A network-related or instance-specific error occurred while establishing a connection to SQL Server</title>
		<link>http://www.mistersuraj.com/a-network-related-or-instance-specific-error-occurred-while-establishing-a-connection-to-sql-server/</link>
		<comments>http://www.mistersuraj.com/a-network-related-or-instance-specific-error-occurred-while-establishing-a-connection-to-sql-server/#comments</comments>
		<pubDate>Sat, 24 Dec 2011 17:52:09 +0000</pubDate>
		<dc:creator>Suraj</dc:creator>
				<category><![CDATA[Experiments and Implementation]]></category>
		<category><![CDATA[instance-specific error]]></category>
		<category><![CDATA[named pipes provider error:40]]></category>
		<category><![CDATA[network-related error]]></category>
		<category><![CDATA[server error]]></category>
		<category><![CDATA[sql server error]]></category>

		<guid isPermaLink="false">http://www.mistersuraj.com/?p=34</guid>
		<description><![CDATA[Very simple error. I just refreshed the page in browser and my internet was not connected and I was accessing online sqlserver to connect with the site. so&#8230;&#8230; always check if you are fully connected. Server Error in &#8216;/dune&#8217; Application. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Very simple error. I just refreshed the page in browser and my internet was not connected and I was accessing online sqlserver to connect with the site. so&#8230;&#8230;</strong> <strong>always check if you are fully connected.</strong></p>
<h1>Server Error in &#8216;/dune&#8217; Application.</h1>
<hr size="1" width="100%" />
<h2><em>A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 &#8211; Could not open a connection to SQL Server)</em></h2>
<p><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"> <strong> Description: </strong>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.</span></span></p>
<p><strong> Exception Details: </strong>System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 &#8211; Could not open a connection to SQL Server)</p>
<p><strong>Source Error:</strong></p>
<p>&nbsp;</p>
<table width="637" bgcolor="#ffffcc">
<tbody>
<tr>
<td>
<pre>Line 32:         //this will connect to databse and return state in string;
Line 33:         this._connection = new SqlConnection(this._conectoinstring);
<span style="color: red;">Line 34: this._connection.Open(); </span>Line 35:         if (this._connection.State.ToString().ToLower() == "open")
Line 36:         {</pre>
</td>
</tr>
</tbody>
</table>
<p><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"><br />
<strong> Source File: </strong> d:\developers\Suraj\projects\dunecorporation\App_Code\db.cs<strong>    Line: </strong> 34 </span></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mistersuraj.com/a-network-related-or-instance-specific-error-occurred-while-establishing-a-connection-to-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

