Copied to clipboard

Flag this post as spam?

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


  • wolulcmit 357 posts 693 karma points
    Jul 01, 2013 @ 13:44
    wolulcmit
    0

    V6 - integrating with 3rd party .net projects that also use a Global.asax

    With older versions of umbraco it was possible to integrate other .net web projects to run under the same directory structure as umbraco (messy I know but sometimes there's a need for it)

    The problem I have is that I've used the current version of Umbrac V6.1.x (which now has its own Global.asax file) and I don't have the know-how to get it to run alongside or play nicely with my third partys global.asax file. This happened to be easier to work around in earlier versions of Umbraco (as no global.asax file and App_global.asax.dll could be removed)

    does anyone have any experience with this?
    perhaps the following is on the right track
    http://www.sitepoint.com/forums/showthread.php?423744-Combine-2-application-s-global-asax-files
    http://codebetter.com/karlseguin/2006/06/12/global-asax-use-httpmodules-instead/

    just wondering if anyone else has found an easy way to get around this

    thanks!


    - Tim

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Jul 01, 2013 @ 15:54
    Jeroen Breuer
    0

    I managed to get my own global.asax running like this:

    My own global:

    namespace Umbraco.Extensions.Utilities
    {
        public class Global : Umbraco.Web.UmbracoApplication
        {
            public override string GetVaryByCustomString(HttpContext context, string custom)
            {
                if (custom.ToLower() == "url")
                {
                    return "url=" + context.Request.Url.AbsoluteUri;
                }
    
                return base.GetVaryByCustomString(context, custom);
            }
        }
    }

    Go to the global.asax in the Umbraco root of your website and updated it like this:

    <%@ Application Codebehind="Global.asax.cs" Inherits="Umbraco.Extensions.Utilities.Global" Language="C#" %>

    So you can add your own global.asax, but it still needs to inherit from Umbraco.Web.UmbracoApplication. Don't know if you can do that with your 3rd party projects?

    Jeroen

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Jul 02, 2013 @ 13:53
    Jeroen Breuer
    0

    Just a quick bump because notifications didn't work. See my previous post :-).

  • wolulcmit 357 posts 693 karma points
    Jul 02, 2013 @ 14:04
    wolulcmit
    0

    Hi Jeroen,

    thanks! that's good to know. Unfortunately the 3rd party app/project I'm integrating I dont have access to the source, so can't recompile using the code you suggested above... but perhaps I dont need to since I know what the namespace of the 3rd party should be ?

    I will give it a shot and see how far I get.

    - Tim

     

Please Sign in or register to post replies

Write your reply to:

Draft