Click here to Skip to main content
15,888,803 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
newVideo.YouTubeEntry.MediaSource = new MediaFileSource(imgpath,"video/mp4");



in the above code the path starts from c\programfiles\iis...
but the file is actually on the desktop,andit aorks if i save the video to the application and use server.mappath
Posted
Comments
DamithSL 16-Jun-14 5:21am    
is this web application? where you host your application?
Member 10033457 16-Jun-14 5:31am    
yes its a web application

1 solution

Because this is C# code you have to save it to the server and you can't run it from the client. Server.MapPath is the correct approach but it has to be on the server.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900