HttpWebRequest, its request stream, and sending data in chunks

I have recently been spending a great deal of time writing code that communicated with RESTful services (Microsoft’s Live Framework, in particular). Towards this end, I’m using the HttpWebRequest class to communicate and, for scalability and responsivenss, I want to perform my I/O operations asynchronously. This has caused me to look into the [Begin]GetRequestStream methods. At first it seemed quite odd to me that there would be a need to get the request stream asynchronously. Afterall, getting the stream just didn’t seem like an I/O operation to me. However, via experimentation, I did notice that acquiring the stream did cause some I/O operations. This led me to start some communication with people at Microsoft to really get to the bottom of what is happenning. The information they shared was certainly news to me and I have never seen it documented anywhere. And so now, I’d like to share this information with you too as I think it is very useful for anyone using the HttpWebRequest class to send request data.

There are basically 3 ways to make an HTTP request that contains a payload:

  1. If the payload is amll, you can call [Begin]GetRequestStream and it will immediately return a memory-backed stream that buffers the request payload. Then, when you call [Begin]GetResponse, the HttpWebRequest object calculates the ContentLength header based on how much data was written to the stream and then it initiates the I/O.
  2. If the payload is large (2GB, for example), then you shouldn’t cache the whole payload in memory before sending it. In this case, you’d set the ContentLength property explicitly to the payload size. Then when you calll [Begin]GetRequestStream, it now performs all of the I/O up to the point of sending the payload. You now write your payload to the stream which now sends its directly to the network (it does not get sent to an in-memory stream). When you call [Begin]GetResponse, it checks that the amount of data sent matches what you specified for the ContentLength property and does no additional I/O in order to start receiving the response.
  3. If the payload is potentially large, generated at runtime, and you don’t know the its size ahead of time then you set HttpWebRequest’s SendChunked property to true (and do not set the ContentLength property). When you call [Begin]GetRequestStream, all of the I/O is performed up to the point of sending the payload data (including a “Trasnsfer-Encoding: Chunked” header). You now write to the stream in chunks and these writes go directly to the network. When you close the stream, a special terminating chunk is sent to notify the server that the payload is done. When you call [Begin]GetResponse, no I/O is performed and you can start receiving the response.

I hope you find this as useful as I did. Now, I can make intelligent decisions about my payload data, its size, how to buffer it, how to set headers, and when I can perform I/O synchronously as opposed to asynchronously. I really feel empowered with this knowledge.

Atmosera Web Help Desk or WHD

