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?
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.
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.
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)
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
Hi,
A couple of days ago I added a user control to a macro in my Umbraco 4.7.2 website without problems.
Anthony
Hi,
Did you use the web deploy version with sql CE?
Thanks
Rob
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.
I have had to downgrade to 4.7.1.1 for the time being
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.
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
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
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 ?
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
Thank You mr. Murray it is working now :-)
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".
The work around works. Just make sure to save the macro after you add the dash "/", before clicking on "Browse Properties"
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.
That solution worked like a charm. Thanks, Murray!
I hv used user control in macro in umbraco 6.0 with mvc but my button click is not work
is working on a reply...