[Mono-aspnet-list] The imported type 'ASP.default_asp' is defined multiple times

nzsaint chrisbrown76 at hotmail.com
Fri Jul 31 00:51:24 EDT 2009

Hi, I have been trying on and off for several months to get my ASP.Net
website running under openSUSE 11.1 with Mono. I have successfully installed
mono, mod_mono (with XSP) and mono_basic (which I believe I need as my site
is written in VB.NET). I can see the XSP test pages Index.aspx and
Index2.aspx by copying /usr/lib/xsp/test directory to /srv/www/hdtocs and
adding 'Include /etc/apache2/mod_mono.conf' to ‘/etc/apache2/httpd.conf’ as
described in the instructions in the Mod Mono documentation. I have version of mono-complete installed. 

I decided to create the simplest website possible in VS.NET 2005 by creating
a new site with just the default page of 'Default.aspx' and some identifying
text added to the 'Div' element in the middle. The site is called
'MonoTest'. I precomiled the site by using the 'Publish Web site' menu
option in 'VS.NET' with 'Allow this precompiled site to be updateable'
un-checked. I published it to a file location. I then copied these files to
/srv/www/MonoTest on my openSUSE OS. 

I then used the the mod-mono configuration utility on the site to generate
the output for my mod_mono.conf file as shown below (commented lines

Alias /MonoTest "/srv/www/MonoTest"
MonoServerPath MonoTest "/usr/bin/mod-mono-server2"
MonoDebug MonoTest true
MonoApplications MonoTest "/MonoTest:/srv/www/MonoTest"
<Location "/MonoTest">
  Allow from all
  Order allow,deny
  MonoSetServerAlias MonoTest
  SetHandler mono

When I browse to http://localhost/MonoTest I get the error below:

CS0433: The imported type `ASP.default_aspx' is defined multiple times

Description: HTTP 500. Error processing request.

Stack Trace:

System.Web.Compilation.CompilationException: CS0433: The imported type
`ASP.default_aspx' is defined multiple times
  at System.Web.Compilation.AssemblyBuilder.BuildAssembly
(System.Web.VirtualPath virtualPath,
System.CodeDom.Compiler.CompilerParameters options) [0x00209] in
  at System.Web.Compilation.AssemblyBuilder.BuildAssembly
(System.Web.VirtualPath virtualPath) [0x00000] in
  at System.Web.Compilation.BuildManager.GenerateAssembly
(System.Web.Compilation.AssemblyBuilder abuilder,
System.Collections.Generic.List`1 buildItems, System.Web.VirtualPath
virtualPath, BuildKind buildKind) [0x00010] in
  at System.Web.Compilation.BuildManager.BuildAssembly
(System.Web.VirtualPath virtualPath) [0x002da] in
  at System.Web.Compilation.BuildManager.GetCompiledType (System.String
virtualPath) [0x00039] in
  at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath
(System.String virtualPath, System.Type requiredBaseType) [0x0000c] in
  at System.Web.UI.PageParser.GetCompiledPageInstance (System.String
virtualPath, System.String inputFile, System.Web.HttpContext context)
[0x00000] in
  at System.Web.UI.PageHandlerFactory.GetHandler (System.Web.HttpContext
context, System.String requestType, System.String url, System.String path)
[0x00000] in
  at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context,
System.String url, Boolean ignoreContextHandler) [0x00055] in
  at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context,
System.String url) [0x00000] in
  at System.Web.HttpApplication+<Pipeline>c__Iterator2.MoveNext () [0x0071f]

Can anyone help. Thank you. 

View this message in context: http://www.nabble.com/The-imported-type-%27ASP.default_asp%27-is-defined-multiple-times-tp24750998p24750998.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.

More information about the Mono-aspnet-list mailing list