473,416 Members | 1,716 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,416 software developers and data experts.

Cannot convert type 'ASP.login_aspx' to 'System.Web.UI.WebControls.Login'

I have a page that has the login control on it, nothing else. This page inherits from a master page, neither page has any code in it. This page works perfectly when running on the WebDev debug web server. I am able to log in. However after publishing the page to my local IIS, it results in the below error. This error is occurring on the Visual Studio.Net 2k5 release version, but did not occur on the beta 2, same code.

A point of interest, is that I uninstalled IIS, then re-installed it after a recent system rebuild (which I did to completely remove the beta), and I reinstalled asp.net to IIS afterwards.

First the html :
************************************************** *************************************************
************************************************** *************************************************
<%@ Page Language="C#" MasterPageFile="~/default.master" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" Title="Login" %>
<asp:Content ID="Content1" ContentPlaceHolderID="content" Runat="Server">
<asp:Login ID="Login1" runat="server" PasswordRecoveryText="Cant remember your password?" PasswordRecoveryUrl="~/RecoverPassword.aspx" DestinationPageUrl="~/Default.aspx">
</asp:Login>
</asp:Content>

************************************************** *************************************************
************************************************** *************************************************
Cannot convert type 'ASP.login_aspx' to 'System.Web.UI.WebControls.Login'

Event Type: Warning
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event
Event ID: 1310
Date: 11/7/2005
Time: 10:43:16 AM
User: N/A
Computer: DEVPC01
Description:

Event code: 3007
Event message: A compilation error has occurred.
Event time: 11/7/2005 10:43:16 AM
Event time (UTC): 11/7/2005 4:43:16 PM
Event ID: 6c82372492fa42dbbbd4a0f5b794ed8d
Event sequence: 40
Event occurrence: 7
Event detail code: 0

Exception information: Exception type: HttpCompileException
Exception message: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET Files\deleted\3ee2c232\4383868\App_Web_login.aspx. cdcab7d2.pfd6ysg8.0.cs(118):
error CS0030: Cannot convert type 'ASP.login_aspx' to 'System.Web.UI.WebControls.Login'

Request information:
User host address: 127.0.0.1
User:
Is authenticated: False
Authentication Type:
Thread account name: DEVPC01\ASPNET

Thread information:
Thread ID: 1
Thread account name: DEVPC01\ASPNET
Is impersonating: False
Stack trace: at System.Web.Compilation.AssemblyBuilder.Compile()

