Forum Moderators: open
So incoming is [server...]
I want to capture just the 'recording1.wmv' portion of the url and bump the user to the following link:
mms://server/recording1.wmv
Most of this is out of my hands (and over my head) and I really only have a few options, one of them is changing the GenerateASX.aspx page...
Does anyone have any ideas?
ps.. it seems I can edit web.config (if that helps at all)for the site but most everything else (including the page where the URL params are coming from) are compiled into DLLS and unavailable to me.
I never have to do this stuff so I am way over my head. Is there a way that you could post a full formed page where this would work? Also, at the end of the URL there is a &remote=true that needs to be pulled from the filename.
Thanks for the help.
<body>
</body>
</html>
I can get the following to autoredirect - that is about as far as I got
<html>
<head>
<title>redirect</title>
<script runat="server" language="C#">
protected void Page_Load(Object s, EventArgs e)
{
Response.Redirect("http://website.com/");
}
</script>
</head>
<body>
</body>
</html>
<html>
<head>
<title>redirect</title>
<script runat="server" language="C#">
protected void Page_Load(Object s, EventArgs e)
{
string snpstrm = Request.QueryString["show"];
Response.Redirect("mms://server/" + snpstrm);
}
</script>
</head>
I am just testing the basic princples of the redirect... ran into a problem with AddContentType or AddHeader to make the browser know what to do with the mms links...any ideas?
Still need to cut out c:/readytoview/ before file name... ironically as I have it now, it drops the &remote=true off the end of the filename already...
<body>
</body>
</html>
I needed how to figure out how to use .Replace but no matter what I kept getting errors from the web server. I found the .Remove function; which is based on integers/characters and it basically starts at character 0 and removes all the characters through 15 in the begining of the string, which is the 'c:/readytoview/' portion in the original URL being handed to the page in question. One odd thing is that sometimes the link coming in is actually 'c%3a%5readytoview%5c' which is more than 15 characters... but either the browser does something of ASP.NET does something and it only 'sees' it as 15 characters. If I edit the code below to 0, 21 it chops more of the string off. I need it to work unconditionally across all platforms and browsers - anyone know why the 'c%3a%5readytoview%5c' is being handled that way? I mean, if it works everytime that is fine, i just want to make sure.
<html>
<head>
<title>redirect</title>
<script runat="server" language="C#">
protected void Page_Load(Object s, EventArgs e)
{
string snpstrm = Request.QueryString["show"];
string mms = snpstrm.Remove(0,15);
Response.Redirect("http://server:8080/" + mms);
}
</script>
</head>
<body>
</body>
</html>