Showing posts with label Genexus Server. Show all posts
Showing posts with label Genexus Server. Show all posts

Saturday, November 29, 2014

Deploy to Azure button, WOW!

Deploy to Azure Button

Every now and then some technology, technique, product or whatever comes along that makes you open your eyes wide open and drop your jaw.

A few days ago Microsoft released the Deploy to Azure button, you can read the original post here, but TL;DR it’s a button you put in the README.md file of your GitHub repository and it would “automagically” deploy your repository to an Azure Web Site.

At first I thought, cool, but I’m sure there’s something they’re not telling you, like what’s the structure I need to have in my repository? do I also need to add my binaries, will they build my solution and deploy the assemblies?

So today I gave it a try. I do have a repository on GitHub which output also run on an Azure WebSite so I thought this would be the perfect test. The project is Azure Storage Explorer, and if you take a look the structure of the repository looks it is just a solution file (.sln) with two folders that are a web site project and a helper library.

github

So I added the button to my README.md file which in my case that meant adding this line to the file:

[![Deploy to Azure](http://azuredeploy.net/deploybutton.png)](https://azuredeploy.net/?repository=https://github.com/sebagomez/azurestorageexplorer)

And that’s it. After I pushed it to GitHub I clicked on the button and this site called azuredeploy.net showed up telling me that my repository was going to published to an Azure Web Site. It let me pick a few config settings like the name of the web site AND THAT WAS IT!

What happened in between? I don’t know, I guess something cloned my repo, found and .sln file and built the solution and then moved everything (?) to a web site? I don’t know what they did, I’m just glad it worked the way it did. I’m not saying it is rocket science, it’s just that it’s nice when you find such a simple solution for a much complicated task to do manually.

Kudos to whoever thought having that button was a good idea!

p.s: I wish we had something like that in Genexus Server. I guess we could…

Read Full Post

Monday, March 12, 2012

Colored log4net log files in Notepad++

Some time ago, I can’t tell exactly when, I discovered Notepad++ (NPP). NPP is a great light weight text editor with tons of cool features.
I’m also a big fun of log4Net since I discovered when I added the logging features to Genexus and GXserver. It is so easy to implement and helpful that I have used it in every project I worked ever since.
So in my daily basis I get to work with log4net log files a lot. I was doing so last Saturday when it hit me, “I need syntax coloring for this”.
So I looked up and found a great post from Jon Galloway that explains how you can create your own “User Defined Language” in NPP. To my surprise it was pretty simple since NPP has a dialog to do so, I thought I’d have to some xml editing. The dialog does that for you and what’s even better you can see the results of what you’re changing while you’re doing it. 
notepadlog4net
The result is (to me) pretty cool. It’s now a lot easier to find the ERROR or WARN lines.
I also added a couple of features that basically are a better way to focus on what’s important.
Numbers are in yellow, single quoted strings are in red, each keyword (INFO, DEBUG, ERROR, WARN, FATAL) has its own color, plus I also added “comments”. By using the good old // to comment a line or /* to comment a block */, you can help you and others to pay attention to what really matters, or at least what you think matters.
So, how do you get this?
Simple way: If you have never defined of modified a User defined Language, you can simply download the posted file and override your existent in %APPDATA%\Notepad++ (Make sure you backup your file first)
“Harder” way: if you have modified of added a user defined language, you probably know what to do but anyways, download the file (same from above) open it in your favorite text editor ;) and copy the UserLang tag with its content and copy it to your current userDefineLang.xml file.

**We moved to GitHub! Download the file from: https://github.com/sebagomez/log4net-for-notepadpp

As usual, this is 100% “works on my machine” certified.works-on-my-machine]

Read Full Post

Tuesday, October 27, 2009

Internal Error 500 returned by IIS7 hosted WCF services

500 Here's an issue I had for quite a long time.
For some (unknown at the time) reason the server was returning a "500 - Internal Server error" whenever an exception was thrown.
Even the message on the exception was an html document (pasted below), so who was modifying my exceptions? it turned out to be the IIS itself due to some configuration settings.
There's a "feature" which avoids the IIS to send the real exception to the client sending instead a more "friendly" one.
So, how do you change that? (keep in mind this is IIS 7.0 and above)
Take a look at this great post (where I got the solution from) and follow step 2) of "Enable IIS7 detailed errors".

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<
title>500 - Internal server error.</title>
<
style type="text/css">
<!--
body
{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</
head>
<
body>
<
div id="header"><h1>Server Error</h1></div>
<
div id="content">
<
div class="content-container"><fieldset>
<
h2>500 - Internal server error.</h2>
<
h3>There is a problem with the resource you are looking for, and it cannot be displayed.</h3>
</
fieldset></div>
</
div>
</
body>
</
html>

Read Full Post

Thursday, September 24, 2009

Great simple explanation on Windows Azure

During the last GeneXus International Meeting held in Montevideo, I had the chance to talk for a few minutes with Steve Marx from the Windows Azure team. Milano and I were telling him what we expect to do with GeneXus and the Windows Azure platform.

The first scenario is having a one-click deployment to the cloud (Windows Azure platform) of the GeneXus generated applications. Since the SQL Azure is now a relational database (good old SQL Server) our reorganization programs can generate the tables in the cloud. Also, our applications are 100% compatible with the Azure environment so you could upload you application to the Azure platform today.

The other scenario is running GeneXus Server from the Azure platform. In this scenario we still have a “little” work to do. So we were asking Steve about the worker roles since we want to be able to specify and generate in the Azure platform and I have doubts about what could actually run in this “cloud”, so Steve explained it to me in a great simple way. He said, imagine I have a Windows Server 2008 installed out of the box with the .net framework 3.5 and all the latest service packs. Everything you could put on a portable USB drive and run from there will run on the Azure platform. He added, everything that needs a setup wizard, writing on the registry, and stuff won’t work.

As I said, great yet simple explanation of what you could run on the Azure platform.

Read Full Post