<?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>my code trip &#187; ASP.Net</title>
	<atom:link href="http://mycodetrip.com/tag/asp-net/feed/" rel="self" type="application/rss+xml" />
	<link>http://mycodetrip.com</link>
	<description>stories from the information technology highway</description>
	<lastBuildDate>Thu, 01 Jul 2010 04:47:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Fix for &#8216;XML Parsing Error: not well-formed Line Number 1, Column 2&#8242; Error</title>
		<link>http://mycodetrip.com/2007/03/26/fix-for-xml-parsing-error-not-well-formed-line-number-1-column-2-error_36/</link>
		<comments>http://mycodetrip.com/2007/03/26/fix-for-xml-parsing-error-not-well-formed-line-number-1-column-2-error_36/#comments</comments>
		<pubDate>Tue, 27 Mar 2007 01:33:41 +0000</pubDate>
		<dc:creator>Shiva</dc:creator>
				<category><![CDATA[Tips / HowTos]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[Bugs And Fixes]]></category>
		<category><![CDATA[Error Solution]]></category>

		<guid isPermaLink="false">http://mycodetrip.com/?p=36</guid>
		<description><![CDATA[Fix for ASP.Net Error - 'XML Parsing Error: not well-formed Line Number 1, Column 2']]></description>
			<content:encoded><![CDATA[<p>When you access an <strong>ASP.NET</strong> page in your browser, you may get an <strong>XML Parsing Error</strong> that says that the XML is not well formed. The error message also displays the page directive statement present in the 1st line of the <strong>.aspx</strong> file. First we will fix this error, then we will look at one possible reason why you may be getting this error in <strong>ASP.NET</strong>.</p>
<p><img src="http://img412.imageshack.us/img412/3250/aspnetxmlparsingerrornona9.jpg" alt="asp-net-xml-parsing-error-not-well-formed" /></p>
<h2>Fix the &#8216;XML Parsing Error&#8217;</h2>
<p>Click <strong>Start &gt; Run</strong>, and type the following command depending on which ASP.NET framework is in use by the default web site in your <strong>IIS</strong>.</p>
<h3>ASP.NET 2.0 Framework</h3>
<p><span style="font-family: Courier New;"> %Windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i</span></p>
<h3>ASP.NET 1.1 Framework</h3>
<p><span style="font-family: Courier New;"> %Windir%\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -i</span></p>
<p>You should see a command window that is displayed briefly, that shows that <span style="font-weight: bold;">ASP.NET</span> is being installed. After the registration is successful, the window will be closed. <img src="http://img178.imageshack.us/img178/9021/aspnetxmlparsingerrornoye5.jpg" alt="register-asp-net-framework-with-iis" /></p>
<p>Now refresh the <strong>.aspx</strong> page that you got the XML Parser error for in the browser and your page should be rendered correctly.</p>
<h2>Why did you get this error ?</h2>
<p>I have seen this error happen to me in situations where I had installed IIS <em>after</em> the installing the .Net Framework. This make sense. If you install IIS after you install the <strong>.Net Framework</strong>, then the framework is not registered with IIS. So when a   request for a <strong>.aspx</strong> page comes to <strong>IIS</strong>, it simply passes on the contents of the page as-is without processing it. So in effect, the browser receives the entire <strong>.aspx</strong> page&#8217;s code, tried to parse it as an XML file, encounters the parsing error at the second character in the page directive and stops.</p>
<p><strong>Related:</strong> <a title="ASP.NET Registration Tool" rel="nofollow" href="http://msdn2.microsoft.com/en-us/library/k6h9cz8h(VS.80).aspx" target="_blank">ASP.NET IIS Registration Tool</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mycodetrip.com/2007/03/26/fix-for-xml-parsing-error-not-well-formed-line-number-1-column-2-error_36/feed/</wfw:commentRss>
		<slash:comments>76</slash:comments>
		</item>
		<item>
		<title>Fix for &#8216;A potentially dangerous Request.Form value was detected from the client&#8217; Error</title>
		<link>http://mycodetrip.com/2006/12/26/fix-a-potentially-dangerous-request-form-value-detected-client_46/</link>
		<comments>http://mycodetrip.com/2006/12/26/fix-a-potentially-dangerous-request-form-value-detected-client_46/#comments</comments>
		<pubDate>Wed, 27 Dec 2006 02:44:38 +0000</pubDate>
		<dc:creator>Shiva</dc:creator>
				<category><![CDATA[Tips / HowTos]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[Bugs And Fixes]]></category>

		<guid isPermaLink="false">http://mycodetrip.com/?p=46</guid>
		<description><![CDATA[Fix for ASP.Net 1.1 Error 'A potentially dangerous Request.Form value was detected from the client']]></description>
			<content:encoded><![CDATA[<p>When you access one of your ASP.NET web pages, if you get an error message that says something in the lines of &#8216;A potentially dangerous Request.Form value was detected from the client&#8217;, then you are most likely passing &lt; or &gt; in the querystring parameters. <a rel="lightbox" href="http://img132.imageshack.us/img132/610/potentiallydangerousrequw1.jpg"><img class="right" src="http://theshiva.us/images/blogimages/asp-net-a-potentially-dangerous-request-error_tn.jpg" alt="asp-net-a-potentially-dangerous-request-form-value-detected-client" /></a></p>
<p>Allegedly Microsoft introduced this check in ASP.NET 1.1 to prevent scripting attacks. So how do you fix this ?</p>
<h2>Fix the &#8216;A potentially dangerous Request.Form value was detected&#8230;&#8217; Error</h2>
<ul>
<li>Open the .aspx page in a text editor or in Visual Studio 2003.</li>
<li>In the Page directive, add the following</li>
</ul>
<div style="margin-left: 40px;"><span style="background-color: #ffff00; font-family: Courier New;">validatePageRequest=&#8221;false&#8221;</span></p>
<p>Example:</p>
<p><span style="background-color: #ffff00; font-family: Courier New;">&lt;%@ Page language=&#8221;c#&#8221; Codebehind=&#8221;Software.aspx.cs&#8221; AutoEventWireup=&#8221;false&#8221; Inherits=&#8221;Setup.Software&#8221; </span><span style="background-color: #ffff00; font-family: Courier New;">validatePageRequest=&#8221;false&#8221;</span><span style="background-color: #ffff00; font-family: Courier New;">%&gt; </span></div>
<p><span style="background-color: #ffff00; font-family: Courier New;"></p>
<p></span></p>
<ul>
<li>Save and close the <strong>.aspx</strong> file. This should fix it.</li>
<li>This fix is only for that individual page. If you wanted to make this default for all your pages, then add the following in your &lt;system.web&gt; section of your web.config file.</li>
</ul>
<div style="margin-left: 40px;"><span style="font-family: Courier New; color: #800000;">&lt;system.web&gt;</span><br style="color: #800000; font-family: Courier New;" /><br />
<span style="font-family: Courier New; color: #800000;"> &lt;pages <span style="color: #ff0000;">validateRequest</span>=&#8221;<span style="color: #0000ff;">false</span>&#8221; /&gt;</span><br style="color: #800000; font-family: Courier New;" /><br />
<span style="font-family: Courier New; color: #800000;">&lt;/system.web&gt; </span></div>
<p>Related : <a rel="nofollow" href="http://www.aspnetpro.com/NewsletterArticle/2004/03/asp200403dk_l/asp200403dk_l.asp" target="_blank">Caveats and Consequences of  <strong>validateRequest</strong></a></p>
]]></content:encoded>
			<wfw:commentRss>http://mycodetrip.com/2006/12/26/fix-a-potentially-dangerous-request-form-value-detected-client_46/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error Solution: Fix for &#8216;Unrecognized configuration section connectionStrings&#8217; Error in ASP.NET 2.0</title>
		<link>http://mycodetrip.com/2006/11/27/unrecognized-configuration-section-connectionstrings-error-asp-net-2_44/</link>
		<comments>http://mycodetrip.com/2006/11/27/unrecognized-configuration-section-connectionstrings-error-asp-net-2_44/#comments</comments>
		<pubDate>Tue, 28 Nov 2006 02:40:38 +0000</pubDate>
		<dc:creator>Shiva</dc:creator>
				<category><![CDATA[Tips / HowTos]]></category>
		<category><![CDATA[ASP.Net]]></category>

		<guid isPermaLink="false">http://mycodetrip.com/?p=44</guid>
		<description><![CDATA[Fix for ASP.Net 2.0 Error 'Unrecognized configuration section connectionStrings']]></description>
			<content:encoded><![CDATA[<p>After publishing your website in ASP.NET 2.0 using the <strong>Build </strong>&gt; <strong>Publish Website</strong> in the Visual Studio 2005 IDE, when you try to access your application for the first time in the browser, you may get the &#8220;Unrecognized configuration section &#8216;connectionStrings&#8217;&#8221; error. This is because ASP.NET has introduced the new &lt;connectionsStrings&gt; section in the <strong>web.config</strong> which will not be recognized in the .NET 1.1 framework.</p>
<p>If you look closely at the error message, IIS is trying to run the application using the 1.1 framework.</p>
<p><a rel="lightbox" href="http://img80.imageshack.us/img80/2922/aspnet2connectionsstrinop2.jpg"><img src="http://theshiva.us/images/blogimages/asp-net-unrecognized-configuration-section-connection-strings-error_tn.jpg" alt="unrecognized configuration section connectionStrings error" /></a></p>
<h2>Fix the configuration section connectionStrings error.</h2>
<ul>
<li>Open IIS and browse to the website under <strong><em>computer_name</em></strong> &gt; <strong>Web Sites</strong> &gt; <strong>Default Web Site </strong>&gt; <strong><em>website_name</em></strong>.</li>
<li>Where <em><strong>website_name</strong></em> is the actual name of the website, in this case the <strong>MyForecast </strong>website.</li>
<li>Right click <em><strong>website_name</strong></em>. Click <strong>Properties</strong>.</li>
<li>Click the ASP.NET.</li>
</ul>
<p><img title="Change ASP.NET Version to 2.0" src="http://img165.imageshack.us/img165/3517/aspnet2connectionsstrinmp4.jpg" alt="Change ASP.NET Version to 2.0" width="472" height="440" /></p>
<ul>
<li>From the ASP.NET Version dropdown, select 2.0&#8230; version and Click OK.</li>
<li>Now, if you visit your application main page, it should work !</li>
</ul>
<p>(Note, you may need to restart IIS)</p>
]]></content:encoded>
			<wfw:commentRss>http://mycodetrip.com/2006/11/27/unrecognized-configuration-section-connectionstrings-error-asp-net-2_44/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>How to restore the Visual Studio 2005 Intellisense if it has disappeared from your Web.Config ?</title>
		<link>http://mycodetrip.com/2006/11/26/fix-visual-studio-2005-intellisense-disappeared-web-config_22/</link>
		<comments>http://mycodetrip.com/2006/11/26/fix-visual-studio-2005-intellisense-disappeared-web-config_22/#comments</comments>
		<pubDate>Mon, 27 Nov 2006 00:05:10 +0000</pubDate>
		<dc:creator>Shiva</dc:creator>
				<category><![CDATA[Tips / HowTos]]></category>
		<category><![CDATA[ASP.Net]]></category>

		<guid isPermaLink="false">http://mycodetrip.com/?p=22</guid>
		<description><![CDATA[Fix for restoring the missing Intellisense in Visual Studio 2005 when programming in ASP.Net.]]></description>
			<content:encoded><![CDATA[<p>After you launch the ASP.NET configuration tool in <strong>Visual Studio 2005</strong> by clicking <strong>Website </strong>&gt; <strong>ASP.NET Configuration</strong> menu option, you might encounter a problem wherein the Intellisense within the <strong>web.config</strong> file has disappeared mysteriously.</p>
<p>This is because the ASP.NET Configuration application that you launched earlier adds the XML Namespace to your web.config as follows.</p>
<p><span style="font-size: x-small;"><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">&lt;</span><span style="font-size: 10pt; font-family: 'Courier New'; color: maroon;">configuration</span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;"> </span><span style="font-size: 10pt; font-family: 'Courier New'; color: red;">xmlns</span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">=</span><span style="font-size: 10pt; font-family: 'Courier New';">&#8220;<span style="color: blue;">http://schemas.microsoft.com/.NetConfiguration/v2.0</span>&#8220;<span style="color: blue;">&gt;</span></span></span></p>
<p>You can delete <span style="font-size: x-small;"><span style="font-size: 10pt; font-family: 'Courier New'; color: red;">xmlns</span></span> everytime you launch the ASP.NET Configuration application, or you can fix this issue once and for all by doing the following.</p>
<ul>
<li>Open the WebAdminPage.cs file located at
<p>%windir%\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles\App_Code in Visual Studio or in a text editor.</li>
<li>In the SaveConfig method, change the assignment at line 93 from</li>
</ul>
<p><span style="font-family: Courier New;">config.NamespaceDeclared = <span style="color: #3333ff;">true;</span></span></p>
<p>to</p>
<p><span style="font-family: Courier New;">config.NamespaceDeclared = <span style="color: #3333ff;">false;</span></span></p>
<ul>
<li>Save and close the <strong>WebAdminPage.cs</strong> file.</li>
</ul>
<p>If you run the ASP.NET configuration tool now, you will see that it does not add the XML namespace and so your intellisense will not disappear !</p>
]]></content:encoded>
			<wfw:commentRss>http://mycodetrip.com/2006/11/26/fix-visual-studio-2005-intellisense-disappeared-web-config_22/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
