In this tutorial, we are going to see how to create an ASP.Net Core Web API project. We will develop a simple CRUD (Create Read Update Delete) operations API for Student object. Finally we will test the API using Postman tool (a tool to build, test and document APIs). ASP.Net Core framework follows a single and unified approach for building both MVC and Web API applications (because it share the common code base and the same HTTP pipeline). The plain pipeline (which ASP.Net Core provides) gives more control to developer to innovate through his own middleware’s (in fact MVC/Web API is a middleware too) and also a flexibility to include his own choice of 3rd party middleware’s to achieve the functionality.
I want to know how to stop Visual Studio automatically restoring nuget packages for newly created ASP.Net 5 project. also when project.json changes, VS will try to attempt to get the changed versions. How to stop it.
In this tutorial we are going to see how to run multiple ASP.Net Core projects using Dotnet CLI’s dotnet run command. Typically dotnet run command is used to run a specific .Net Core application from source code. But there might be scenarios where we want to run multiple applications simultaneously to complete the development of a particular business workflow. For example we might have one ASP.Net Core project for MVC and another for Web API (and MVC consuming Web API), in this scenario we have to run different command line interfaces (each specific to the project which is intended to run) with dotnet run commands. In the scope of this tutorial we are going to write a simple PowerShell script through which we will automate the entire process of running multiple ASP.Net Core Applications using dotnet run.
Dotnet Run command by default host the ASP.Net Core application at port 5000. As obviously we cannot host more than one application at 5000 port, we can easily change the default port to new one.
In this tutorial, we are going to see how we can configure our development environment with the latest Dotnet CLI bits (from Dev branches builds). We will also make sure to pull relevant project dependency bits from MyGet repositories. Developers and organizations tend to maintain stable builds at Nuget repositories where as MyGet is used for nightly Dev builds (in some case unstable versions). The main objective of this tutorial is to demonstrate the flexibility of open source ASP.Net Core (and .Net Core) platforms, through which any developer can get the latest bits of runtimes/frameworks/libraries and can experiment different solutions. Being open source, any developer can identify the defects in the latest bits, report to respective teams and can even suggest a possible fix through pull request (in GIT repository).
In Getting Started with ASP.Net Core 1 Application, we saw how to create a new ASP.Net Core 1 Application and run it. In this tutorial we are going to understand the Visual Studio Project structure. There are lot of changes to the Core Project structure when compared to traditional ASP.Net MVC4 Project. We will go by each folder and file to understand its relevance in the project context.
In this short tutorial, I am going to show on how to get started with ASP.Net Core Application. ASP.Net Core is a completely new, open source and cross platform framework from Microsoft. ASP.Net Core Applications primarily work with two different frameworks – .Net Core and .Net Framework. .Net Core is used to support multiple platforms like mac OS, Linux and Window, where as .Net framework supports only Windows. One more advantage of ASP.Net Core Application is that it can support both the before mentioned frameworks at the same time in same project (for other .Net Core Projects, there are other frameworks like .Net Standard).
In this article, I am going to show how to enable AzureWebsite diagnostic logs using PowerShell. An AzureWebsite supports both Web Server logs and custom application logs. We can identify IIS level request and response information using Web Server logs. Using custom application logs, we can write custom trace messages to track the code flow. We are also going to see how to retrieve these logs for a particular AzureWebsite using PowerShell.
In this jumpstart, I am going to show how to build and publish an ASP.Net MVC project created in Visual Studio IDE using MSBuild application (exe) and PowerShell. This approach would help us in automating local/server builds which involves multiple steps of complex targets.
In this short tutorial, I am going to narrate step by step process on how to create an AzureWebsite and publish a Visual Studio 2013 ASP.Net MVC Website using Microsoft Azure PowerShell. Even though we can perform the same operations from Azure Management Portal (and also through Visual Studio), we get more flexibility and control while automating deployment and maintenance tasks from PowerShell. One can create simple scripts which can perform end to end deployment activity (a deployment is not just deploying website, it usually involves creating Databases, Users etc.,).
In this jumpstart, I am going to show how to connect to a Azure Subscription from a remote machine using PowerShell. This approach is useful when we are trying to automate Azure related deployment and maintenance activities from remote machines.
In this short jumpstart, I am going to show how to get list of all AzureWebsites Cmdlets from latest Microsoft Azure PowerShell – May 2015 release. This jumpstart is the starting point of series of blog posts which will narrate different automation techniques involved around AzureWebsites. As the first step, we get list of AzureWebsites cmdlets and keep them as a reference.
JumpStart # 36– Access IIS Express Localhost URL outside development machine on any other Remote device within same Network
In this short Jumpstart, I am going to show on how to access IIS Express (Visual Studio Development Server) Localhost URL outside the development machine on any other device which is connected to the same network as of Development machine. This would help us in saving lot of time in testing the application on different devices with different form factors. We often use emulators to test the behavior of our application, though this approach would give prospective results, one cannot trust emulators with 100% confidence (take an example of File upload). If there was a way to directly access the application (without hosting it, directly from development server) on the remote devise of interest, we can test and be confident about application usage.
In most of the present day code development, Application Localization is being achieved using RESX files. As time progress, we might not be able to keep track of which key-value pairs of a RESX file are being consumed by the application and which are orphaned. At present, it is very difficult to remove the orphan entries through automation and most of us stick to manual clean up. There are some tools which are capable of cleaning RESX files, but they come with price tag. In this quick tutorial, I am going to show how to clean a resource file through regular C# code.
Being a tech geek, I always find different sources to educate myself with new technical trends. So far I found World Wide Web (blogs, columns, webcasts, podcasts etc.,) as the most preferable medium to maintain consistency in our daily learning activity. Having said that, one cannot find a proper learning path for a given technology very easily over internet. This gap in continuous learning is filled by reading books which suggests and exemplifies a proper learning path. “HDInsight Essentials” by Rajesh Nadipalli is a perfect example which falls in the afore mentioned category.
In this JumpStart I am going to show how to prevent closing of Visual Studio’s Node.js console window immediately after execution. When we create a blank Node.js Console application in Visual studio and run the application (either by clicking Start button or by pressing F5), app.js will execute and results will be printed, but the console will not wait by default for programmer to check results. This is the same default behavior as of C# console application, where we can by-pass it by using a simple Console.ReadLine() statement. But in Node.js project, we have other simple options which are discussed in this JumpStart.
In this JumpStart, I am going to show on how to prevent automatic scaffolding of a Model Property while using @Html.EditorFor extension in ASP.Net MVC.
Many times we might create a Model (what I was referring here is a typical ViewModel) which will have properties for internal usage of Controller/Business layer. That means they are not intended to display on UI. But when we use @Html.EditorFor, even those properties will be scaffold automatically and displayed on UI.
In this short tutorial, I am going to show how to publish TWO different Visual Studio Web Projects to a single AzureWebsite. At times we might required to separate architecturally our web components to multiple physical Visual Studio projects to address separation of code concerns. Even though we maintain them separately, we have to publish them (or host them) on a single website. I am going to demonstrate step by step process on how to publish multiple projects to a single AzureWebsite and make every web component work as expected.