malihe joon
یک شنبه 20 بهمن 1392, 12:47 عصر
سلام .در حال آپلود کردن فایل هستم که از کپچا ایراد میگیره تو local host اجرامیشه. از این خط ایراد میگیره.میشه زودترمنو راهنمایی کنید؟
string ABC = "QWERTYUIOPASDFGHJKLZXCVBNM1234567890qwertyuiopasdf ghjklzxcvbnm";
Random rand = new Random();
object ABC1 = rand.Next(1, 62);
object ABC2 = rand.Next(1, 62);
object ABC3 = rand.Next(1, 62);
object ABC4 = rand.Next(1, 62);
object ABC5 = rand.Next(1, 62);
object ABC6 = rand.Next(1, 62);
string strABC1 = ABC.Substring(Convert.ToInt32(ABC1), 1);
string strABC2 = ABC.Substring(Convert.ToInt32(ABC2), 1);
string strABC3 = ABC.Substring(Convert.ToInt32(ABC3), 1);
string strABC4 = ABC.Substring(Convert.ToInt32(ABC4), 1);
string strABC5 = ABC.Substring(Convert.ToInt32(ABC5), 1);
string strABC6 = ABC.Substring(Convert.ToInt32(ABC6), 1);
string result = strABC1 + strABC2 + strABC3 + strABC4 + strABC5 + strABC6;
Session.Add("result", result);
Bitmap SecImage = new Bitmap(Server.MapPath("~/images/capcha-111.jpg"));
Graphics Grapimage = Graphics.FromImage(SecImage);
Grapimage.DrawString(result.ToString(), new Font("Tohoma",16, FontStyle.Strikeout), SystemBrushes.WindowText, new PointF());
SecImage.Save(Server.MapPath("~/images/security capcha-111.jpg")):عصبانی:;
Image1.ImageUrl = "~/images/security capcha-111.jpg";
از خط یکی مانده به آخر یعنی موقع save کردن ایراد میگیره؟
string ABC = "QWERTYUIOPASDFGHJKLZXCVBNM1234567890qwertyuiopasdf ghjklzxcvbnm";
Random rand = new Random();
object ABC1 = rand.Next(1, 62);
object ABC2 = rand.Next(1, 62);
object ABC3 = rand.Next(1, 62);
object ABC4 = rand.Next(1, 62);
object ABC5 = rand.Next(1, 62);
object ABC6 = rand.Next(1, 62);
string strABC1 = ABC.Substring(Convert.ToInt32(ABC1), 1);
string strABC2 = ABC.Substring(Convert.ToInt32(ABC2), 1);
string strABC3 = ABC.Substring(Convert.ToInt32(ABC3), 1);
string strABC4 = ABC.Substring(Convert.ToInt32(ABC4), 1);
string strABC5 = ABC.Substring(Convert.ToInt32(ABC5), 1);
string strABC6 = ABC.Substring(Convert.ToInt32(ABC6), 1);
string result = strABC1 + strABC2 + strABC3 + strABC4 + strABC5 + strABC6;
Session.Add("result", result);
Bitmap SecImage = new Bitmap(Server.MapPath("~/images/capcha-111.jpg"));
Graphics Grapimage = Graphics.FromImage(SecImage);
Grapimage.DrawString(result.ToString(), new Font("Tohoma",16, FontStyle.Strikeout), SystemBrushes.WindowText, new PointF());
SecImage.Save(Server.MapPath("~/images/security capcha-111.jpg")):عصبانی:;
Image1.ImageUrl = "~/images/security capcha-111.jpg";
از خط یکی مانده به آخر یعنی موقع save کردن ایراد میگیره؟