Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5957983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:28:42+00:00 2026-05-22T18:28:42+00:00

In my windows mobile application i am trying to write a video file with

  • 0

In my windows mobile application i am trying to write a video file with boundaries.
If i place the boundaries i am receiving protocol exception but if i am not using any boundary it works fine.

Below is my code

Stream requestStream = request.GetRequestStream();
        byte[] boundaryData = System.Text.Encoding.ASCII.GetBytes(twoHyphens+boundary+lineEnd);
        byte[] boundaryData1 = System.Text.Encoding.ASCII.GetBytes(twoHyphens + boundary + twoHyphens + lineEnd );

        String headertemp = "Content-Disposition: form-data; name=\"uploadedfile\";filename=\""+ GetCamera.videoFilePath+ "\""+ lineEnd;
        byte[] headerData = System.Text.Encoding.ASCII.GetBytes(headertemp);
        byte[] lineend = System.Text.Encoding.ASCII.GetBytes(lineEnd);

        requestStream.Write(boundaryData, 0, boundaryData.Length);
        requestStream.Write(headerData, 0, headerData.Length);
        requestStream.Write(lineend, 0, lineend.Length);
        using (Stream video = File.OpenRead(GetCamera.videoFilePath))
        {
            byte[] buffer = new byte[1024];

            while ((bytesRead = video.Read(buffer, 0, buffer.Length)) > 0)
            {
                requestStream.Write(buffer, 0, bytesRead);
            }
        }
        requestStream.Write(lineend, 0, lineend.Length);
        requestStream.Write(boundaryData1, 0, boundaryData.Length);
        requestStream.Close();
        requestStream.Dispose();

Please help me to solve this issue.

Please forward your valuable suggestions.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T18:28:43+00:00Added an answer on May 22, 2026 at 6:28 pm

    I donot know the reason but when i increased the value for content length property,it worked fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to write a simple application that runs on a Windows Mobile
I'm trying to write a full screen application for Windows CE 5.0. I'm using
I am trying to develop an application for a Windows Mobile PDA , but
I'm trying to test a mobile website I'm building using Windows Phone 7, but
I am trying to convert a windows forms application to a windows mobile application
I am trying to run a simple SQLITE application on Windows Mobile developed with
I am trying to develop a Windows Mobile 6 (in WF/C#) application. There is
I'm trying to debug and test my application with a Dell Windows Mobile device
I am trying to make a windows mobile application and for some reason the
I've got a CAB file with the Windows Mobile application and the MSI package

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.