at System.Web.Compilation.BuildProvidersCompiler.Perf ormBuild()
at System.Web.Compilation.BuildManager.CompileWebFile (VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildR esultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVPathBuildR esultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVirtualPath ObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.Compilation.BuildManager.CreateInstance FromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.UI.PageHandlerFactory.GetHandlerHelper( HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.UI.PageHandlerFactory.System.Web.IHttpH andlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.HttpApplication.MapHttpHandler(HttpCont ext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
at System.Web.HttpApplication.MapHandlerExecutionStep .System.Web.HttpApplication.IExecutionStep.Execute ()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously)
Nov 19 '05 #1
6 14523
**crickets**
"Tim Cartwright" <ti************@nospam.us-interactive.com> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl...
I have a page that has the login control on it, nothing else. This page inherits from a master page, neither page has any code in it. This page works perfectly when running on the WebDev debug web server. I am able to log in. However after publishing the page to my local IIS, it results in the below error. This error is occurring on the Visual Studio.Net 2k5 release version, but did not occur on the beta 2, same code.

A point of interest, is that I uninstalled IIS, then re-installed it after a recent system rebuild (which I did to completely remove the beta), and I reinstalled asp.net to IIS afterwards.

First the html :
************************************************** *************************************************
************************************************** *************************************************
<%@ Page Language="C#" MasterPageFile="~/default.master" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" Title="Login" %>
<asp:Content ID="Content1" ContentPlaceHolderID="content" Runat="Server">
<asp:Login ID="Login1" runat="server" PasswordRecoveryText="Cant remember your password?" PasswordRecoveryUrl="~/RecoverPassword.aspx" DestinationPageUrl="~/Default.aspx">
</asp:Login>
</asp:Content>

************************************************** *************************************************
************************************************** *************************************************
Cannot convert type 'ASP.login_aspx' to 'System.Web.UI.WebControls.Login'

Event Type: Warning
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event
Event ID: 1310
Date: 11/7/2005
Time: 10:43:16 AM
User: N/A
Computer: DEVPC01
Description:

Event code: 3007
Event message: A compilation error has occurred.
Event time: 11/7/2005 10:43:16 AM
Event time (UTC): 11/7/2005 4:43:16 PM
Event ID: 6c82372492fa42dbbbd4a0f5b794ed8d
Event sequence: 40
Event occurrence: 7
Event detail code: 0

Exception information: Exception type: HttpCompileException
Exception message: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET Files\deleted\3ee2c232\4383868\App_Web_login.aspx. cdcab7d2.pfd6ysg8.0.cs(118):
error CS0030: Cannot convert type 'ASP.login_aspx' to 'System.Web.UI.WebControls.Login'

Request information:
User host address: 127.0.0.1
User:
Is authenticated: False
Authentication Type:
Thread account name: DEVPC01\ASPNET

Thread information:
Thread ID: 1
Thread account name: DEVPC01\ASPNET
Is impersonating: False
Stack trace: at System.Web.Compilation.AssemblyBuilder.Compile()

at System.Web.Compilation.BuildProvidersCompiler.Perf ormBuild()
at System.Web.Compilation.BuildManager.CompileWebFile (VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildR esultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVPathBuildR esultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVirtualPath ObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.Compilation.BuildManager.CreateInstance FromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.UI.PageHandlerFactory.GetHandlerHelper( HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.UI.PageHandlerFactory.System.Web.IHttpH andlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.HttpApplication.MapHttpHandler(HttpCont ext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
at System.Web.HttpApplication.MapHandlerExecutionStep .System.Web.HttpApplication.IExecutionStep.Execute ()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously)
Nov 19 '05 #2

Howdy,

I hit the same issue just now...and you are the only one I could find
who was having the same problem. The good news is I figured it out...I
thought it might have to do with the name of the page (based on the
error we were both receiving). I renamed my page from Login.aspx to
MemberLogin.aspx. I recompiled and deployed. Everything worked!!!!

Based on the name of your page I assume this will work for you.

Good luck!
--
sholder
------------------------------------------------------------------------
sholder's Profile: http://www.highdots.com/forums/m1413
View this thread: http://www.highdots.com/forums/t3074792

Nov 19 '05 #3
WOW MUAHAHAHAHAHAHHA - Interesting................. I also find this
interesting that this code was working in Beta 2, but now is broke.

"sholder" <sh************@no-mx.forums.yourdomain.com.au> wrote in message
news:sh************@no-mx.forums.yourdomain.com.au...

Howdy,

I hit the same issue just now...and you are the only one I could find
who was having the same problem. The good news is I figured it out...I
thought it might have to do with the name of the page (based on the
error we were both receiving). I renamed my page from Login.aspx to
MemberLogin.aspx. I recompiled and deployed. Everything worked!!!!

Based on the name of your page I assume this will work for you.

Good luck!
--
sholder
------------------------------------------------------------------------
sholder's Profile: http://www.highdots.com/forums/m1413
View this thread: http://www.highdots.com/forums/t3074792

Nov 19 '05 #4
Yeah! I also encontered the same problem...

Nov 19 '05 #5

Hey Guys,

Finally, I found a group of people having the same error!
It's been two days on this already and nothing... :(

sholder,
I am happy for you man, because I tried the same thing with no positive
results.
When changing the name of the file I also had to change web.config,
otherwise it keeps looking for "Login.aspx", which according to MS it
is the default login path for vs2k5.

Hopefully, there is a different try for this... hopefully!

Cheers

edusabrz

Nov 19 '05 #6

I finally GOT IT !!!
Simply using a different name for the page is not enough.
Here is the solution I found on Microsoft's lab website:

If you have used a Page that effectively uses a codebehind classname
that is the same as say the Login control, that is Login, e.g. your
page was called Login.aspx, then when you pre-compile (publish) the web
site as an updateable web site, the aspx is retained and tries to
compile against a type called Login in the code behind. It does not
resolve to be that in the codebehind assembly

Try using a classname for your codebehind and defined in the inherits
that does not clash with a type in System.Web, e.g. LoginPage, or
qualify the class and therefore the inherits statement with a
namespace, e.g.

<%@ page ... inherits="theNs.Login" %.

namespace theNs { public partial class Login : System.Web.UI.Page { ..
} }

Now... going to the next challenge... :)

Take care you all!

edusabrz.

Nov 19 '05 #7

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

Similar topics

2
by: Andrew | last post by:
I am trying to set the column information - which ones I want displayed and how with the web grid control. The interface has some big differences when compared to the winform. Is this possible...
1
by: Hozi | last post by:
I am getting the below error when asp.net tries to parse the .aspx file. The funny part is that the error only seems to be happening when viewing the page throuh IE 6 and not Netscape browsers. I...
5
by: Columbia Pike | last post by:
Hi, I'm trying to have a login page; after logging in the user has to see the list of SQL Server Databases available to him/her. I'm always getting the error 'ASP.login_aspx' does not contain a...
16
by: Nathan Sokalski | last post by:
I have Visual Studio .NET and SQL Server Desktop Engine on my computer. I have created an empty database using Visual Studio .NET's Server Explorer. However, I am having trouble connecting to the...
1
by: sianan | last post by:
I tried to use the following example, to add a checkbox column to a DataGrid in an ASP.NET application: http://www.codeproject.com/aspnet/datagridcheckbox.asp For some reason, I simply CAN'T get...
5
by: Learner | last post by:
Hello, Here is the code snippet I got strucked at. I am unable to convert the below line of code to its equavalent vb.net code. could some one please help me with this? static public...
2
by: keithb | last post by:
A web site published from its development environment (VS Web Server) to an IIS 6.0 site displays this message: Compiler Error Message: CS0030: Cannot convert type 'ASP.login_aspx' to...
0
by: yukijocelyn | last post by:
I have experienced a problem here while doing a form for accessing datadbase using MS Access. I'm using the AccessDataSource control, and using Gridview to pull the data from the database. I am able...
1
by: =?ISO-8859-1?Q?Lasse_V=E5gs=E6ther_Karlsen?= | last post by:
I get the above error in some of the ASP.NET web applications on a server, and I need some help figuring out how to deal with it. This is a rather long post, and I hope I have enough details that...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.