Copied to clipboard

Flag this post as spam?

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


  • Robert Lewis 29 posts 94 karma points
    May 03, 2012 @ 10:15
    Robert Lewis
    0

    Umbraco 4.7.2 error when adding a usercontrol

    Started a new site using umbraco 4.7.2 yesterday.

    When I tried to add a .NET usercontrol in a macro, selected the user control, saved it and then clicked on the browse properties button it came up with the following error:

     

    Error reading usercontrols/hello.ascx

    The following list shows the Public Properties from the Control. By checking the Properties and click the "Save Properties" button at the bottom, umbraco will create the corresponding Macro Elements.

     

    System.ArgumentException: The relative virtual path 'usercontrols/hello.ascx' is not allowed here. at System.Web.VirtualPath.FailIfRelativePath() at System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull) at System.Web.Hosting.HostingEnvironment.MapPathInternal(VirtualPath virtualPath) at System.Web.Hosting.HostingEnvironment.MapPath(VirtualPath virtualPath) at umbraco.IO.IOHelper.MapPath(String path, Boolean useHttpContext) at umbraco.IO.IOHelper.ValidateEditPath(String filePath, String validDir) at umbraco.developer.assemblyBrowser.Page_Load(Object sender, EventArgs e)

    I tried the same control in a 4.7.1.1 site and it worked fine. Has anyone else had the same problem?

    Thanks

     

  • Anthony Candaele 1197 posts 2049 karma points
    May 03, 2012 @ 10:32
    Anthony Candaele
    0

    Hi,

    A couple of days ago I added a user control to a macro in my Umbraco 4.7.2 website without problems.

    Anthony

  • Robert Lewis 29 posts 94 karma points
    May 03, 2012 @ 10:49
    Robert Lewis
    0

    Hi,

    Did you use the web deploy version with sql CE?

    Thanks

    Rob

  • Andy Carlier 16 posts 74 karma points
    May 03, 2012 @ 16:45
    Andy Carlier
    0

    I'm getting this too.  The sites an upgrade from 4.7.1 and I'm updating the control with xcopy when I recompile my custom project if any of that's relevant.Not seen it before so it does seem like a 4.7.2 feature.

    Andy.

    [UPDATE]

    Tried in a fresh install by adding directly into the folders (i.e. not xcopy) and get the same error.

     

  • Robert Lewis 29 posts 94 karma points
    May 03, 2012 @ 17:01
    Robert Lewis
    0

    I have had to downgrade to 4.7.1.1 for the time being

  • Narcis Hutanu 1 post 21 karma points
    May 04, 2012 @ 22:32
    Narcis Hutanu
    0

    I get that too. It works if you set the properties manually in the "Parameters" tab. You have to match the properties' name and type.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 05, 2012 @ 02:58
    Jan Skovgaard
    0

    Hi guys

    This seems like a bug that has been introduced into v4.7.2 - would any of you mind reporting it on codeplex with a proper description of Umbraco version, DB and how to reproduce it? And please post a link to the issue in here so others who come across this issue can vote it up.

    Cheers,
    Jan

  • Gareth Evans 142 posts 334 karma points c-trib
    May 06, 2012 @ 05:20
    Gareth Evans
    2

    A client alerted me to this issue in a site I was looking at for them.

    I have raised a work item and fixed the issue, about to push the changes to the repo

    http://umbraco.codeplex.com/workitem/30807

    Gareth

  • Denis 47 posts 68 karma points
    May 13, 2012 @ 15:09
    Denis
    0

    I have same problem with 4.7.2 version. I can not use custom user control as macro in template. 

    If i copy/pase code to html template, this is working, but not as macro.

    Any solution for that  ?

  • Murray 4 posts 27 karma points
    May 13, 2012 @ 21:08
    Murray
    3

    I've had this issue in live production 4.7.2 and workstation development.

    In my case, when I created or added a usercontrol the same or similar error as Robert pointed out.

    I noticed that the first Slash was missing.

    Added "/" before the "usercontrols" and it all worked again.

    /usercontrols/hello.ascx vs usercontrols/hello.ascx

    Hope this helps

    Murray

  • Denis 47 posts 68 karma points
    May 13, 2012 @ 21:53
    Denis
    0

    Thank You mr. Murray it is working now :-)

  • Santhosh 58 posts 99 karma points
    May 15, 2012 @ 08:11
    Santhosh
    0

    I had the same issue with umbraco 4.7.2.

    Workaround: add a "/" to the path of the user control when creating macro 

    for. e.g. usercontrols/xxx.ascx to /usercontrols/xxx.ascx

    this works. then you will be able to see the "PROPERTIES" thru "BROWSE PROPERTIES".

  • miguel 9 posts 29 karma points
    Jul 17, 2012 @ 16:36
    miguel
    0

    The work around works.  Just make sure to save the macro after you add the dash "/", before clicking on "Browse Properties"

  • Pete 213 posts 285 karma points
    Oct 13, 2012 @ 15:59
    Pete
    0

    Hmm, this workaround doesn't work for me, I've overwritten the dll's in the bin folder with the latest 4.7.2 versions, and still get the error.

    Anything else I can try? The usercontrol checks out fine on local test server.

    This is what I get when I click on browse properties, AFTER clicking the save icon.

    System.Web.HttpParseException (0x80004005): Could not load type 
    'usercontrols_GalleryLogin'. ---> System.Web.HttpParseException 
    (0x80004005): Could not load type 'usercontrols_GalleryLogin'. ---> 
    System.Web.HttpException (0x80004005): Could not load type 
    'usercontrols_GalleryLogin'.
       at System.Web.UI.TemplateParser.GetType(String typeName, Boolean 
    ignoreCase, Boolean throwOnError)
       at System.Web.UI.TemplateParser.ProcessInheritsAttribute(String 
    baseTypeName, String codeFileBaseTypeName, String src, Assembly 
    assembly)
       at 
    System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary
     parseData)
       at System.Web.UI.TemplateParser.ProcessException(Exception ex)
       at System.Web.UI.TemplateParser.ParseStringInternal(String text, 
    Encoding fileEncoding)
       at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath 
    virtualPath, Encoding fileEncoding)
       at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath 
    virtualPath, Encoding fileEncoding)
       at System.Web.UI.TemplateParser.ParseFile(String physicalPath, 
    VirtualPath virtualPath)
       at System.Web.UI.TemplateParser.ParseInternal()
       at System.Web.UI.TemplateParser.Parse()
       at 
    System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType()
       at 
    System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider
     buildProvider)
       at 
    System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders()
       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)

  • Douglas Ludlow 210 posts 366 karma points
    Nov 07, 2012 @ 19:46
    Douglas Ludlow
    0

    That solution worked like a charm. Thanks, Murray!

  • Anshul Verma 1 post 21 karma points
    May 15, 2015 @ 10:56
    Anshul Verma
    0

    I hv used user control in macro in umbraco 6.0 with mvc but my button click is not work 

     

     

Please Sign in or register to post replies

Write your reply to:

Draft