473,396 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

publish web website got compilor error CS0433 for master page

I crate a new asp.net 2.0 web site using Visual Studio 2005. It run
fine in visual studio. I then click Build Publish Website to build
the dll and copy them to the IIS virtual directory along with all the
..aspx files. I run the application in IIS and got the following error:

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: CS0433: The type 'MasterPage' exists in both
'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET
Files\news\408804a4\6fb240fa\assembly\dl3\56c26b89 \5255fd02_8e1fc701\App_Web_448itj0s.DLL'
and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET
Files\news\408804a4\6fb240fa\assembly\dl3\0e565373 \78306203_8e1fc701\App_Web_hkd2czr6.DLL'

Source Error:

Line 110:
Line 111:
[System.Runtime.CompilerServices.CompilerGlobalScop eAttribute()]
Line 112: public class masterpage_master : global::MasterPage {
Line 113:
Line 114: private System.Web.UI.ITemplate
@__Template_mainContent;
Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary
ASP.NET
Files\news\408804a4\6fb240fa\App_Web_masterpage.ma ster.cdcab7d2.nxp-zado.0.cs
Line: 112

Please advise

Dec 14 '06 #1
3 7470
You may want to check and verify that you don't have two dlls that have the
definition for this class. That's one of the problems with using the web
site project, it compiles the files in a directory as needed and assigned
them some number to make them unique. Unfortunately, this will leave you
with two different dlls that contain the same exact namespace references,
which is probably what this is telling you about. This means you have to
ensure you delete the old dlls first. You may want to try the new Web
Application Project which is downloadable over at www.asp.net. It
precompiles the site into a single dll in the same fashion that VS 2003 did.
--

Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

<ni**********@lexisnexis.comwrote in message
news:11**********************@80g2000cwy.googlegro ups.com...
>I crate a new asp.net 2.0 web site using Visual Studio 2005. It run
fine in visual studio. I then click Build Publish Website to build
the dll and copy them to the IIS virtual directory along with all the
.aspx files. I run the application in IIS and got the following error:

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: CS0433: The type 'MasterPage' exists in both
'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET
Files\news\408804a4\6fb240fa\assembly\dl3\56c26b89 \5255fd02_8e1fc701\App_Web_448itj0s.DLL'
and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET
Files\news\408804a4\6fb240fa\assembly\dl3\0e565373 \78306203_8e1fc701\App_Web_hkd2czr6.DLL'

Source Error:

Line 110:
Line 111:
[System.Runtime.CompilerServices.CompilerGlobalScop eAttribute()]
Line 112: public class masterpage_master : global::MasterPage {
Line 113:
Line 114: private System.Web.UI.ITemplate
@__Template_mainContent;
Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary
ASP.NET
Files\news\408804a4\6fb240fa\App_Web_masterpage.ma ster.cdcab7d2.nxp-zado.0.cs
Line: 112

Please advise

Dec 14 '06 #2
Thanks for the help. I found the problem. I have backed up my
MasterPage.master as MasterPage_backup.master long time ago. As a
result, both files got compiled and they define exactly the same class.
I used to use Visual C++ 6.0 and it will generate a compilation error
when two source files define the same class. Visual Studio 2005 should
do a better hob to detecdt such error during compilation.

Dec 15 '06 #3
re:
Visual Studio 2005 should do a better hob to detecdt such error during compilation
Or, you could simply rename your backup files with the .bak extension.
That would solve the problem, too.

MasterPage.master.bak won't be compiled.

I often have *two* backup files for different versions.
I rename the older backup *.old. ( MasterPage.master.old , in this case ).

That way, I have references to previous configurations, while avoiding compilation errors.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
<ni**********@lexisnexis.comwrote in message
news:11*********************@t46g2000cwa.googlegro ups.com...
Thanks for the help. I found the problem. I have backed up my
MasterPage.master as MasterPage_backup.master long time ago. As a
result, both files got compiled and they define exactly the same class.
I used to use Visual C++ 6.0 and it will generate a compilation error
when two source files define the same class. Visual Studio 2005 should
do a better hob to detecdt such error during compilation.

Dec 15 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mike S. | last post by:
VS 2005 Professional RTM (8.0.50727.42) on Windows 2000 ASP.NET website Last week I converted a 1.1 ASP.NET (VB) project to 2.0. The conversion was painless on the VB code side. It was a lot of...
2
by: wschaub | last post by:
When publishing Web Applications different rules are applied than those applied to Building. This is sometimes a little late in the process to discover bugs at least give us a warning when...
8
by: Graham | last post by:
I noticed a similar post awhile ago and in terms of my problem it wasnt a suitable answer so I will ask again. I have VS2005 running a on development machine in my office where I do all my...
6
by: ewolfman | last post by:
Hi, I've read many posts in several news groups, but can't figure out how to publish my website. The specific error I'm getting (on the "successfully published website") is "Could not load the...
1
by: cadonahue | last post by:
VS 2005 Professional RTM (8.0.50727.42) on Windows 2000 ASP.NET website Last week I converted a 1.1 ASP.NET (VB) project to 2.0. The conversion was painless on the VB code side. It was a lot of...
3
by: lodatokab | last post by:
I'm have problem to run crystal report (VS 2005) on my computer with Windows 2000 Server. I run the solution in my dev envroiment (Windows XP) and no problems. When I try to run in on IIS 5.0 on...
21
by: Mark Rae | last post by:
Hi, I have an ASP.NET 2 web application (not web site) project and am using a web deployment project to deploy to the testing, then the production server. All has been working well for months...
3
by: mrajanikrishna | last post by:
Hi friends, I've designed an application in my local system using VS.NET 2003. (VB.NET and ASP.NET) Its working fine. Now, I want to publish to my ISPs server. I've FTP account. How can I...
3
by: =?Utf-8?B?SGVyYg==?= | last post by:
I've developed an ASP.NET website that runs fine on my local WinXP IIS and on my server's IIS, both are IIS6.0 The site uses a master page that has the following declaration: <%@ Master...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.