In an effort to continue delivering more value to our customers, we implemented a web-based application built on the SolarWinds Web Help Desk software (https://www.solarwinds.com/help-desk-software). Our goal is to improve the ability for our customers to create tickets, view their status, and communicate more efficiently with our team. We are confident this will result in faster resolutions and clear communication.

  • Below you can find the following details About Atmosera Web Help Desk (WHD):
    • How Can I Get Access to Atmosera’s Web Help Desk?
    • How Many WHD User Accounts Can My Company Get?
    • Known Issues with Multiple Microsoft Logins
    • Can I Get More User Accounts If I Need Them?
    • How Can I Change Who Is an WHD User?
    • How Can I See All Tickets for my Company?
    • What Is a Super User?
    • Can I Still Open a Trouble Ticket by Sending an Email to support@atmosera.com?
    • What Will Happen to the Current Trouble Ticket System?
    • Can I Send Updates to a Distribution List?
  • Tutorials
    • Create a Ticket
    • Manage Tickets
    • Reset Your Office 365 Password
    • Forward Emails
    • Mobile Access Using an iPhone or Android device

How Can I Get Access to Atmosera’s Web Help Desk?

Web Help Desk (WHD) Users for each customer will receive login instructions via email when their account is created.

Access Portal

How Many WHD User Accounts Can My Company Get?

Contact your Customer Success Manager (CSM) to identify how many logins you will receive.

Atmosera’s policy is that these accounts are assigned to individuals who will receive login credentials.

If you have a third party vendor who needs to have access, additional seats will be required.

An 0ffice 365 mailbox account will be created for each Web Help Desk (WHD) User. The mailbox address will be [clientID]-[firstInitial][lastname]@atmosera-portal.com. (e.g. Craig Smith at company id 12345 would be 12345-csmith@atmosera-portal.com). The new Web Support System will send emails to this email address and will only accept emails from that address. You can configure this email address to forward to your normal address; however, email responses on tickets back into Web Support will need to come from the email address that we provide; otherwise they will be denied. You do have the option to just update your tickets via the WHD Portal also.

How Can I Get Access to Atmosera's Web Help Desk?

Web Help Desk (WHD) Users for each customer will receive login instructions via email when their account is created.
The portal can be accessed at https://websupport.atmosera.com/

How Many WHD User Accounts Can My Company Get?

Contact your Customer Success Manager (CSM) to identify how many logins you will receive.
Atmosera's policy is that these accounts are assigned to individuals who will receive login credentials.

If you have a third party vendor who needs to have access, additional seats will be required.

An 0ffice 365 mailbox account will be created for each Web Help Desk (WHD) User. The mailbox address will be [clientID]-[firstInitial][lastname]@atmosera-portal.com. (e.g. Craig Smith at company id 12345 would be 12345-csmith@atmosera-portal.com). The new Web Support System will send emails to this email address and will only accept emails from that address. You can configure this email address to forward to your normal address; however, email responses on tickets back into Web Support will need to come from the email address that we provide; otherwise they will be denied. You do have the option to just update your tickets via the WHD Portal also.

Known Issues with Multiple Microsoft Logins

The portal uses Microsoft credentials to log you in. If you use other Microsoft accounts such as Officer 365, you will likely need to log out before attempting to login to the portal. Some users are experiencing issues related to conflicts between multiple logins in issue. Logging out and restarting your browser will take care of any such conflicts.

Can I Get More User Accounts If I Need Them?

Yes, any authorized Web Help Desk (WHD) User can log into WHD and submit a ticket to have a new user created.
We need first name, last name, email, and phone number.
The process takes up to two (2) business days to complete.

How Can I Change Who Is an WHD User?

Existing Web Help Desk (WHD) Users can submit a request using WHD to remove WHD Users.
The process takes up to two (2) business days to complete.

How Can I See All Tickets for my Company?

By default, all Web Help Desk (WHD) Users are only able to see the tickets they created using their account.
Any WHD User can be promoted to Super User status which allows them to see all tickets for their company.
To enable Super Users, submit a ticket or contact your Customer Success Manager (CSM) and identify which WHD Users need to be promoted to Super User status.

What Is a Super User?

A Super User is granted rights to see all tickets for their company regardless of which WHD User created them.

Can I Still Open a Trouble Ticket by Sending an Email to support@atmosera.com?

Once a customer has been moved to Web Help Desk (WHD), users can only create tickets using the Portal.
Sending emails to support@atmosera.com will result in the sender receiving an auto-response pointing them to the Portal.

What Will Happen to the Current Trouble Ticket System?

The current system based on BMC Footprints will be retired shortly after the launch of the new WHD application.
We will maintain tickets already created ahead of the cut over and work them to resolution.
When WHD goes live, all new tickets will be generated and managed with the new application.

Can I Send Updates to a Distribution List?

Yes, Web Help Desk uses an Office 365 account to login WHD Users.
Office 365 accounts have the ability to forward all messages to another email address.
Follow the directions below to setup email forwarding using your Office 365 account.
This process makes it possible for Web Help Desk (WHD) Users to forward correspondence to another email and/or a distribution list.

 


Create a Ticket

Access the Atmosera WHD Portal: https://websupport.atmosera.com/

Click on the image to see a larger view

 


Manage Tickets

Access the Atmosera WHD Portal: https://websupport.atmosera.com/

Click on the image to see a larger view

 


Reset Your Office 365 Password

Access the Office 365 Portal: https://login.microsoftonline.com

Click on the image to see a larger view

 


Forward Emails

Access the Office 365 Mailbox Settings: https://www.office.com

Click on the image to see a larger view

 



Mobile Access Using a iPhone or Android Device

Access the Atmosera WHD Portal: https://websupport.atmosera.com/

Click on the image to see a larger view

We deliver solutions that accelerate the value of Azure.

Ready to experience the full power of Microsoft Azure?

Start Today

Blog Home

Stay Connected

Upcoming Events

All Events