<div><font color="#ff0000" size="6">please help me...</font></div>
<div><font color="#ff0000" size="6"></font>&nbsp;</div>
<div><font color="#ff0000" size="6"></font>&nbsp;</div>
<div><font color="#333333" size="2">When I'm Running pages from MGStudio then it is running fine but </font></div>
<div><font color="#333333" size="2">If I running like</font></div>
<div><font color="#333333" size="2"></font>&nbsp;</div>
<div><a href="http://localhost/mapguide/dotnetviewersample/ajaxtiledviewersample.aspx">http://localhost/mapguide/dotnetviewersample/ajaxtiledviewersample.aspx</a></div>
<div>or</div>
<div><a href="http://localhost/mapguide/dotnetviewersample/dwfviewersample.aspx">http://localhost/mapguide/dotnetviewersample/dwfviewersample.aspx</a></div>
<div>then getting the error</div>
<div><span>
<h1><font size="2">I'm using Framework v2.0.50727</font></h1>
<h1>Server Error in '/mapguide' Application. 
<hr width="100%" color="silver" size="1">
</h1>
<h2><i>Compilation Error</i> </h2></span><font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "><b>Description: </b>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. 
<br><br><b>Compiler Error Message: </b>CS0246: The type or namespace name 'OSGeo' could not be found (are you missing a using directive or an assembly reference?)<br><br><b>Source Error:</b><br><br>
<table width="100%" bgcolor="#ffffcc">
<tbody>
<tr>
<td></td></tr>
<tr>
<td><code><pre>Line 17: &lt;%@ Import Namespace=&quot;System.Collections&quot; %&gt;
Line 18: &lt;%@ Import Namespace=&quot;System.IO&quot; %&gt;
<font color="red">Line 19: &lt;%@ Import Namespace=&quot;OSGeo.MapGuide&quot; %&gt;
</font>Line 20: &lt;script language=&quot;c#&quot; runat=&quot;server&quot;&gt;
Line 21: </pre></code></td></tr></tbody></table><br><b><font face="Verdana">Source File:</font></b> c:\Program Files\MapGuideOpenSource\WebServerExtensions\www\dotnetviewersample\utilityfunctions.aspx &nbsp;&nbsp; <b><font face="Verdana">
Line:</font></b> 19 <br><br><br>
<div class="expandable" onclick="OnToggleTOCLevel1('compilerOutputDiv')">Show Detailed Compiler Output:</div>
<div id="compilerOutputDiv" style="DISPLAY: none"><br>
<table width="100%" bgcolor="#ffffcc">
<tbody>
<tr>
<td><code><pre>C:\WINDOWS\system32&gt; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe&quot; /t:library /utf8output /R:&quot;C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll&quot; /R:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll&quot; /R:&quot;C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll&quot; /out:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary 
<a href="http://ASP.NET">ASP.NET</a> Files\mapguide\6330db03\7cea0d17\App_Web_ajaxtiledviewersample.aspx.305c7238.rr15dqlk.dll&quot; /debug- /optimize+ /win32res:&quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary 
<a href="http://ASP.NET">ASP.NET</a> Files\mapguide\6330db03\7cea0d17\3tjlg3zd.res&quot; /w:4 /nowarn:1659;1699  &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary <a href="http://ASP.NET">ASP.NET</a> Files\mapguide\6330db03\7cea0d17\App_Web_ajaxtiledviewersample.aspx.305c7238.rr15dqlk.0.cs&quot; &quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary 
<a href="http://ASP.NET">ASP.NET</a> Files\mapguide\6330db03\7cea0d17\App_Web_ajaxtiledviewersample.aspx.305c7238.rr15dqlk.1.cs&quot;


Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.42
for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.

