Geeks With Blogs

AzamSharp Some day I will know everything. I hope that day never comes.

Well, call me crazy but I decided to migrate from Visual Studio.NET 2005 WebSite to Web Application Project. It was a bad decision as now I am facing annoying errors. Check out the error below which is thrown because of the Login control.

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: CS0030: Cannot convert type 
'ASP.login_aspx' 
to 'System.Web.UI.WebControls.Login'

Source Error:

 

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

Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary
 ASP.NET Files\root\23c2a77e\aa6cf731\App_Web_login.aspx.cdcab7d2.iei5x67s.0.cs    Line: 120 
 

 

powered by IMHO 1.3

Posted on Wednesday, May 31, 2006 8:15 PM | Back to top


Comments on this post: Migration Problems from Visual Studio.NET 2005 to Web Application Project

# re: Migration Problems from Visual Studio.NET 2005 to Web Application Project
Requesting Gravatar...
The problem you have above is that your page is called "Login" and the class in your code-behind is also probably called "Login". This is causing a compilation conflict with the built-in login control. To fix this, rename your code-behind class name.

Hope this helps,

Scott
Left by scottgu on May 31, 2006 9:01 PM

# re: Migration Problems from Visual Studio.NET 2005 to Web Application Project
Requesting Gravatar...
Hi,

I did that but that did not fix my problem. Since after that I cannot refer to the login control. I tried putting another login control on the webform "Login2" but once again I was not able to see the login control in the intellisense.
Left by azamsharp on May 31, 2006 9:36 PM

# re: Migration Problems from Visual Studio.NET 2005 to Web Application Project
Requesting Gravatar...
Can you send me email (scottgu@microsoft.com) with the .aspx and the code-behind file (or the .ziped up project)?

I'm pretty sure it is a name conflict issue.

Thanks,

Scott
Left by scottgu on Jun 01, 2006 9:44 AM

# re: Migration Problems from Visual Studio.NET 2005 to Web Application Project
Requesting Gravatar...
Yes it is a naming problem. A few solutions:
1. Change your login page name (e.g. LoginPage.aspx) and the relevant web.config section.
2. Fully qualify the class name (better):

See the following link for a full explanation.
http://www.netnewsgroups.net/group/microsoft.public.dotnet.framework.aspnet/topic13767.aspx
Left by Ben on Jun 15, 2006 1:32 AM

# re: Migration Problems from Visual Studio.NET 2005 to Web Application Project
Requesting Gravatar...
thanks hope fully it will work
dinesh
Left by dinesh on Mar 10, 2007 8:01 AM

# re: Migration Problems from Visual Studio.NET 2005 to Web Application Project
Requesting Gravatar...
This worked for me. I was converting from VS2005 Express Version (Web Site) to VS2005 Pro with Web Application Project installed.
Left by Steve Davis on Jan 26, 2008 5:15 AM

Your comment:
 (will show your gravatar)


Copyright © Mohammad Azam | Powered by: GeeksWithBlogs.net