when i run your code for asp.net web application it is throwing an "Unable to connect remote server" exception please provide me the solution. I am running your sample code into v.s 2010 web application but it is throwing an error. the error into given below code segment:-

protected static void FillRequestWithContent(HttpWebRequest request, string contentPath)
    {
        try
        {
            using (BinaryReader reader = new BinaryReader(File.OpenRead(contentPath)))
            {
                request.ContentLength = reader.BaseStream.Length;
                using (Stream stream = request.GetRequestStream())
                {
                    byte[] buffer = new byte[reader.BaseStream.Length];
                    while (true)
                    {
                        int bytesRead = reader.Read(buffer, 0, buffer.Length);
                        if (bytesRead == 0)
                        {
                            break;
                        }
                        stream.Write(buffer, 0, bytesRead);
                    }
                }
            }
        }
        catch (Exception ex)
        {

        }
    }

asked 29 Mar '13, 16:18

sourabh's gravatar image

sourabh
112

edited 29 Mar '13, 16:23

Have you properly set up the application id and password?

(30 Mar '13, 11:51) Dmitry Me ♦♦
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×7

Asked: 29 Mar '13, 16:18

Seen: 966 times

Last updated: 30 Mar '13, 11:51

© 2016 ABBYY. All rights Reserved. www.ABBYY.com | Privacy Policy | Legal