Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to create virtual directory

I am working on a website which authenticates with Facebook, so that the user can sign in through his/her Facebook profile. I've seen similar questions like this one, but none that covers exactly my issue.

To test this Facebook authentication locally, I figured that some hacks were needed. You see, Facebook only allows redirects to certain domains after the authentication process. For these domains, localhost is not an option.

So I decided to do some research. I ended up changing my hosts file to point the domain local.fablelane.com to 127.0.0.1. However, now it complains when I try to change the virtual directory in Visual Studio 2012.

First, I see this dialog after changing it.

enter image description here

I then click Yes and end up with this dialog here.

enter image description here

What do you suggest I try? How can I change my virtual directory? It is important that I find a way to do this either programmatically, through changing a file somewhere, or through the commandline. The reason for this is that I intend to make an automatic setup program that does this for me in the future.

like image 662
Mathias Lykkegaard Lorenzen Avatar asked Oct 16 '12 14:10

Mathias Lykkegaard Lorenzen


2 Answers

You will need to uncheck Use IIS Express and also add your new name local.fablelane.com as a binding to IIS, so that when VS tries to open the site URL, the host-header matches the site.

Also, is there any reason you need a specific port, rather than the default? It should be fine with 80.

You haven't said which version of IIS you're using, but on 8, open IIS Admin, expand your machine-name, expand Sites, right-click on local.fablelane.com (or however you've named it), and select Edit bindings and add local.fablelane.com.

like image 183
nicodemus13 Avatar answered Sep 26 '22 00:09

nicodemus13


Try uncheck the option "Use IIS Express".

like image 21
emgozzi Avatar answered Sep 23 '22 00:09

emgozzi