Make IIS Express works with http://127.0.0.1

I never notice that IIS Express doesn’t listen to web requests other than localhost. So, to my surprise, when I try http://127.0.0.1, I got HTTP 400, Bad Request instead.

 

127.0.0.1-Error

 

Change 127.0.0.1 to localhost and everything is fine.

localhost

 

Anyway, you can set your IIS Express to let it listen to a request for 127.0.0.1 easily.

1. Look for a file applicationhost.config. It’d be under /documents/IISExpress/config.

2. Go to <sites> section and look for your site. In this example, I have my web project named MyWeb.

iis-express-setting-before

3. Change localhost to 127.0.0.1

iis-express-setting-after

4. Stop IIS Express and run your web site again.

exit-iis-express

 

Now you should be able to access your web site thru 127.0.0.1 address now!

127.0.0.1-work

 

Hope this helps! 🙂

Could not run the “GenerateResource” task because MSBuild could not create or connect to a task host with runtime “CLR2” and architecture “x86”.

Since I have experienced the same error more than three times while creating Windows Service (.NET 3.5) on Visual Studio 2012 and/or 2013, I think I should post a solution here for my quick reference. If you create a Windows Service and target .NET 3.5 on Visual Studio 2012 or 2013, you might experience the error message while compiling the project.

Here is the full error message:

Could not run the “GenerateResource” task because MSBuild could not create or connect to a task host with runtime “CLR2” and architecture “x86”. Please ensure that (1) the requested runtime and/or architecture are available on the machine, and (2) that the required executable “C:\Program Files (x86)\MSBuild\12.0\bin\MSBuildTaskHost.exe” exists and can be run.

To resolve it, go to your csproj file and add the following line under the default property group:

<PropertyGroup>

      <DisableOutOfProcTaskHost>true</DisableOutOfProcTaskHost>
</PropertyGroup>

And that should resolve the issue, everything should be compiled.

 

Payload contains two or more files with the same destination path

I was trying to debug why I can’t set the SmallLogoUri and HeaderBackground for Callisto SettingsFlyout with Caliburn.Micro (For more detail, please see my last post, WinRT Settings with Caliburn.Micro).

So I download the Caliburn.Micro from codeplex , add required projects (i.e., Caliburn.Micro.WinRT and Caliburn.Micro.WinRT.Extensions) to my solutions.

image

When I tried to build the solution, I got the error.

Error    1    Payload contains two or more files with the same destination path ‘Windows.UI.Interactivity.dll’. Source files:
C:\Users\Karlkim\documents\visual studio 2012\Projects\CaliburnSettings\packages\Windows.UI.Interactivity.1.1.0.0\lib\win\Windows.UI.Interactivity.dll
C:\Users\Karlkim\Downloads\caliburnmicro-ae25b519bf1e46a506c85395f04aaffb654c0a08\src\packages\Windows.UI.Interactivity.1.1.0.0\lib\win\Windows.UI.Interactivity.dll    CaliburnSettings

To resolve the issue, just change the “Copy Local” property of Windows.UI.Interactivity in the WinRT project () to False.

image

And you should be able to build the solution successfully now!