السلام عليكم
عندي برنامج المطلوب منة رفع الملف من الجوال الى السيفر بس في خط فى الكود مب عارف حلة

وهذا الكود
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Net;
namespace GPRS
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private CM cm = new CM();
private ConnectionStatus status = new ConnectionStatus();
private void button_Connect_Click(object sender, EventArgs e)
{
Uri u = new Uri(textBox_URL.Text);
Guid[] mappedGUIDs = cm.MapURL(u);
status = cm.Connect(mappedGUIDs[0]);
if (status == ConnectionStatus.Connected)
label_Status.Text = "Connection Succeded!";
else
label_Status.Text = "Connection Failed : " + status.ToString();
}
private void button_ReleaseConnection_Click(object sender, EventArgs e)
{
cm.ReleaseCon();
cm.GetStatus();
label_Status.Text = cm.ConStatus.ToString();
}
public void UploadFile(string localFile, string textBox_URL)
{
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(textBox_URL);
req.Method = "PUT";
req.AllowWriteStreamBuffering = true;
// Retrieve request stream and wrap in StreamWriter
Stream reqStream = req.GetRequestStream();
StreamWriter wrtr = new StreamWriter(reqStream);
// Open the local file
StreamReader rdr = new StreamReader(localFile);
// loop through the local file reading each line
// and writing to the request stream buffer
string inLine = rdr.ReadLine();
while (inLine != null)
{
wrtr.WriteLine(inLine);
inLine = rdr.ReadLine();
}
rdr.Close();
wrtr.Close();
req.GetResponse();
}
public void UploadFileBinary(string localFile, string textBox_URL)
{
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(textBox_URL);
req.Method = "PUT";
req.AllowWriteStreamBuffering = true;
// Retrieve request stream
Stream reqStream = req.GetRequestStream();
// Open the local file
FileStream rdr = new FileStream(localFile, FileMode.Open);
// Allocate byte buffer to hold file contents
byte[] inData = new byte[4096];
// loop through the local file reading each data block
// and writing to the request stream buffer
int bytesRead = rdr.Read(inData, 0, inData.Length);
while (bytesRead > 0)
{
reqStream.Write(inData, 0, bytesRead);
bytesRead = rdr.Read(inData, 0, inData.Length);
}
rdr.Close();
reqStream.Close();
req.GetResponse();
}
private void uploadButton_Click_1(object sender, EventArgs e)
{
UploadFile(localFile.Text, textBox_URL.Text);
}
private void uploadBinaryButton_Click(object sender, EventArgs e)
{
UploadFileBinary(localFile.Text, textBox_URL.Text);
}
}
}دايم يطلع لى خط فى هذا السطر
// Open the local file StreamReader rdr = new StreamReader(localFile);
فا الى عندة فكرة ولا حل لا يبخل بها على
وشكرا