C# .NET - How we upload vedio and play vedio in MVC 3(ASPX Engine)

Asked By ALOK RANJAN on 01-May-12 01:05 AM
hi........everyone
                       
                         I want to play vedio in MVC3 with ASPX Engine (Not Rozor) .
                         Please provide me step by step solution.


Thanks & Best Regards
Alok Ranjan
kalpana aparnathi replied to ALOK RANJAN on 01-May-12 08:03 AM
hi,

you picked h.264 codex, which firefox (and chrome) does not support natively. you need to get a h.264 plugin.

Regards,
bharti odedra replied to ALOK RANJAN on 01-May-12 09:44 AM
that is not supported

but this may be posible

using System;

using System.IO;

using System.Net;

using System.Text;

 

namespace Examples.System.Net

{

  public class WebRequestGetExample

  {

  public static void Main ()

  {

    

    FtpWebRequest obs = (FtpWebRequest)WebRequest.Create("ftp://www.xyz.com/test.htm");

    obs.Method = WebRequestMethods.Ftp.UploadFile;

 

    

    obs.Credentials = new NetworkCredential ("anonymous","janeDoe@contoso.com");

     

    

    StreamReader sourceStream = new StreamReader("testfile.txt");

    byte [] fileContents = Encoding.UTF8.GetBytes(sourceStream.ReadToEnd());

    sourceStream.Close();

    obs.ContentLength = fileContents.Length;

 

    Stream requestStream = obs.GetRequestStream();

    requestStream.Write(fileContents, 0, fileContents.Length);

    requestStream.Close();

 

    FtpWebResponse response = (FtpWebResponse) obs.GetResponse();

   

    Console.WriteLine("Upload File Complete, status {0}", response.StatusDescription);

   

    response.Close();

    }

  }

  }

}
bharti odedra replied to ALOK RANJAN on 01-May-12 09:44 AM
that is not supported

but this may be posible

using System;

using System.IO;

using System.Net;

using System.Text;

 

namespace Examples.System.Net

{

  public class WebRequestGetExample

  {

  public static void Main ()

  {

    

    FtpWebRequest obs = (FtpWebRequest)WebRequest.Create("ftp://www.xyz.com/test.htm");

    obs.Method = WebRequestMethods.Ftp.UploadFile;

 

    

    obs.Credentials = new NetworkCredential ("anonymous","janeDoe@contoso.com");

     

    

    StreamReader sourceStream = new StreamReader("testfile.txt");

    byte [] fileContents = Encoding.UTF8.GetBytes(sourceStream.ReadToEnd());

    sourceStream.Close();

    obs.ContentLength = fileContents.Length;

 

    Stream requestStream = obs.GetRequestStream();

    requestStream.Write(fileContents, 0, fileContents.Length);

    requestStream.Close();

 

    FtpWebResponse response = (FtpWebResponse) obs.GetResponse();

   

    Console.WriteLine("Upload File Complete, status {0}", response.StatusDescription);

   

    response.Close();

    }

  }

  }

}