Saturday, July 18, 2020

Connecting to IIS Express from an Android emulator

I've been struggling with this. While working on a proof of concept of an Android app connecting to an API running in my localhost, the Android app could not to IIS Express. At first, I thought it had to do with using a self-signed certificate. But even without SSL I still got a network error. This is how I fixed it:

1) First, the Android app should connect to the local ipv4 address, not localhost, not 127.0.0.1

2) Modify the file applicationhost.config as indicated here https://blogs.blackmarble.co.uk/rfennell/2012/11/06/using-iisexpress-for-addresses-other-than-localhost/, by replacing localhost with *

3) Restart IIS Express

And that's it!




Thursday, July 16, 2020

Installing yarn on Debian - No such file or directory: 'global'

This was happening while trying to install the ignite bowser demo app (https://github.com/infinitered/ignite).

The final solution was to run the following to fix the problem:

sudo apt remove cmdtest 

sudo apt install yarn

Which I found here (https://github.com/yarnpkg/yarn/issues/3708)

Wednesday, July 15, 2020

Accessing WSL files from Windows

I've been playing with WSL2 and accessing the Linux files is quite easy as indicated here https://superuser.com/questions/1110974/how-to-access-linux-ubuntu-files-from-windows-10-wsl. You only need to fire up File Explorer and type \\wsl$\Ubuntu\home\<<username>>

Of course, you need to replace <<username>> with your actual username.

Thursday, July 9, 2020

Copying files ignoring errors on Windows

When copying a directory between Linux and Windows a lot of errors might be thrown, so I like to use this command to silent and ignore the errors:

xcopy $SOURCE $DESTINATION /C /E /Q 

Wednesday, July 8, 2020

Talks 2 Code Conference

 Check out my talk for the magazine Software Guru. It's in Spanish though.


https://youtu.be/DyotAYEa5AU



Wednesday, July 1, 2020

WslRegisterDistribution failed with error: 0xffffffff

While setting up WSL2 I came across this error. This seems like a scary error "WslRegisterDistribution failed with error: 0xffffffff", but all it means is port 53 is taken. 

The solution for me was to run this in cmd:
netstat -aon | findstr ":53"

And then find the PID that was using port 53, go to the task manager and kill it.

I also stopped the Docker services just in case (in the Windows "Services" UI).