开发者

ASPX URL is broken & Streaming WebService

I'm attempting to create a streaming webservice, unfortunally i even lack its concept overall. My idea is to have a method which will return to me a string with the value of the URL to the streaming page.

I've tried many different ways to do this, but no one of them worked; I tried using DownloadString, even writting the raw URL, but i always had errors so i found one way to just make it happen:

[WebMethod]
public string WatchMedia(string title)
{
    Global.Media = title;

    Streaming str = new Streaming(); //Streaming.aspx

    return str.GetURL();
}

Okay so, in my aspx.cs i included this:

    internal string GetURL()
    {
       return HttpContext.Cur开发者_如何学Crent.Request.Url.AbsoluteUri.ToString();
    }

Don't really ask me about the 'internal', i'm so tired of trying different ways to get this to work that i just go along with that VS builds for me.

That does give me the URL i thought i wanted, BUT, it doesn't work, why? Because it says, give or take (directly translated):

    The request format is not recognized for the unexpectedly terminated URL in /WatchMedia

WatchMedia is the name of my method as seen above.

Now, beside's hoping someone can give me a straight answer as to what ridiculous sin am i hurting my self with here, i'd like to know if this is the way for a streaming webservice to work? I can't seem to find any real information about video streaming webservices over the www, not even Google will tell me!


If you ever have the same problem, just forget creating an object of the aspx page, and get the URL raw, by running the page and copying it, then all you have to do is change the localhost Port, which you can get from HttpContext.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