i want to create a web page in c# in which user uploads an image and get text of image in another textbox on same web page. i used Tessract tutorials for it but it is for windows form application but i want to use it on web page. i Have followed instruction of this link...

http://automatedrevolution.com/blog/?p=34

i used code in my Web Page but it local server stops on specific line. My code is Here:-

System.Drawing.Bitmap imageX = new System.Drawing.Bitmap(FileUpload1.PostedFile.InputStream);
System.Drawing.Bitmap image = AForge.Imaging.Image.Clone(imageX, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
tessnet2.Tesseract ocr = new tessnet2.Tesseract();
ocr.Init(null, "eng", false);
List<tessnet2.Word> result = ocr.DoOCR(image, Rectangle.Empty);

foreach (tessnet2.Word word in result)
{
    TextBox1.Text = TextBox1.Text + word.Text + Environment.NewLine;
} 

My code stops on 4th line. Can Anybody tell me what is the problem. I Pasted tessdata folder into Bin directory.

有帮助吗?

解决方案

The problem is that you need Full Trust on server to put it to work, because your application will execute a dos program (.exe extension). Anyway, fulltrust is not applicable because it lacks security. I'm trying to implement Partial Trust, but without luck.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top