user1492588
user1492588

Reputation:

URL error for some files,The requested document was not found on this server

Hi every one i have a funny problem. i want to read an URL from a database ,but it give me this error for some videos! not all of them!(the error is The requested document was not found on this server. )In local network it work fine and all the movies are playing!, but when i upload the site in internet, the error occurs. any idea? and here is the fine URL: http://babakpirmoradi.ir/User/videos/Ostadpirmoradi2.flv here is the url that gives error: http://babakpirmoradi.ir/User/videos/418619301525735_21489.mp4

here is my code: (GetUrl() pass the URL dynamically)

<div style="width: 650px">
<video id="example_video_1" align="center" class="video-js" controls="controls" 
       height="442" preload="auto" width="590">
<source src=<%=GetURL()%> type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'/>    
</video></div>

here is my url cod:

public string GetURL()
    {
        string connStr = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
        SqlConnection sqlconn = new SqlConnection(connStr);
        SqlCommand sqlcmd = new SqlCommand();
        sqlconn.Open();
        sqlcmd = new SqlCommand("SELECT Video FROM AddVideo where ID=@ID", sqlconn);
        sqlcmd.Parameters.AddWithValue("@ID", Request.QueryString["ID"]);
        string URL = ((string)sqlcmd.ExecuteScalar()).ToString();
        return URL;
    }

Upvotes: 0

Views: 2104

Answers (1)

writeToBhuwan
writeToBhuwan

Reputation: 3281

This is happening because the video actually does not exists or we have no rights to access it:

The video does not exist

Upvotes: 1

Related Questions