umbraco

Returning Json instead of XML with Umbraco Base

混江龙づ霸主 提交于 2019-11-30 14:44:43
I have a .NET method that adds a new member to my DB. It does this through an AJAX request. I have this working correctly, however I am having problems returning the correct response message so I can print the correct messages to the user. My method at the moment looks like this: public static string MemberRegister(int process) { //here we find form values posted to the current page HttpRequest post = HttpContext.Current.Request; //get values from ajax URL var name = post["name"]; var email = post["email"]; var username = post["username"]; var password = post["password"]; //check if email

Setting up local development environment for Umbraco

心已入冬 提交于 2019-11-30 13:26:51
I have inherited an Umbraco CMS project, the Umbraco instance and custom user controls exist on our test server as the initial build has been demo-ed to the client already. I now need to take this on, the initial build was done by a freelance dev before my time here and no documentation exists on set up, deployment, etc. The custom usercontrols were under source control and build ok, after a bit of bug fixing. I have followed the following to try and get an instance of the Umbraco install and custom controls working on my machine for developing against. http://slickjuanito.wordpress.com/2012

Async Controller Action with Umbraco 7 returns string

淺唱寂寞╮ 提交于 2019-11-30 12:59:50
Is it possible to use an async action within an Umbraco SurfaceController (and UmbracoApiController) I tried the following code public async Task< ActionResult> HandleLogin(LoginViewModel model) { await Task.Delay(1000); return PartialView("Login", model); } and although it compiled correctly when the action is called the action seems to return as soon as the await is hit, and returns a string System.Threading.Tasks.Task`1[System.Web.Mvc.ActionResult] the controller of course inherits from SurfaceController and I wonder if this is the problem? If this is not possible, are there any workarounds

How to make pagination in XSLT

好久不见. 提交于 2019-11-30 10:56:28
I have the following XSLT: <xsl:template match="/"> <div id="dokumentliste"> <xsl:variable name="alleNyheder" select="$currentPage//node" /> <xsl:for-each select="$alleNyheder"> <xsl:sort data-type="text" select="@createDate" order="descending" /> <xsl:if test="./data[@alias='manchet'] != ''"> <div class="newsitem"> <h2> <xsl:value-of select="./data[@alias='title']"/> </h2> <xsl:if test="./data[@alias = 'manchet'] != ''"> <div class="nyhedContent"> <p> <span class="dokumentListeDato"> <xsl:choose> <xsl:when test="./data[@alias='date'] != ''"> <xsl:value-of select="umbraco.library

To hashbang or not to hashbang?

烂漫一生 提交于 2019-11-30 10:29:53
问题 I'm developing a new website and I'd like to make use of AJAX as much as possible. Basically, I want users to almost never navigate away from the homepage and have everything displaying in popup windows, sliders, sections etc. Now our existing website already ranks pretty high so I also want to keep Google happy. I've been reading the Making AJAX Applications Crawlable by Google and understand that I have to provide the same content for the crawler via _escaped_fragment_ . The problem I want

Global.asax in Umbraco 6

烂漫一生 提交于 2019-11-30 09:08:17
I had the following in my Global.asax (Umbraco 4.7) Application_Start Application_EndRequest Application_Error Session_Start Session_End Now I have upgraded to Umbraco 6.0.3, which global.asax inherits from Umbraco.Web.UmbracoApplication Where do I put my event handlers (and what are the equivalent method names)? Aximili This is what I found so far. You can create your own class public class Global : Umbraco.Web.UmbracoApplication { public void Init(HttpApplication application) { application.PreRequestHandlerExecute += new EventHandler(application_PreRequestHandlerExecute); application

How to debug Azure 500 internal server error [closed]

萝らか妹 提交于 2019-11-30 08:00:03
My newly deployed site is getting a 500 internal server error. I'm trying to deploy Umbraco to Azure. I've turned off custom errors but that doesn't help. Is there anyway to see the error that Azure is throwing? SOLVED I was able to edit my configuration and setup RDP into my web role. Once on the box I couldn't go to it via IP because I'm using the umbraco accelerator. There was a binding in IIS to go to 0.mydomain.com. If I used that I could see the page from the server and the error came up. For 500 errors, one good way is to turn diagnostics on and to look at the logs - both the

301 Redirect one domain to another using web.config

喜夏-厌秋 提交于 2019-11-30 06:27:05
I have multiple domains pointing to one hosting location. I wish to establish one of the domains as my main domain and therefore I wish to perform a 301 redirect to this main domain whenever a user accesses my site from a secondary domain. For example: www.example.com This is my main domain. I want all other domains associated with my site to redirect to here. If a user comes in on: www.test.com or www.test.com/anypage etc. Then I want the user to be redirected to the example version of that page. How do I do this using the web.Config file of my application? The reason I ask is that usually my

Umbraco 7 Update Umbraco Routes

本小妞迷上赌 提交于 2019-11-30 05:32:20
I am trying to create an Umbraco 7 MVC application. In doing so, I want to be able to create custom controllers that manage data behind the scenes. Through my research, I found using the SurfaceController was the most successful. However, the route adds "/umbraco/surface/" to the page. For example, my Test Controller and View would look like "/umbraco/surface/Test". Is there a way to manage these routes and have it simply go to "/Test" without adding the Umbraco route to it? Any guidance on how to create custom controllers within Umbraco 7 would be helpful! this is what I have achieved in my

Sharepoint CMS vs UmbracoCMS

你离开我真会死。 提交于 2019-11-30 02:45:39
I work for a large local government organisation who are about to embark on using SharePoint to replace our ageing intranet with an all-singing all-dancing collaborative site. The focus for the intranet will be replacing random files, content pages and documents that are spread across the organisation with a SharePoint installation which will magically bring order to all of this. The decision to use SharePoint for the intranet has already been made. The CMS we use on our public website also needs replacing. I have proposed using UmbracoCMS, but due to the pending SharePoint implementation on