I'm using a custom membership provider and login page.
I copied the user
controls and dll for the project to the usercontrol and bin folder
respectively. When I try to use the login page specifically I get the error
listed below from adding ?umbdebugshowtrace=true. The other controls from this
project work fine.
The error traces
to
onauthenticate="loginMainControl_Authenticate"
onloggedin="loginMainControl_LoggedIn"
on the asp:login
contol, if I remove them it works fine, but I can't login. Both work in other
implementations.
Any help or a point
to a good resource would be very helpful as I am fairly new to Umbraco.
Using
umbraco v 4.7.0 (Assembly version: 1.0.4090.21631 Microsoft .NET Framework
Version:4.0.30319; ASP.NET Version:4.0.30319.225 Windows 7 and WebMatrix
Error
macro
Macro - Error creating usercontrol
(usercontrols/mainLogin.ascx)
c:\usercontrols\mainLogin.ascx(9): error CS1061:
'ASP.usercontrols_mainlogin_ascx' does not contain a definition for
'loginMainControl_Authenticate' and no extension method
'loginMainControl_Authenticate' accepting a first argument of type
'ASP.usercontrols_mainlogin_ascx' could be found (are you missing a using
directive or an assembly reference?)
at
System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult
result, Boolean keyFromVPP, VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String
cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode,
Boolean ensureIsUpToDate)
at
System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath
virtualPath, Boolean ensureIsUpToDate)
at
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath
virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean
allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext
context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp,
Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean
ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext
context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp,
Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate)
at System.Web.UI.TemplateControl.LoadControl(VirtualPath
virtualPath)
at umbraco.macro.loadUserControl(String fileName, MacroModel
model, Hashtable pageElements)
Have you tried debugging by using the usercontrol in an aspx page outside of Umbraco? If you're using Visual Studio, create a new WebForm called Testpage.aspx and then drag your user control onto it. Then If you request this page in your browser in debug mode, does it work?
Apologies if you've already tried this...it's helped me get out of a few buggy spots when I was first starting out and not knowing how to debug things properly before sticking them in Umbraco.
I do. I realize that it is telling me that it is missing the methods in the dll, but I don't know why as they are there and the other controls that use this same dll work fine.
System.Web.HttpCompileException (0x80004005): c:\\Umbraco\usercontrols\mainLogin.ascx(9): error CS1061: 'ASP.usercontrols_mainlogin_ascx' does not contain a definition for 'loginMainControl_Authenticate' and no extension method 'loginMainControl_Authenticate' accepting a first argument of type 'ASP.usercontrols_mainlogin_ascx' could be found (are you missing a using directive or an assembly reference?) at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at umbraco.developer.assemblyBrowser.Page_Load(Object sender, EventArgs e)
I've got the same problem with a UserControl I created. I got a couple of buttons on it, and when the page renders I got an error than I go back to the developer section and right click the macro / Browse Properties and find this:
System.Web.HttpCompileException (0x80004005): d:\hosting\2060382\html\usercontrols\edSurvey.ascx(103): error CS1061: 'ASP.usercontrols_edsurvey_ascx' does not contain a definition for 'bt1_Click' and no extension method 'bt1_Click' accepting a first argument of type 'ASP.usercontrols_edsurvey_ascx' could be found (are you missing a using directive or an assembly reference?) at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at umbraco.developer.assemblyBrowser.Page_Load(Object sender, EventArgs e)
Error when using a custom login control as a macro
I'm using a custom membership provider and login page.
I copied the user controls and dll for the project to the usercontrol and bin folder respectively. When I try to use the login page specifically I get the error listed below from adding ?umbdebugshowtrace=true. The other controls from this project work fine.
The error traces to
onauthenticate="loginMainControl_Authenticate"
onloggedin="loginMainControl_LoggedIn"
on the asp:login contol, if I remove them it works fine, but I can't login. Both work in other implementations.
Any help or a point to a good resource would be very helpful as I am fairly new to Umbraco.
Using
Error
macro
Macro - Error creating usercontrol (usercontrols/mainLogin.ascx)
c:\usercontrols\mainLogin.ascx(9): error CS1061: 'ASP.usercontrols_mainlogin_ascx' does not contain a definition for 'loginMainControl_Authenticate' and no extension method 'loginMainControl_Authenticate' accepting a first argument of type 'ASP.usercontrols_mainlogin_ascx' could be found (are you missing a using directive or an assembly reference?)
at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate)
at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath)
at umbraco.macro.loadUserControl(String fileName, MacroModel model, Hashtable pageElements)
Have you tried debugging by using the usercontrol in an aspx page outside of Umbraco? If you're using Visual Studio, create a new WebForm called Testpage.aspx and then drag your user control onto it. Then If you request this page in your browser in debug mode, does it work?
Apologies if you've already tried this...it's helped me get out of a few buggy spots when I was first starting out and not knowing how to debug things properly before sticking them in Umbraco.
Rory
Hey Rory,
thanks for the reply. I have used this control many times before in other websites that are non-umbraco.
Cheers,
Chris
Hi Chris
Under Developer - Macros, click your login macro and then Browse Properties button on the right. Does it give an error?
Rory
I do. I realize that it is telling me that it is missing the methods in the dll, but I don't know why as they are there and the other controls that use this same dll work fine.
System.Web.HttpCompileException (0x80004005): c:\\Umbraco\usercontrols\mainLogin.ascx(9): error CS1061: 'ASP.usercontrols_mainlogin_ascx' does not contain a definition for 'loginMainControl_Authenticate' and no extension method 'loginMainControl_Authenticate' accepting a first argument of type 'ASP.usercontrols_mainlogin_ascx' could be found (are you missing a using directive or an assembly reference?) at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at umbraco.developer.assemblyBrowser.Page_Load(Object sender, EventArgs e)
Has anybody figured that out yet?
I've got the same problem with a UserControl I created. I got a couple of buttons on it, and when the page renders I got an error than I go back to the developer section and right click the macro / Browse Properties and find this:
System.Web.HttpCompileException (0x80004005): d:\hosting\2060382\html\usercontrols\edSurvey.ascx(103): error CS1061: 'ASP.usercontrols_edsurvey_ascx' does not contain a definition for 'bt1_Click' and no extension method 'bt1_Click' accepting a first argument of type 'ASP.usercontrols_edsurvey_ascx' could be found (are you missing a using directive or an assembly reference?) at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at umbraco.developer.assemblyBrowser.Page_Load(Object sender, EventArgs e)
Would somebody help? I appreciate!
Sergio Nunes
is working on a reply...