Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • chris vdP 13 posts 35 karma points
    Jul 18, 2011 @ 18:49
    chris vdP
    0

    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 

    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)

     

     

  • Rory 59 posts 84 karma points
    Jul 18, 2011 @ 19:46
    Rory
    0

    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

  • chris vdP 13 posts 35 karma points
    Jul 18, 2011 @ 19:48
    chris vdP
    0

    Hey Rory,

    thanks for the reply. I have used this control many times before in other websites that are non-umbraco.

    Cheers,

    Chris

  • Rory 59 posts 84 karma points
    Jul 18, 2011 @ 19:56
    Rory
    0

    Hi Chris

    Under Developer - Macros, click your login macro and then Browse Properties button on the right. Does it give an error?

    Rory

  • chris vdP 13 posts 35 karma points
    Jul 18, 2011 @ 19:59
    chris vdP
    0

    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)

  • Sergio Nunes 15 posts 36 karma points
    Jan 13, 2012 @ 14:47
    Sergio Nunes
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft