In this lab, I will create a notification system for orders, first I need to go to AWS and create a new queue is SQS management.
Now I must test to make sure the queue is actually working by sending a test message to it. I just called the message test.
Now I need to replace some code inside of the Checkout.aspx.cs file.
I had so many issues with this code… I made the changes and it just kept giving me errors on launch. after an hour of fault checking, it was because I had a time difference on my local PC compared to AWS. My time was out by an hour because of my dual Linx boot.
For this code to work I also had to add a few more using statements.
I know need to add credentials to my web.config file to link to AWS I did add these you are going to have to trust me. The next step would not work otherwise!
So I will now create a new order and once I confirm it, it should appear in my queue.
Now I have brought my T-Rex lets see the order. It’s there!
I now need a new application that can pull the orders, auto polls and add’s to the database, called OrderProcessor Program.cs
I have now added the Order program file into my solution.
I now need to edit the program.cs code to link to my queue.
I now need to edit the app.config file
I now needed to set up the order processing to be on startup
and untick “sign the ClickOnce Manifests
So I tried to run it and nothing would work, It could not see my AWS packages… I tried adding them via using with no luck. So lucky I made a backup I reloaded that.
Now following the guide “Add the folder to the code” is easier than said. I found that if I add an item then look for the program file and click that It loads the program into the solution.
After re-adding the above it still would not run, I was having credential errors with MySql, so I checked over everything and decided to just copy lines from the other files that I knew worked and put it here. (AWS Key and Database Link)
Now it works!
Note: A lot of the issues I encounter a code side…. I am learning it as I go but having a good understanding of C# and the IDE would make it easier.