I am developing a flex 4 application. The VideoPlayer component plays video when I place it in /web-root/video/myfile.flv. But my application will have alot of videos and hence I am supposed to store them in a separate directory, say, D:\mysitedata\videos. So I tried playing the video from this location but I get a playbackError.
<s:VideoPlayer width="800" height="600" complete="vpCompleteHandler(event);" loop="false" mediaPlayerStateChange="vpMediaPlayerStateChangeHandler(event);"
source="D:\mysitedata\videos\myfile.flv" />
It looks like you are trying to sue local and network resources at the same time. The Flash player does not like this by default. There is a great article on how to get around this at the following URL:
http://www.indieas.org/2009/09/error-2148-or-how-to-access-local-and-network-resources/
I am summing that you are running a kiosk like application since you are accessing local resources. Remote users will not be able to access your D: drive.
If you would like remote users to access your drive than you should create a virtual folder that points to your videos folder, and then use that virtual folder in the source path of the video.
Related
I have searched for the answer to this question, and have found some similar results, but most seem to be interested in linking a file on an internal website (such as this one: An URL to a Windows shared folder). I am hoping to find a way to link a file on a public facing site.
On my windows server, I have several drives - for the ease of this, let's call them C:, D:, and E:
C: is, of course, the OS.
I have a file share for internal users (those on the same network) on E:. I have the file share location shared internally as \server\data.
I have a public facing website (through IIS) on D:. Let's say the website is located at D:\Website, with the default page being D:\Website\index.html.
Is it possible to create a link on the website that points to files on the E: drive? Like file://server/data/file.txt? Or would it be easier to move the website to the same directory as the file share?
it is possible , but \\server (Windows UNC port 445) is a port that was abused and is blocked by many ISP's for almost a decade now.
Your "public" most likely will not have access
file:/// will not work either , as to the user, that means the persons local machine
what you can do is create a virtual directory to your drive or network share in IIS and make sure in iis (optionally can you can enable use directory browsing)
ftp:// is also a possibility as well and what i think you should look into
I have a web application with a page. The page has a functionality to upload a file.
I have deployed the application on two different servers in IIS7. Both these hosting have a virtual directory pointing to the same physical directory.
Here I am unable to save the posted file in the virtual directory using Server.MapPath.
Is there any sophisticated technique to handle such situation to achieve this functionality?
Well I'd suggest you 2 scenarios:
Share a folder/resource beetween those servers (assuming that
those servers are in the same LAN), then create app key in the
web.config and this key will contain the path of your shared
resource something like //Server/Folder, use this value instead of server.mappath at the time you
save the file in the server
If you have a load balancer share a folder of your main node and
then use the that path in your secondary node something like
//server/folder that route will save the image in the main node, then
set up a replication rule from your main node and the secondary the
configuration of this rule could vary depending on your needs it
could be an update to the seconday node every 5 minutes for example.
you may create a virtual directory but the purpose for this will be only for displaying the images.
that worked for for me some time ago, it's not a fancy solution but it does the job.
I have the problem to show the html file on local drive in my aspx page on IE9. I have read the question at how to set iframe src to local file.
I can show the html file which is on the another drive on the server by the below code.
<iframe src="\\servercomputer\G$\test6.html" title="test" />
I don't want people see my actual folder location. I tried to create the virtual directory under the website, but I got the "cannot find the page error" Would someone show me what I should do.
Thanks in advance.
It's possible to have virtual directory that points at a network location - you will have to play with the "Connect As" and specify name/password for access:
IIS Virtual Directory map to network drive (with drive letter) but fail to create file
Another way (possibly better) would be to have a proxy in C# that would download the file from another server
I'm working on a project in ASP.NET but I'm stucked in this case;
I have ten thousands of images in local machine. I need to show them in the picturebox in ASP.Net. I can not copy all images to web appliation folder. So I have to give the file path like
\\server\something\something.jpg
But it doesnt work of course.
I found some solutions but they are not so clear, so I didnt manage to success.
So what should I do ?
In IIS, define a virtual sub-directory in your site, with directory's physical location being \\server\something. Then you will be able to specify image virtual url as ~/something.jpg.
Use code-behind to return images (aspx page or ashx handler) - then, with enough permissions given to IIS user, the web application will read the required image and put it in response stream.
Hi I'm new to adobe flash/flex so please forgive me if my question isn't too clear. I'm developing a website with a flash object that dynamically generates its content and I want the flash object itself to be embeddable into other website like how youtube does it. I have no clue how to approach this and any help would be really appreciated.
You need two things:
1) Distribute the url or embed code for your swf online somewhere (like done in youtube). You get the code by publishing your flash object and then copy paste the html embed tags.
2) If you're dynamically loading stuff into the flash object you will need to allow data loads from all hosts. Lets say that you have a source file at www.domain.com that the flash object loads. Some one takes the Flash application and puts it on their site at www.otherdomain.com. This application then tries to do a cross domain data load www.otherdomain.com <- www.domain.com. That will fail unless you have you explicitly allow cross domain loads for www.domain.com. You do this by adding a crossdomain.xml file to your websites root or preferably the folder where the source file is kept. If you put in the webroot then all content hosted there will be available to load from anywhere. The xml file should contain all the domain that are allowed to load anything from your domain (in this case it should just contain a * to allow any domain to load from your domain).
Here's a basic example that allows any domain to load data
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM
"http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*"/>
</cross-domain-policy>
More info on that (http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html)
The above answer is better than this one, but if you're brand new to Flash and Flex you might want to look into Adobe's distribution servies - http://www.adobe.com/flashplatform/services/distribution/ - I'm not sure if it will do everything you want but for a newbie it might not be a bad way to go.
=Ryan ryan#adobe.com