Tugberk Ugurlu's Blog, page 7

April 12, 2015

How Azure Web Apps Hosts an ASP.NET 5 Application

I want to write this quick post because figuring out how an ASP.NET 5 application is hosted under Azure Web Apps was a big question for me. Some information is already there on this topic but the concept wasn’t crystal clear because when you look at the packed version of an ASP.NET 5 web application, it has the following structure on disk:

image

It will even get more interesting when you look inside the wwwroot folder:

image

We have the static files, bin folder which only contains AspNet.Loader.dll ins...

1 like ·   •  0 comments  •  flag
Share on Twitter
Published on April 12, 2015 23:27

April 7, 2015

How to Use Octopus Deploy Step Templates for SQL Release

SQL Release, a set of PowerShell cmdlets from Redgate which automate deploying changes to your production databases, went out of beta and became part of DLM Automation Suite a few days ago. As part of this release, Octopus Deploy step templates for SQL Release are also included inside the suite and in this post, I will go through how you can use these step templates to make the Octopus Deploy Integration of SQL Release easier by going through one of the deployment flows (the recommended one)....

1 like ·   •  2 comments  •  flag
Share on Twitter
Published on April 07, 2015 12:29

April 4, 2015

Compiling C# Code Into Memory and Executing It with Roslyn

For the last couple of days, I have been looking into how to get Razor view engine running outside ASP.NET 5 MVC. It was fairly straight forward but there are a few bits and pieces that you need to stitch together which can be challenging. I will get Razor part in a later post and in this post, I would like to show how to compile a piece of C# code into memory and execute it with Roslyn, which was one of the parts of getting Razor to work outside ASP.NET MVC.

First thing is to install C# code...

 •  0 comments  •  flag
Share on Twitter
Published on April 04, 2015 11:25

March 8, 2015

Resistance Against London Tube Map Commit History (a.k.a. Git Merge Hell)

If you have ever been to London, you probably know how complicated London tube map looks like :)

2014-12-17 20.23.39

There is no way for me to understand this unless I look at it for 100 times (and it was actually the reality).

Most of the Git repository commit histories I look at nowadays are not much different from this map. For example, I cloned the original Git source code and wanted to look at its commit history. I wish I didn’t do that as my eyes hurt really bad:

Screenshot 2015-03-07 12.24.31

This is the view of gitk but it doesn’t...

 •  0 comments  •  flag
Share on Twitter
Published on March 08, 2015 19:56

February 14, 2015

Software Applications Should Work Like Restaurants

I went to a restaurant today and one particular thing struck me there. It made me really interested in writing this brain dump blog post. It was about the fact that restaurants and software applications have a lot in common in terms of how they (should) function. One common characteristic I know is coming from very clever and kind Steve Sanderson on his talk on asynchronous web applications and I won’t go into details on that. I would like to focus on the other common functional characteristi...

 •  0 comments  •  flag
Share on Twitter
Published on February 14, 2015 23:13

November 20, 2014

Dependency Injection: Inject Your Dependencies, Period!

There is a discussion going on inside ASP.NET/Logging repository whether we should have static Logger available everywhere or not. I am quite against it and I stated why with a few comments there but hopefully with this post, I will try to address why I think the dependency injection path is better for most of the cases.

Let’s take an example and explain it further based on that.

public class FooManager : IFooManager
{
private readonly IClock _clock;
private readonly ILogger _logger;
private...
 •  0 comments  •  flag
Share on Twitter
Published on November 20, 2014 10:34

November 16, 2014

Using "Ctrl+Enter, Enter" Instead of "Ctrl+., Enter" for C# Quick Actions on Visual Studio 2015 Preview

Visual Studio 2015 preview went public yesterday and we can enjoy the new Roslyn based code editor for C# and Visual Basic :) You can learn more about these new cool things about the code editor on Visual Studio blog.

One of the new features is something ReSharper user are very familiar with: quick actions. Sometimes inside the editor, you will see a yellow lamp popping up:

Screenshot 2014-11-13 22.14.49

This indicates that there are possible actions that you can take on this piece of code. You can bring up these actions...

 •  0 comments  •  flag
Share on Twitter
Published on November 16, 2014 00:23

November 11, 2014

Exciting Things About ASP.NET vNext Series: Middlewares and Per Request Dependency Injection

Web development experience with .NET has never seen a drastic change like this since its birth day. Yes, I’m talking about ASP.NET vNext :) I have been putting my toes into this water for a while now and a few weeks ago, I started a new blog post series about ASP.NET vNext. To be more specific, I’m planning on writing about the things I am actually excited about this new cloud optimized (TM) runtime. Those things could be anything which will come from ASP.NET GitHub account: things I like abo...

 •  0 comments  •  flag
Share on Twitter
Published on November 11, 2014 13:39

November 4, 2014

Getting the Client’s IP Address in ASP.NET vNext Web Applications

I was wondering about how to get client’s IP address inside an ASP.NET vNext web application. It’s a little tricky than it should be but I finally figured it out. So, I decided to write it down here so that anyone else can see how it’s done right now.

BIG ASS CAUTION! At the time of this writing, I am using KRE 1.0.0-beta2-10648 version. As things are moving really fast in this new world, it’s very likely that the things explained here will have been changed as you read this post. So, be awa...

 •  0 comments  •  flag
Share on Twitter
Published on November 04, 2014 16:40

October 19, 2014

MSP Turkey Kickoff 2014 ASP.NET Web API and SignalR Presentation Slides, Recording and Links

I was at Microsoft Turkey office yesterday and I gave a presentation on ASP.NET Web API and SignalR in context of this year’s MSP Kickoff. You can find the slides of the talk on Speakerdeck.

The talk was in Turkish and I manage to record it myself. The sound is not perfect but it was the best I was able to do :)

ASP.NET Web API and SignalR from Tugberk Ugurlu on Vimeo.

During the talk, I referred to a few resources about SignalR and ASP.NET Web API. I tried to put all of those here:

ASP.NET W...

 •  0 comments  •  flag
Share on Twitter
Published on October 19, 2014 23:29