Categories
Computing

Using Postman locally with Visual Studio to debug during Development

Postman is pretty handy for viewing the return values of POSTs, but also for debugging during the early phases of development. In my case, I was trying to POST to my Alexa app. developer.amazon.com was reporting a 500 error, but nothing beyond that. This was in the early stages where I had not yet created any sort of logging or error handling in my Alexa API.

Determining the error was best left to localhost where I could debug right in Visual Studio.

Setting things up is a breeze.


Begin by launching the app directly from Visual Studio in a browser.

In Postman, set the type to POST; enter your local URL.

postman_visual_studio_001

Click on the Params button to the right of the URL. Click the Body tab; change the type in the dropdown to JSON (application/json) or your preferred type. Paste in your payload as raw. Click Send.

postman_visual_studio_002

Assuming an error has occurred, Visual Studio will respond to the request and display the error inline.

postman_visual_studio_003

Featured Photo by Tim Evans on Unsplash

 

 

 

Categories
Computing

Simple Deployment to AWS from Visual Studio

I was looking for a simple way to deploy files from a machine running Visual Studio to an EC2 instance hosting IIS. My goal was to code-deploy-test / code-deploy-test into AWS. Simple was good.

Several options presented themselves including SFTP and CodeDeploy, but I happened across an option that really suited my needs for the moment.

The following assumes that you’ve installed the AWS Toolkit for Visual Studio available here. You’ll know that it’s installed because in Visual Studio, the View menu has AWS Explorer option.

In AWS Explorer, expand the Amazon EC2 node and then double-click on Instances. You’ll see a window complete with your running instances. Right-click on the desired instance and choose Open Remote Desktop from the context menu. Note the Map local drives on remote desktop checkbox. Make certain that’s checked and continue to log on.

aws_visual_studio_ec2_instance

In my particular case, I named the machine that launches Remote Desktop quite distinctively. When I RDP into the EC2 instance and launch Windows Explorer, I see the following and can traverse the directory structure on “Wyoming”.

rdp_machine_shared_drive

On the EC2 instance, I happen to be running my favorite deployment tool, Beyond Compare, available from Scooter Software. From there I can use my favorite “Compare Contents…” to determine what’s changed and what needs to be deployed.

beyond_compare_02

While not the optimal solution for a multi-server environment, it is a very easy-to-implement solution for a development environment where the goal is code-deploy-test, rinse, repeat.

Enjoy!

 

 

 

 

 

 

 

Categories
Computing

Pointing a Route 53 Domain to an EC2 Instance

In the AWS Console, log into Route 53 and navigate to Hosted zones.


Section I: Create a Record Set for the EC2 Instance

  1. Click on the Create Record Set button at the top of the page.
  2. In the Name field, add “www”.
  3. In the Value field, add the IP address of your EC2 instance. (Note that this is available on the Description tab when the EC2 instance is selected. The field is Public IP.)
  4. Click Create.

Section II: Create a Record Set as the Alias

  1. Click on the Create Record Set button at the top of the page.
  2. In the Name field, add “www”.
  3. Change the value of Alias to Yes.
  4. In the Alias Target field, set the value to the value from step 2 in Section I.
  5. Click Create.