Blog
Use PowerShell to Enable Azure Analysis Services Firewall
·315 words·2 mins
azure
analysis services
powershell
Last week, firewall support was added to Azure Analysis Service (https://azure.microsoft.com/en-us/blog/azure-analysis-services-adds-firewall-support/). The thing is that, at the time of writing, there is no AzureRM cmdlet available to Use PowerShell to Enable Azure Analysis Services Firewall
So, with the help of Resource Explorer I found which properties must be added to the service (resource) in order to enable the firewall:
.NET Core CLI and MSBUILD Cheat Sheet
·320 words·2 mins
dotnet
cheat sheet
This is a small .NET Core CLI and MSBUILD Cheat Sheet with the list of commands and settings I use almost on daily basis when working with .NET Core, the command line and Visual Studio Code.
Checks # Check installed CLI version: # dotnet --version Show available templates: # dotnet new Solutions # Create a solution with the name of current the folder: # dotnet new sln Create a solution with a specific name: # dotnet new sln --name [solution name] Add a project to a solution: # dotnet add sln [relative path to csproj file] Packages # Add package reference to the project in the current folder: # dotnet add package [package name] Remove a package reference from the project in the current folder: # dotnet remove package [package name] Add a specific package version reference to the project in the current folder: # dotnet add package [package name]-v [version] Restore packages: # dotnet restore Create a nuget package for the project in current folder: # dotnet pack Project Templates # Install a new project template: # dotnet new --install [dotnet template name] Remove a project template: # dotnet new --uninstall [dotnet template name] Run test defined in current folder project # dotnet test Builds # Build current’s folder solution or project # dotnet build Build current’s folder solution or project with release configuration # dotnet build -c Release Publish artifacts for current’s folder solution or project. # dotnet publish MSBUILD # To add a reference to a local assembly without nuget package, edit your csproj and add a Reference as shown in the following sample: # <code> <ItemGroup> <Reference Include="[Relative path to the Assembly dll file]" /> </ItemGroup> </code> Force a file to be copied to the output folder, edit your csproj and add a Content section as shown in the following sample: # <code> <ItemGroup> <Content Include="[name of the file]"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup> </code> Hope it helps!
Toggle Raspberry Pi GPIO Pins with ASP.NET Core 2.0
·298 words·2 mins
dotnet
aspnetcore
raspberry pi
Today I’ll show you how to Toggle Raspberry Pi GPIO Pins with ASP.NET Core 2.0.
First be aware of the following prerequisites:
.NET Core 2.0 SDK A Raspberry Pi 3 Running Raspbian Install linux dependencies: sudo apt-get install curl libunwind8 gettext Now let’s start:
Create a folder for your new project # Open a command prompt an run:
.NET Core, Code Analysis and StyleCop
·511 words·3 mins
dotnet
static analysis
So now that .NET Core and .NET Standard 2.0 have been released some of you may be migrating applications or even creating new ones with it. As you progress you are starting to worry about the quality of your code so what you want is to at least check your code against design and style guidelines don’t you?
Step by step: .Net Core and Azure Search
·813 words·4 mins
azure
dotnet
azure search
Step by step: .Net Core and Azure Search is small introduction on how to connect to Azure Search, create and delete indexes, models, add documents and perform basic queries.
Let’s go for it:
Create an Azure Search service # Create an Azure Search service in your Azure subscription, and get the Azure Search name and primary Read-Write key.
Read Azure Service Health Activity Logs with .NET Core
·520 words·3 mins
azure
dotnet
azure monitor
log analytics
This week there was a small outage within the Azure Data Lake Store service and as consequence I wondered how could I Read Azure Service Health Activity Logs with .NET Core.
Let’s go for it:
Create a folder for your new project # Open a command promt an run:
Create a Service Principal and write required parameters to a .azureauth file
·513 words·3 mins
azure
devops
azure active directory
powershell
This week I had to repeat the process of creating a Service Principal in order to use the Microsoft.Azure.Management.Fluent lib with .NET Core so I decided it was time to script the process. With the following script you can Create a Service Principal and write required parameters to a .azureauth file.
Run ASP.NET Core on OpenShift
·443 words·3 mins
dotnet
aspnetcore
docker
openshift
Today I’ll show you how to Run ASP.NET Core on OpenShift.
First be aware of the following prerequisites:
You’ll need a working Docker installation. If you are using Windows 10 you can get Docker for Windows here. Be sure to Disable TLS for 127.0.0.1:2375 for your Docker installation Be sure to set 172.30.0.0/16 as an Insecure Registry in your Docker installation Be sure to set 172.30.1.1:5000 as a Registry Mirror in your Docker installation You’ll need download the oc Client Tools Note: If you want to learn about OpenShift and what can you do with it, I recommend the free book: Openshift for Developers.
dotnet new templates for AWS Lambda and Raspberry Pi
·134 words·1 min
dotnet
aws
After reading the following articles:
How to create your own templates for dotnet new Custom Project Templates Using dotnet new and having a twitter conversation with Sayed-Ibrahim-Hashimi I decided it was a nice idea to create some templates based on the code of some of my posts.
So here are the results:
HDInsight: Scale Horizontally
·300 words·2 mins
azure
devops
hdinsight
powershell
HDInsight: Scale Horizontally with Scale-HDInsightClusterNodes.ps1 a PowerShell workflow that will help you automate the process of scaling your cluster.
The script receives 4 parameters:
ResourceGroupName: The name of the resource group where the cluster resides ClusterName: The name of your HDInsight cluster Nodes: The number of nodes you want for the cluster ConnectionName: The name of your automation connection account and requires the following PowerShell modules: AzureRM.Profile, AzureRM.HDInsight
Deploy your ASP.NET Core Web API to AWS Lambda
·832 words·4 mins
dotnet
aspnetcore
aws
serverless
Today I’ll show you how to Deploy your ASP.NET Core Web API to AWS Lambda.
First be aware of the following prerequisites:
You’ll need an AWS account: https://aws.amazon.com/ You’ll need AWS CLI installed: http://docs.aws.amazon.com/cli/latest/userguide/installing.html You’ll need your AWS security credentials Some basic knowledge on AWS Stacks, API Gateway, Lambda and Buckets Now let’s start:
Create a folder for your new project # Open a command promt an run
Step by step: .NET Core and Azure Cosmos DB
·444 words·3 mins
azure
dotnet
cosmos db
Step by step: .NET Core and Azure Cosmos DB is a short post on how to connect to Cosmos DB, save a document and then query to find it.
Let’s start:
Create a Cosmos DB account # Create a Cosmos DB account in your Azure subscription. Once created get the URI and the primary Read-write key from the Keys section.
Use PowerShell to Enable Logging for Azure RM Web Apps
·671 words·4 mins
azure
devops
powershell
Recently I client ask me to enable application and http logging for more than 20 AzureRM Web Apps. Furthermore the client wanted the logs to be stored in a Storage Account.
Issues started when I decided to Use PowerShell to Enable Logging for Azure RM Web Apps, because there is no equivalent to the ASM Enable-AzureWebsiteApplicationDiagnostic cmdlet for ARM resources.
Start with Elasticssearch, Kibana and ASP.NET Core
·398 words·2 mins
dotnet
aspnetcore
docker
elastic search
kibana
serilog
You want to Start with Elasticssearch, Kibana and ASP.NET Core and also want to do it fast? Let’s use Docker and find out how easy it can be:
Create a folder for your new project # Open a command prompt an run
Use Azure Media Services to Find Filler Words
·177 words·1 min
azure
azure media services
On April 22 I had the great opportunity to give a talk on Azure Functions in the Global Azure Bootcamp hosted in Madrid. I had a great time, but weeks later when the video was published I realised that I was using a filler word way to much through my presentation.
Step by step: Kafka Pub/Sub with Docker and .Net Core
·419 words·2 mins
dotnet
docker
kafka
Last week I attended to a Kafka workshop and this is my attempt to show you a simple Step by step: Kafka Pub/Sub with Docker and .Net Core tutorial.
Let’s start:
Create a folder for your new project # Open a command prompt an run
Step by step: Couchbase Lite with .Net Core
·327 words·2 mins
dotnet
couchbase
docker
Not long after writing Step by step: Couchbase with .Net Core I discovered Couchbase Lite, which is still in development, but it looks like a great solution for embedded NoSQL scenarios.
So let’s start with this simple: Step by step: Couchbase Lite with .Net Core tutorial.
Create a folder for your new project # Open a command prompt an run
Step by step: Couchbase with .Net Core
·289 words·2 mins
dotnet
couchbase
docker
This week I started to read an understand how Couchbase works and that’s the reason I decided to write: Step by step: Couchbase with .Net Core
Tip: I’ll be using Docker to install and run Couchbase
Now let’s start:
Create a folder for your new project # Open a command prompt an run
Raspberry Pi: Run ASP.NET Core on Startup
·195 words·1 min
dotnet
aspnetcore
powershell
raspberry pi
Last week I wrote: Step by step: Running ASP.NET Core on Raspberry Pi and didn’t have the time to write about running the application on startup.
After browsing for a while I found this great post: Windows IoT Core: Running a PowerShell Script on Startup which showed me the way!
As a prerequisite read and run the sample provided here: Step by step: Running ASP.NET Core on Raspberry Pi
Step by step: Running ASP.NET Core on Raspberry Pi
·428 words·3 mins
dotnet
aspnetcore
raspberry pi
After reading .NET Core on Raspberry Pi and successfully running a console application on Windows 10 IoT Core on my Raspberry Pi 3 I decided to write: Step by step: Running ASP.NET Core on Raspberry Pi.
First be aware of the following prerequisites:
Windows 10 IoT Core I’m running Insider Preview v.10.0.15058.0 .NET Core 2.0 SDK Now let’s start: