umbraco

Why do some 'potentially dangerous Request.Path' HttpExceptions ignore httpErrors settings?

為{幸葍}努か 提交于 2019-12-11 17:40:01
问题 I have a .Net website with custom error pages configured using the web.config httpErrors section: <httpErrors errorMode="Custom" existingResponse="Replace"> <clear/> <error statusCode="400" path="/page-not-found/" responseMode="ExecuteURL" /> <error statusCode="404" path="/page-not-found/" responseMode="ExecuteURL" /> <error statusCode="500" path="/error/" responseMode="ExecuteURL" /> </httpErrors> and <httpRuntime requestValidationMode="2.0" targetFramework="4.5" /> When I visit http://www

CS0246: The type or namespace 'IApplication' could not be found

喜夏-厌秋 提交于 2019-12-11 14:59:52
问题 While customizing the Dashboard, I tried to add a new Ribbon like media and settings. I have followed the documentation... [Application("siteExporter", "Site Exporter", "tray-icon.png", 10)] public class SiteExporterApplication : IApplication { public SiteExporterApplication () {} } ... but I have received the following compilation error: CS0246: The type or namespace 'IApplication' could not be found (are you missing a using directive or an assembly reference?) What is wrong with the code

Umbraco 7: create menu datatype with submenus

南笙酒味 提交于 2019-12-11 14:49:45
问题 How can I create a navigation menu data type with submenu items so that I can create it in the back office with properties like text, href, optional image? Something like dropdown multiple. I've installed Umbraco 7.1.5 with NuGet in VS2013 and using Razor syntax. EDIT: Is it possible to create an object of type menu and edit it in the back-end's UI, for a non-developer. The user should add as many items or sub items as needed with those properties, with a plus sign. I've found this property

Umbraco.Library.IsLoggedOn() does not work from XSLT

荒凉一梦 提交于 2019-12-11 12:24:34
问题 This is simple xslt, that shows the login status of the current user. Everything worked fine on development server, but once we've setup app on production, umbraco.librarty.IsLoggedOn() started always to return false. Application uses method umbraco.libraty.IsLoggedOn() from .NET code and from there it returns proper value, but from xslt doesn't. <xsl:choose> <xsl:when test="umbraco.library:IsLoggedOn() = true()"> You are logged in as <q> <xsl:variable name="user" select="umbraco.library

Umbraco alternative?

跟風遠走 提交于 2019-12-11 12:14:34
问题 I've been trying to learn how develop websites with ASP.NET as well as setup a personal website to use as a online porfolio/resume. With my website I've decided to not try to reinvent the wheel and thus decided to use a premade ASP.NET based CMS. After reading a lot of reviews I settled on Umbraco, but now I'm seeking out alternatives. I like Umbraco a lot but I keep running into problems. Since installing it on my host I haven't made any changes through the file system, or database directly.

Make a optional search in umbraco

扶醉桌前 提交于 2019-12-11 10:58:27
问题 I made new document type in umbraco.then made some node by this document type in content. i will set up a new search index so found this code that Setting up a new search index. @* Get the search term from query string *@ @{var searchTerm = Request.QueryString["search"];} @{var results = ExamineManager.Instance.Search(searchTerm, true); } but i do not know how to limited this code that can search only in my document type. 回答1: There are couple of steps for this. You will have to: Create a

Umbraco ApplicationContext.Current is null

删除回忆录丶 提交于 2019-12-11 10:33:06
问题 I have an MVC website and I need to pull out a couple of pieces of data from an Umbraco database. I don't need any of the Umbraco views or any of that stuff. I'm new to the Umbraco Core libraries. What I did was create a reference to the Umbraco.core dll from my web project and added the connection string to the Umbraco database in my web config. I then added a method to attempt to retrieve some data public IContentType GetBenefits() { var contentTypeService = ApplicationContext.Current

Add attributes to Insert Image dialogue of Umbraco RTE or Create Custom Data type

谁说我不能喝 提交于 2019-12-11 08:23:57
问题 How can I add attributes to the current Insert Image dialogue box on umbraco Richtext Editor? What I really want is to let content editor choose images and set their class, and maybe choose if this is lightbox image or not. If user choose lighbox option, then a hyper link is added with some extra attributes, like data-rel. I even want to be able to modify the image url added by the content editor, if possible. The output should look like this <a href="/media/2813/DSC_2615.JPG" data-rel=

AiHandleErrorAttribute Vs. Built-In auto added Action Filter provided by Application Insights

限于喜欢 提交于 2019-12-11 08:12:29
问题 I just installed Application Insights into my ASP.NET MVC application. It's actually an Umbraco website, and the registration is slightly different but the result should be the same. When installing the package, it added some code for me to register a new Exception Action Filter globally called 'AiHandleErrorAttribute'. I'm registering it the Umbraco way using an event handler: public class RegisterAIEventHandler : ApplicationEventHandler { protected override void ApplicationInitialized

Umbraco - custom model causing problems?

巧了我就是萌 提交于 2019-12-11 07:28:51
问题 In a vanilla Umbraco project, i am importing a vanilla MVC app. I am currently beeing held up, by this error: Cannot bind source type eParser.Model.MyModel to model type MyNamespace.Controllers.ViewModel`1[[eParser.Model.MyModel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]. This is my code: Local project namespace MyNamespace.Controllers { public class MyOutputController : RenderMvcController { private static Parser _parser; public MyOutputController() { _parser = new Parser(@