Play Swf File By Mentioning Its Path From Local Drive?
Jan 14, 2011
I am using asp.net 4.0 with C#. I have a webpage which shows a tabular list and upon clicking any one of it, the path of the swf file is queried to the access database and then the file needs to be played on the same webpage.
View 6 Replies
Similar Messages:
Oct 1, 2010
There is a hyperlink to a local file...for instance....C:/text.txt. This is not possible, because ASP.net does not allow links to local files. But, links to files on network drives such as W:/test.txt are working ok. how does the browser know which drive letter is local,and which is networked? How does it know that C: is local or D: is local etc, and that W: is a network drive?
View 1 Replies
Oct 20, 2010
I tried to save a file to local drive using the code below but got "access denied" error. How to save file to local drive? Dim file As String = "c:myfile" Dim stream As New System.IO.FileStream(file, System.IO.FileMode.Create)
View 6 Replies
Oct 20, 2010
I tried to save a file to local drive using the code below but got "access denied" error. How to save file to local drive?
View 2 Replies
Nov 7, 2010
i have been trying to solve this for hours with no luck. i seem to be missing something fundamental.
i have a remote FTP server with a file called log.txt on it, i wish to allow web users to download this file to their local drive to a designated folder.
i have a function calling this sub i found on the web with the filename to download.when trying to run this code i get this error:
" Could not find a part of the path 'C: empFtpDownloadsFolderlog.txt'. "
[Code]....
if i replace this line:
[Code]....
i get no error but the file is not in the TempPath. (it shows it to be saved to "C:WindowsTEMPlog.txt" )
i have a feeling its being save on the server instead of my local drive.
View 5 Replies
Mar 8, 2014
I want use flowplayer to play my flv video file. I have a datalist like below :
<asp:DataList ID="frmViedo" runat="server">
<ItemTemplate>
<div class="flowplayer"> <video>
<source type="video/flv" src='<%# Eval("Vurl" , "~/Videos/Video/{0}") %>'>
</video></div>
</ItemTemplate></asp:DataList>
In code behind :
if (Request.QueryString["vid"] != null) {
frmViedo.DataSource = video.GetVideoById(Convert.ToInt32(Request.QueryString["vid"]));
frmViedo.DataBind();
} public OleDbDataReader GetVideoById(int id) {
string strSelect = "select * from Video where VID = @VID";
return ExecuteReader(CommandType.Text, strSelect, new OleDbParameter[]{
new OleDbParameter("@VID" , id),
}); }
But it don't work and i get this error :
Adobe Flash is disabled for this page, click player area to enable. Why?
View 1 Replies
Mar 4, 2010
I am using VSTS 2008 + C# + .Net 3.5 + Silverlight 3.0 + ASP.Net to develop a Silverlight application (a video media player) in browser and the function is simple, just use MediaElement to play a remote video file.The remote server is Windows Server 2008 + IIS 7.0 + IIS Media Bit Rate Throttling Control.Since the request media URL can be discovered (e.g. from traffic sniffer), and I want to know how to prevent from download directly from the Url? i.e. I want end user to use my Silverlight media player application in browser to play the file, prevent them from download to local directly. Any easy and quick solution or reference code/documents?
View 5 Replies
Dec 4, 2010
I'm using ASP.NET with MVC 2 and have trouble translating a local file url to a server address. It would seem like a fairly simple and common task, but google searches gives me no good answers. (Perhaps i suck at searching)
I have a controller that takes a file from a html form in a view and saves it to disk. I need to return the real url of this file back to the View. Whatever method i use, I always get a string with the local path of the file instead of the http path.
I suspect the url might get translated to http address once the project has been deployed, but I really need the server address when debugging without having to hardcode anything.
Consider the following example in some controller method:
string url = Url.RequestContext.HttpContext.Server.MapPath("~/Content/Files/" + Path.GetFileName(file.FileName));
// outputs: "C:\Users\xxx\Documents\Visual Studio 2010\Projects\[ProjectName]\Content\Files\file.png"
// whereas i'd like something like "http://localhost/Content/Files/file.png" instead
View 1 Replies
Jul 1, 2010
I'm venturing into the world of Microsoft Reporting Services for the first time. So far it's gone pretty well, but I do have a couple of questions. The biggest one is, can I get the ReportViewer to use a relative path to my .rdlc file instead of the full path name that it seems insistent on using? When I'm developing locally oh my desktop, my filepath is c:inetputwwwrootcascadewritingwritingresults.rdlc; however, when I move this to production the filepath will become :websitecascadewritingwritingresults.rdlc. The .aspx page that my ReportViewer is embedded in resides in the same directory as the .rdlc file itself, so I was hoping I could just simply chop off the path altogether and reference the file name, but when I do ReportViewer fusses at me and says it can't find the file.
An error occurred during local report processing.
The report definition for report 'c:inetpubwwwrootCascadeWritingResults.rdlc' has not been specified
Could not find file 'c:inetpubwwwrootCascadeWritingResults.rdlc'.
In case you need/want to see it, my code for the ReportViewer is below:
[Code]....
View 3 Replies
Jan 29, 2011
I have a form where users can store some data for archived documents. All documents are ONLY in PDF format.
There are 2 things I would like to do:
1. there is a "file path" text box on the form. I would like to open a "browse file dialog" box when user clicks the textbox and then the user browses for the file (file is on the users local machine) and selects it. The full file path should be saved to the textbox as string (e.g. "c:archive2010document11122011.pdf"). Also I would like to "limit" the file browser dialog to only show PDF format files...
2. add a code behind command to open the file from the saved path+name (see 1.) in the user's default PDF viewer (Acrobat or Foxit)
View 11 Replies
Nov 2, 2010
I'll be having a website to upload images and am creating the database now , I'll have one original image and about 6 to 7 thumbnails , I just want it to be in the best possible way so I thought I'll save the original image in database and I'll be saving it's thumbnails on hard drive as they're going to be accessed alot so I dont want the httphandlers to be bringing like 20 images from the database while they can be brought easily from the harddrive.
View 7 Replies
Mar 17, 2010
I have a folder C:Images which has a some images. This folder is not inside my project and I would to know if there is a way to load an image from that folder on to an ASP.NET Image control.
<asp:Image ID="img" runat="server" />
One solution could be to make the Images folder a Virtual directory on the IIS but I would like to know if this can be done without creating a virtual directory for the Images folder.
View 2 Replies
Jun 28, 2010
I have a asp page in which i have to display the image which is stored in my local disk C: i.e.. C:Program FilesAdrenalinAdrenalinUploadedFilesTemplateFileabc.jpg
how can i do that...i am not able to do so. the image is not displayed instead it shows a empty image holder with the name of the image as specified and URL as not available.
View 2 Replies
Dec 15, 2010
I could not load my images from local drive or mypictures. I have used a imagebutton control
Code: image.imageurl ="C:lue.jpg"; (Its not working. I get the image as small icon")
But If i put the image in the root directory of my project i can load.
image.imageurl = "~/Images/blue.jpg"
What is the reason for it. What i should do to load the image from the local system.
View 5 Replies
Mar 9, 2010
i want to provide facility to my users to upload multiple images into my website using asp.net 2.0, using single file uploader i.e. want to upload all the image file from a folder.
View 3 Replies
Feb 14, 2011
How to locate the path of other drive's folder in server?
For ex:
The application is there in 'C:SomeFolder', now I want to export a file to the drive 'D:AnotherFolder' on the server. How can I achieve this?
View 2 Replies
Mar 29, 2011
When I press start on my VS2010/Silverlight/C# project, it opens a new instance of the included webserver and opens my browser window so I can test the application. Unfortunately something has happened and I am not sure what it was.. The browser window now opens the starting page with a local machine path (C:...page.aspx) rather than the normal webserver path through http (http://localhost:33592/page.aspx). It is a Silverlight Navigation project using c#/asp.net code behind.
View 2 Replies
Jan 29, 2011
i have web site, and i am using <asp:FileUpload ID="fileUploader" runat="server"/> to upload client xml file in sql database.
My site is hosted on Testing server, using IIS7.0, but client don't have iis server on his local machin.
Now the problem is that, if the user is trying to upload the xml file(or text file) from local machine(client machine), when user click the Browser button of "asp:FileUpload" control to open the local hard drive (C:) it's not openinig the client machine(local machine) hard drive(C: or D:). so user is not able to select his file location from his local machine to upload it.
But after clicking the Browser button it opening the Server hard drive.
My code is Given Below:-
[Code]....
View 2 Replies
Feb 15, 2010
I have a file structure setup by project number on my local drive. I have a database with the projectnumber, projectname, client, etc. I set up grid view to display the projectname, projectnumber and client. I need the projectname to be a hyperlink and once its clicked it should open the project folder on the local dirve. i need some code to bind my projectnumber to a hyprelink string of some nature that looks like F:/Projects/{ProjectNuber}
View 7 Replies
Mar 10, 2011
is it possible to simulate usb flash drive with code (asp.net with c# is better - if not with php) or a software like virtual clone drive ?
i have a program with usb flash drive unlocker (4 my laptop) and i want to simulate that usb drive , so i can get rid of that usb flash from my laptop !
View 1 Replies
Feb 28, 2011
I have a image control in my page.I will get the path dynamically like c:/localBracodeimage/barcode123.jpg. i gave the path to my image control like
imgBarcode.ImageUrl = c:/localBracodeimage/barcode123.jpg.
at runtime its not displaying...My application was published in IIS.
View 3 Replies
Sep 13, 2010
Is it possible for an ASP.NET web application installed on a web server to connect to an Access database stored on a local PC (which is NOT the web server)? I would like the web application to allow the user to specify the path/complete file specification to the database. Or, based on login information specified by the user, the web application might determine the path to the database via an administrative database stored on the web server. The user/customer would be responsible for the storage of the Access database. If the answer to my first question is "YES", how do I programmatically specify/format the path to the Access database on the local PC so the web application can locate the database?
The path has to be something more than "C:foldernamesubfoldernamedatabase.mdb". When I use a path like this, the web application produces an error indicating that the database does not exist or cannot be found. So, I'm fairly sure that the web application is not starting with Drive C: on the local PC to find the database. For all I know, the web application may be interpreting Drive C: as Drive C: on the web server. I'm wondering if I need to specify a computer name before "C:" in the database path.
View 1 Replies
Feb 22, 2011
I have a .js file that works fine locally, but I am somehow having path problems when I commit and add to my server. I have "Home" for the controller name, and "LoadTable" for the JsonResult function.
$(document).ready(function () {
$('#tableClick').click(function () {
$.post("Home/LoadTable", $('#FormTable').serialize(), function (data) {
alert("test");
}, 'json');
});
});
Should I have the path name be something else when published? If so how do I toggle from local to server version in my webconfig, if possible? Is there another option?
View 3 Replies
Mar 17, 2010
I have an ASp.net application using C#. I need to copy a file present on the web server machine to a remote machine on the network. Although this seems to be a trivial matter I am having difficulties copying the exe I am Trying
string Source = @"c: emp est.exe"
string Destination = @"Z: est.exe"
File.Copy(Source, Destination, true)
Z: is mapped to the Remote machine network drive. I am able to physically copy files to this drive from the Web Server machine, but when I try from ASp.net, I get the following error System.Io.Exception: Logon Failure: unknown user name or bad password
I think it has to do with the Web Server using the ASPNET user , which does not have the right credentials on the remote machine. I do not know how to solve this issue I tried using WMI too, I was able to copy files from one directory to another directory on the remote machine, but not from the Web Server machine to Remote machine
View 2 Replies
Apr 16, 2010
i have the following code. what i have tried to do is map a path which points to my R:/ - the value 'R:' is stored in my web.config file. this drive is on my server. what i then do is pass the file name and play in an embedded media player in the web browser. when browse the website everything works fine. however, when i browse the website on another PC, i get an error saying it cannot access the file. is this because the second PC i tried the wesbite on doesnt have an R: drive? i wouldnt have thought this was a problem though. is what i am doing wrong? does anyone know why i cant access the file on that drive?
fileName = ConfigurationManager.AppSettings["MappedDrive"] + fileName;
View 6 Replies