Check if mms:// or rtsp:// url exists (url not broken)

N

Noulouk

Hello,

I need to verify if mms:// or rtsp:// urls exists.

I do like this for http:// :

public static bool GetPage(String url)
{
try
{
// Creates an HttpWebRequest for the specified URL.
HttpWebRequest myHttpWebRequest =
(HttpWebRequest)WebRequest.Create(url);
// Sends the HttpWebRequest and waits for a
response.
HttpWebResponse myHttpWebResponse =
(HttpWebResponse)myHttpWebRequest.GetResponse();
if (myHttpWebResponse.StatusCode ==
HttpStatusCode.OK)
return true;

// Releases the resources of the response.
myHttpWebResponse.Close();

}
catch(WebException e)
{
Console.WriteLine("\r\nWebException Raised. The
following error occured : {0}",e.Status);
}
catch(Exception e)
{
Console.WriteLine("\nThe following Exception was raised
: {0}",e.Message);
}
return false;
}

If I replace mms:// by http:// , I can check the url.
But the same code doesn't work for rtsp protocols.

I apreciate any help to learn how to request a mms:// and rtsp://
file.(just need to check if the url is not broken)

Thanks in advance for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top