Labels: tech fun
An amazing passionate recipe for Developers......!
Posted by Ahmad Sheikh at Thursday, January 10, 2008Developers take a passionate recipe daily before going to start their non-stop activities. Recipes like given below promote developers,praise developers that they are the most valuable like in a TEAM. see how MICROSOFT call its DEVELOPERS.......Amazing?
Labels: tech fun
How to upload file to the ftp Server or Flash Media Server(Influxis) using c#
Posted by Ahmad Sheikh at Thursday, January 10, 2008//First create FtpWebRequest object with the ftpURL
System.Net.FtpWebRequest ftpRequest = (System.Net.FtpWebRequest)System.Net.WebRequest.Create(CompleteFTPPath);
//Set the ftp Method, like 'UploadFile' for upload
ftpRequest.Method = System.Net.WebRequestMethods.Ftp.UploadFile;
//Give your user name & password of the ftp login
ftpRequest.Credentials = new System.Net.NetworkCredential(ConfigurationManager.AppSettings.Get("username"), ConfigurationManager.AppSettings.Get("password"));
ftpRequest.UsePassive = false;
// By default KeepAlive is true, where the control connection is not closed
// after a command is executed.
ftpRequest.KeepAlive = false;
// Specify the data transfer type.
ftpRequest.UseBinary = true;
// Opens a file stream (System.IO.FileStream) to read the file to be uploaded
System.IO.FileStream streamObj = System.IO.File.OpenRead(CompleteLocalPath);
// Notify the server about the size of the uploaded file
ftpRequest.ContentLength = streamObj.Length;
// The buffer size is set to 2kb
int buffLength = 2048;
byte[] buff = new byte[buffLength];
int contentLen;
// Stream to which the file to be upload is written
System.IO.Stream writeStream = ftpRequest.GetRequestStream();
// Read from the file stream 2kb at a time
contentLen = streamObj.Read(buff, 0, buffLength);
// Till Stream content ends
while (contentLen != 0)
{
// Write Content from the file stream to the FTP Upload Stream
writeStream.Write(buff, 0, contentLen);
contentLen = streamObj.Read(buff, 0, buffLength);
}
// Close the file stream and the Request Stream
streamObj.Close();
writeStream.Close();
Labels: C#
Adobe Flash Media Player has stopped a potentially unsafe operation
Posted by Ahmad Sheikh at Saturday, January 05, 2008Adobe Flash Media Player has stopped a potentially unsafe operation
When I run my flash application from my system and connect to the Remote Flash Media Server I get the following message.
That reminds us about the new Flash Player 8 security changes and how local content cannot access remote files. I clicked Settings…. to allow this application run. When you will click on Settings….you will be redirected to the Flash Player Security web page where you can allow your application to run properly by adding it in that.
You will have in front of you Adobe Flash Player Settings Manager like given below. You need to click on ‘Edit locations… ‘ to add your application locations.
As you click on add location will have a new window which will represent you the recently tried application path. To add your application path select application by clicking on the Browse for files… button and select application.
After that your application will be added in that so close that web browser and restart your application which should run successfully.
Labels: Flash Media Server
Labels: tech fun