A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

AI OnAI Off

YouTube response and URL Rewriting

Vote:
 

Hi I'm having issues with the URL rewriting that EPiServer does and the response from the YouTube API.

When uploading a video to youtube it'll create a response in the following format:

http://localhost:6666/NUSSL.NUS.CMS/YouTube/YouTubeResponseHandler.aspx?status=200&id=Lo2k64e6BSw
Problem I'm having is that EPiServer is hiding the 'id' parameter from the query string and I need access to it so I can save the string as a property of an EPiServer page.
I've tried removing URL rewriting from the page with the following in Application_Start in the global.asax:
 EPiServer.Web.FriendlyUrlRewriteProvider.UnTouchedPaths.Add("/YouTube/YouTubeResponseHandler.aspx");
Which doesn't seem to let me view the 'id' parameter in the URL.
I've also tried the following HttpModule from Ruwen Jin's blog to no avail:
using System;
using System.Collections.Generic;
using System.Text;

using EPiServer.Web;

namespace NUSSL.NUS.CMS.Application.Modules
{
public class KeepIdForDataHandler : System.Web.IHttpModule
{
#region IHttpModule Members

static bool isURLHandlerInitialized = false;

public void Dispose()
{
}

public void Init(System.Web.HttpApplication context)
{
if (!isURLHandlerInitialized)
{
try
{
UrlRewriteModule.HttpRewriteInit += new EventHandler(UrlRewriteModule_HttpRewriteInit);

isURLHandlerInitialized = true;
}
catch
{
isURLHandlerInitialized = false;
}
}
}

static void UrlRewriteModule_HttpRewriteInit(object sender, UrlRewriteEventArgs e)
{
UrlRewriteModule urm = (UrlRewriteModule)sender;

urm.HttpRewritingToInternal += new EventHandler(urm_HttpRewritingToInternal);
}

static void urm_HttpRewritingToInternal(object sender, UrlRewriteEventArgs e)
{
if (e.Url.Path.ToLower().EndsWith("youtuberesponsehandler.aspx"))
{
e.Cancel = true;
}
}

#endregion
}
}

 Any suggestions?

#21832
Jul 10, 2008 19:03
Vote:
 

And I see should have this in the global.asax, but it's still not helped :

EPiServer.Web.FriendlyUrlRewriteProvider.UnTouchedPaths.Add("/NUSSL.NUS.CMS/YouTube/YouTubeResponseHandler.aspx");
#21833
Edited, Jul 10, 2008 19:28
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.