c:\Program Files\MapGuideOpenSource\WebServerExtensions\www\dotnetviewersample\utilityfunctions.aspx(19,11): error CS0246: The type or namespace name 'OSGeo' could not be found (are you missing a using directive or an assembly reference?)
c:\Program Files\MapGuideOpenSource\WebServerExtensions\www\dotnetviewersample\utilityfunctions.aspx(39,24): error CS0246: The type or namespace name 'MgMap' could not be found (are you missing a using directive or an assembly reference?)
c:\Program Files\MapGuideOpenSource\WebServerExtensions\www\dotnetviewersample\utilityfunctions.aspx(39,1): error CS0246: The type or namespace name 'MgLayer' could not be found (are you missing a using directive or an assembly reference?)
c:\Program Files\MapGuideOpenSource\WebServerExtensions\www\dotnetviewersample\utilityfunctions.aspx(55,26): error CS0246: The type or namespace name 'MgByteReader' could not be found (are you missing a using directive or an assembly reference?)
</pre></code></td></tr></tbody></table></div><br>
<div class="expandable" onclick="OnToggleTOCLevel1('dynamicCodeDiv')">Show Complete Compilation Source:</div>
<div id="dynamicCodeDiv" style="DISPLAY: none"><br>
<table width="100%" bgcolor="#ffffcc">
<tbody>
<tr>
<td><code><pre>Line 1:    &lt;%--
Line 2:    Copyright (C) 2004-2006  Autodesk, Inc.
Line 3:    This library is free software; you can redistribute it and/or
Line 4:    modify it under the terms of version 2.1 of the GNU Lesser
Line 5:    General Public License as published by the Free Software Foundation.
Line 6:    
Line 7:    This library is distributed in the hope that it will be useful,
Line 8:    but WITHOUT ANY WARRANTY; without even the implied warranty of
Line 9:    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Line 10:   Lesser General Public License for more details.
Line 11:   
Line 12:   You should have received a copy of the GNU Lesser General Public
Line 13:   License along with this library; if not, write to the Free Software
Line 14:   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
Line 15:   --%&gt;
Line 16:   
Line 17:   &lt;%@ Import Namespace=&quot;System.Collections&quot; %&gt;
Line 18:   &lt;%@ Import Namespace=&quot;System.IO&quot; %&gt;
Line 19:   &lt;%@ Import Namespace=&quot;OSGeo.MapGuide&quot; %&gt;
Line 20:   &lt;script language=&quot;c#&quot; runat=&quot;server&quot;&gt;
Line 21:   
Line 22:   NameValueCollection GetParameters()
Line 23:   {
Line 24:       return Request.HttpMethod == &quot;GET&quot; ? Request.QueryString : Request.Form;
Line 25:   }
Line 26:   
Line 27:   void InitializeWebTier()
Line 28:   {
Line 29:       // Initialize web tier with the site configuration file.  The config
Line 30:       // file should be in the same folder as this script.
Line 31:       //
Line 32:       string realPath = Request.ServerVariables[&quot;APPL_PHYSICAL_PATH&quot;];
Line 33:       String configPath =  realPath + &quot;webconfig.ini&quot;;
Line 34:       MapGuideApi.MgInitializeWebTier(configPath);
Line 35:   }
Line 36:   
Line 37:   // Searches the map for a layer with the specified name.
Line 38:   
Line 39:   MgLayer GetLayerByName(MgMap map, String layerName)
Line 40:   {
Line 41:       MgLayer layer = null;
Line 42:       for (int i = 0; i &lt; map.GetLayers().GetCount(); i++)
Line 43:       {
Line 44:           MgLayer nextLayer = map.GetLayers().GetItem(i);
Line 45:           if (nextLayer.GetName() == layerName)
Line 46:           {
Line 47:               layer = nextLayer;
Line 48:               break;
Line 49:           }
Line 50:       }
Line 51:       return layer;
Line 52:   }
Line 53:   
Line 54:   // Read the content from an MgByteReader and send it back as the response.
Line 55:   void OutputReaderContent(MgByteReader byteReader, HttpResponse response)
Line 56:   {
Line 57:       MemoryStream memBuf = new MemoryStream();
Line 58:   
Line 59:       byte[] byteBuffer = new byte[1024];
Line 60:       int numBytes = byteReader.Read(byteBuffer, 1024);
Line 61:       while(numBytes &gt; 0)
Line 62:       {
Line 63:           memBuf.Write(byteBuffer, 0, numBytes);
Line 64:           numBytes = byteReader.Read(byteBuffer, 1024);
Line 65:       }
Line 66:   
Line 67:       response.ContentType = byteReader.GetMimeType();
Line 68:       byte [] content = memBuf.ToArray();
Line 69:       response.OutputStream.Write(content , 0, content.Length);
Line 70:   }
Line 71:   
Line 72:   &lt;/script&gt;
Line 73:   </pre></code></td></tr></tbody></table></div><span></span><br><br>
<hr width="100%" color="silver" size="1">
<b><font face="Verdana">Version Information:</font></b>&nbsp;Microsoft .NET Framework Version:2.0.50727.42; <a href="http://ASP.NET">ASP.NET</a> Version:2.0.50727.42 </font></div>