Monday, July 14, 2014

Self Hosted Web API application Domain Registration

I recently build a self hosted Web API windows service.  The goal of the application was to receive HTTP Posts from a Asp.Net website and process long running processes.

The self hosted Web API worked really well.  We were able to post the information from the website and process the request.  In just a few hours I had off loaded work from my website to my application server.

However, once I deployed the self hosted windows service to my app server it would not run.

I had the correct URL and port on both the website and the application.

After doing some research I found that you need to register you domain with windows, or your request will be blocked.

Below is the syntax to register you url from the command line in windows

netsh http add urlacl url=http://+:9000/ user="Users"

Make sure you specify the correct port and user

Friday, July 11, 2014

TFS Build - Deploying an MVC Web Site Project with mixed platforms x86 - x64

The Problem
Recently I was working on a project that had mixed platforms (x86 and x64) assemblies. The project would build locally in visual studio 2013, but not on the TFS build server
I was building the project as Any CPU in the project configuration.

The Fix
Set the MSBuild Platform settings to X86 from Auto.


The Configuration
Visual Studio 2013
MVC 5 Web Application
TFS 2010 / TFS Build Server
Windows 2008 / IIS 7 web deployment

I hope this helps someone else out in the future, it took be a good part of a morning to figure this one out.

Wednesday, July 2, 2014

Translation in visual studio

I was working on a recent project where the code was written in English, but the comments were in Chinese. I do not know the Chinese language, but wanted to see the comments.

Installing the translator http://visualstudiogallery.msdn.microsoft.com/f2321406-c5bb-42b7-9660-dfacd313eeed/view/Reviews extension to visual studio 2013 I was able to read the comments.

It worked great, translated flawlessly.