Please help with Compiler Error: CS0030

K

keithb

This application works without error in the development environment using
the VS web server. When I publish the site to my IIS 6.0 server, I get this
error at runtime when I open the Change Password page:


Compiler Error Message: CS0030: Cannot convert type
'ASP.admin_changepassword_aspx' to
'System.Web.UI.WebControls.ChangePassword'

Compiler Error Message: CS0030: Cannot convert type
'ASP.admin_changepassword_aspx' to
'System.Web.UI.WebControls.ChangePassword'

Warning: CS0108: 'ASP.admin_changepassword_aspx.ApplicationInstance' hides
inherited member 'ChangePassword.ApplicationInstance'. Use the new keyword
if hiding was intended.



I don't have clue as to the cause. Can someone suggest a way to resolve
this?

Thanks,

Keith


Source Error:



Line 118: public admin_changepassword_aspx() {
Line 119: string[] dependencies;
Line 120: ((ChangePassword)(this)).AppRelativeVirtualPath =
"~/admin/ChangePassword.aspx";
Line 121: if
((global::ASP.admin_changepassword_aspx.@__initialized == false)) {
Line 122: dependencies = new string[4];


Detailed Compiler Output:

c:\windows\system32\inetsrv>
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe" /t:library
/utf8output
/R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll"
/R:"C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll"
/R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\root\b0c7db47\51e62a1d\assembly\dl3\d0ac35f3\cb3209be_8a8ac601\App_Web_yksvlogw.DLL"
/R:"C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll"
/R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll"
/R:"C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll"
/R:"C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll"
/R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll"
/R:"C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll"
/R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\root\b0c7db47\51e62a1d\assembly\dl3\e687f4e0\71d006be_8a8ac601\App_Web_xggn6rym.DLL"
/R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\root\b0c7db47\51e62a1d\assembly\dl3\bc1a9ee9\990ec4bd_8a8ac601\App_Code.DLL"
/R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\root\b0c7db47\51e62a1d\App_Web_c1ri0trg.dll"
/R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll"
/R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\root\b0c7db47\51e62a1d\assembly\dl3\8e30a06e\1de6dbbd_8a8ac601\App_global.asax.DLL"
/R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll"
/out:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\root\b0c7db47\51e62a1d\App_Web_changepassword.aspx.fdf7a39c.zo2x8vjb.dll"
/D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\root\b0c7db47\51e62a1d\App_Web_changepassword.aspx.fdf7a39c.zo2x8vjb.0.cs"
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\root\b0c7db47\51e62a1d\App_Web_changepassword.aspx.fdf7a39c.zo2x8vjb.1.cs"


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:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\root\b0c7db47\51e62a1d\App_Web_changepassword.aspx.fdf7a39c.zo2x8vjb.0.cs(133,53):
warning CS0108: 'ASP.admin_changepassword_aspx.Profile' hides inherited
member 'ChangePassword.Profile'. Use the new keyword if hiding was intended.
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\root\b0c7db47\51e62a1d\assembly\dl3\e687f4e0\71d006be_8a8ac601\App_Web_xggn6rym.DLL:
(Location of symbol related to previous warning)
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\root\b0c7db47\51e62a1d\App_Web_changepassword.aspx.fdf7a39c.zo2x8vjb.0.cs(139,35):
warning CS0108: 'ASP.admin_changepassword_aspx.ApplicationInstance' hides
inherited member 'ChangePassword.ApplicationInstance'. Use the new keyword
if hiding was intended.
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\root\b0c7db47\51e62a1d\assembly\dl3\e687f4e0\71d006be_8a8ac601\App_Web_xggn6rym.DLL:
(Location of symbol related to previous warning)
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\root\b0c7db47\51e62a1d\App_Web_changepassword.aspx.fdf7a39c.zo2x8vjb.0.cs(120,14):
error CS0030: Cannot convert type 'ASP.admin_changepassword_aspx' to
'System.Web.UI.WebControls.ChangePassword'
 
D

davefromalbury

i had a similar problem-try changing the name of the class (where it
says Inherits="some_class" and in the .cs file). Solved it for me :)

cheers
dave
 
Joined
Mar 1, 2007
Messages
1
Reaction score
0
Hi,

As Dave says above, this problem occurs whenever you have a class name which already exists in the System.Web.UI.WebControls namespace.

So there is plenty of stuff - Login - View - Calendar - any of these cannot be reused.

So, in your example, change the following to get this to work:

1) rename ChangePassword.aspx to ChangePasswordPage.aspx
- if using visual studio, this will also rename the codebehind file.
2) Change the CLASS name in the codebehind also to ChangePasswordPage
3) Change inherits="ChangePassword" to inherits="ChangePasswordPage" in the markup of ChangePassword.aspx

It should now work!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,954
Messages
2,570,116
Members
46,704
Latest member
BernadineF

Latest Threads

Top