<?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>Raju Mazumder &#187; asp.net</title>
	<atom:link href="http://www.stylephp.com/tag/aspnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stylephp.com</link>
	<description>TDD, Agile and Open Source Enthusiastic</description>
	<lastBuildDate>Mon, 29 Jun 2009 17:36:57 +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>Some Common Errors and Solutions of ASP.NET</title>
		<link>http://www.stylephp.com/2008/12/18/some-common-errors-and-solutions-of-aspnet/</link>
		<comments>http://www.stylephp.com/2008/12/18/some-common-errors-and-solutions-of-aspnet/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 06:52:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[compiler error]]></category>
		<category><![CDATA[cs0246]]></category>
		<category><![CDATA[iis7]]></category>
		<category><![CDATA[mapping handler]]></category>

		<guid isPermaLink="false">http://www.stylephp.com/?p=40</guid>
		<description><![CDATA[Basically I am working with PHP.But I have also great interest about asp.net(C#). So recently I am working on a website using Microsoft visual studio 2005 professional Edition and Microsoft SQL server 2000. Here I have to face some common errors. I am goggling about these errors and I have found that maximum developers face [...]]]></description>
			<content:encoded><![CDATA[<p>Basically I am working with <a href="http://php.net/" target="_blank">PHP</a>.But I have also great interest about <a href="http://www.asp.net/" target="_blank">asp.net</a>(C#). So recently I am working on a website using Microsoft visual studio 2005 professional Edition and Microsoft SQL server 2000. Here I have to face some common errors. I am goggling about these errors and I have found that maximum developers face same problem. So I think it will very helpful for many developers if I share those errors using my blog. And also you can share your own experience which is also very helpful for us. So let’s see how it happens.</p>
<p><strong>Error Message 1#</strong></p>
<p><strong><span style="color: #ff0000;">The type or namespace name 'type/namespace' could not be found (are you missing a using directive or an assembly reference?)</span></strong></p>
<p><strong>Error Description:</strong></p>
<p>I’m including a c# file named Group to access the common functionality.</p>
<p>The C# file is included in App_Code directory and when I access the c# file using the code below it shows the error:</p>
<p><a href="http://www.stylephp.com/wp-content/uploads/2008/12/error11.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" src="http://www.stylephp.com/wp-content/uploads/2008/12/error1-thumb1.png" border="0" alt="error1" width="580" height="266" /></a></p>
<p>From a post I have found that<strong> </strong>this is just a namespace problem or a missing reference problem. So I put all the code inside a common namespace named ‘<strong>DocumentManage’</strong> and now I am using this namespace with the help of using directive. But unfortunately it’s now showing that namespace named ‘<strong>DocumentManage’</strong> not found. Also without any namespace if I run using inbuilt Asp.Net development server it is running. Only in IIS if I run using <a href="http://localhost/">http://localhost/</a> it is showing the error.</p>
<p><strong><span style="color: #0000ff;">Solution:</span> </strong>There are some solutions which I have found from some of the post. I have also given my solution here.<strong></strong></p>
<p><strong><span style="color: #0000ff;">#1</span> </strong>you must specify the namespace name if you put your c# code within a common namespace<strong>.</strong></p>
<p><strong><span style="color: #0000ff;">2#</span> </strong>Visual Studio always puts classes in namespaces; please this is just a namespace problem or a missing reference problem. Just take a look at the error description on <a href="http://msdn.microsoft.com/" target="_blank">MSDN</a>, it can be found <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cscomp/html/vcerrCompilerErrorCS0246.asp">here</a>.</p>
<p><strong><span style="color: #0000ff;">3#</span></strong> if you sure that you have put all your class file within a common namespace and you use this namespace with the help of using directive and you have no problem with reference also. Then be sure that you add your asp.net web site as an application into <a href="http://www.iis.net/" target="_blank">IIS</a>. This was my problem. I was not adding my website as an application at <a href="http://www.iis.net/" target="_blank">IIS</a>.So it shown this error. When add my web site as an application then all the error solve. I have shown here how to add your asp.net web application as an application.</p>
<p><a href="http://www.stylephp.com/wp-content/uploads/2008/12/addapplication.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" src="http://www.stylephp.com/wp-content/uploads/2008/12/addapplication-thumb.png" border="0" alt="addapplication" width="607" height="352" /></a></p>
<p>Go to <a href="http://www.iis.net/" target="_blank">IIS</a> Manager and convert your website as an application. That’s ok.</p>
<p><strong>Error Message 2#:</strong></p>
<p><strong>The resource you are looking for does not have a handler associated with it</strong></p>
<p><strong>Error Description:</strong></p>
<p>When I try to browse me website under local host I got this error message. As an example if I browse <a href="http://localhost:81/pdfdocument">http://localhost:81/pdfdocument</a> and I get this. But if I browse <a href="http://localhost:81/pdfdocument/default.aspx">http://localhost:81/pdfdocument/default.aspx</a> then it works!</p>
<p>Another interesting thing it does not find any JavaScript and CSS file also. It can only browse aspx extension file. I have given a screen shot here.</p>
<p><a href="http://www.stylephp.com/wp-content/uploads/2008/12/error2.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" src="http://www.stylephp.com/wp-content/uploads/2008/12/error2-thumb.png" border="0" alt="error2" width="613" height="301" /></a></p>
<p><strong><span style="color: #0000ff;">Solution:</span></strong></p>
<p><a href="http://www.stylephp.com/wp-content/uploads/2008/12/2008-12-18-1441.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" src="http://www.stylephp.com/wp-content/uploads/2008/12/2008-12-18-1441-thumb.png" border="0" alt="2008-12-18_1441" width="618" height="475" /></a></p>
<p>Go to the IIS Manager and find out the handler mapping for the website and check StaticFile Handler and ensure that Static File Handler module has</p>
<p>Path *.*</p>
<p>Enabled</p>
<p>StaticFileModule, DefaultDocumentModule, DirectoryListingModule - Have these modules listed.</p>
<p>At screenshot you can see where you have to change.</p>
<p>You find the solution from <a href="http://forums.iis.net/p/1152947/1884387.aspx">http://forums.iis.net/p/1152947/1884387.aspx</a></p>
<p>There are two errors I have given here. I have another some errors which I will share with another post. so if you have errors and solutions please share with us. It is really helpful for us. Thanks all.
<ul class="related_post">
<li>No Related Post</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.stylephp.com/2008/12/18/some-common-errors-and-solutions-of-aspnet/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
