When rendering output from a razor template it is important to remember the distinction between @{ ...} and @(...) Curly braces will cause the output to execute, whilst the regular parenthesis will cause the output to render. As an example that tripped me up during rendering of a ViewComponent in the CamperFinder demo, the following... Continue Reading →
Free website hosting #4 – AWS
This is the final part of a four part series looking at free hosting from modern cloud providers: Part 1 - GitHub PagesPart 2 - Azure Web AppPart 3 - Firebase In this article we look at the offering from Amazon web services, and the static hosting capabilities of the S3 storage bucket. If this... Continue Reading →
Free website hosting #2 – Azure Web Apps
In the second part of this series we take a look at the first free web hosting option in Azure - Wep Apps. Part 1 - GitHub Pages Azure comes with a free hosting tier. This is limited to 1GB and on shared infrastructure, so won't suit a website needing high performance, however for free... Continue Reading →
Free website hosting #1 – GitHub Pages
There are a number of ways to get free website hosting in a no-nonsense, no adverts way. In this series of posts I'm going to take a look at a few. I'm only considering systems that can offer hosting for static websites. No server side programming languages (PHP, Python or ASP.NET), just HTML, CSS and... Continue Reading →
Working around Selenium
After you've used selenium for a while, you'll be familiar with some of the problems. Yep, WaitForElement doesn't exactly cover itself in glory. It is possible to work round this a bit using a static helper for retries. Something like this; public static void MyNavigateMethod(this IWebDriver driver, int retryCounter = 0) { try { driver.DoSomething();... Continue Reading →
Collect performance data from remote servers
To collect performance data from remote servers, when running a load test for example, use the following PowerShell script: clear$testId = "doodle"$durationSeconds = 20$threadsPerAgent = 5$client = ""$counterList = @( ".NET CLR Exceptions()# of Exceps Thrown / sec", ".NET CLR Memory()# Total committed Bytes", "\ASP.NET\Application Restarts", "\ASP.NET\Request Wait Time", "\ASP.NET\Requests Queued", "\ASP.NET Applications()\Requests/Sec", "\Web Service()\Current... Continue Reading →
Goldilocks and the 3 reseller packages
Goldilocks was walking through the wood one winters day when she came across a house with three computers. (Yes there was also fibre broadband installed - it's a tech savvy wood - get over it!) The first computer was connected to Fasthosts. A solid offering she thought, back by over a decade of experience. But... Continue Reading →
Arduino Uno 101: Using the SparkFun Inventor’s Kit (UK)
I’m an experienced programmer, but have only ever touched on electronics during A-levels and my degree course. New developer boards Arduino open up the world of micro-electronics to those with little or no experience. This is the start of my adventure: The kit I brought was the SparkFun Inventor's Kit for Arduino with Retail Case... Continue Reading →
Extract URL Information
To get information about the currently requested URL in ASP.NET use the Request.Url class. For example to extract the information from the URL http://www.example.com/myApp/myPage.aspx?myQs=14 the Request.Url class provides the following properties:
Entity Framework: StoreGeneratedPattern="Computed"
We recently had a problem where our fields with default values where not getting properly populated in the database during row creation. This can occur when the EDMX model is created in the designer and the default fields do not have their StoreGeneratedPattern property set to Computed or Identity. Easy enough to fix, simply open... Continue Reading →