Saturday, February 16, 2013

Windows Azure: Accessing Your SharePoint VM from a Local Browser

If you have created a Virtual Machine in Windows Azure for SharePoint and would like to be able to access the SharePoint site from your local browser instead of on the server itself via remote desktop, just follow these simple easy steps to make it happen.

First navigate to your Windows Azure management portal and select the Virtual Machines:
 
Select the SharePoint VM top open up the Dashboard. Click the ENDPOINTS link:

 
At the bottom of the Endpoints screen, click on ADD ENDPOINT. The Add Endpoint dialog appears.

 
Click the Next arrow on the the first page of the dialog wizard:

 
Enter a name and 80 for the ports. Click the Complete Check button:
 


 
The VM is updated with the endpoint which takes about 30-60 seconds:



 

 
When the update is complete, a green check mark appears next to the name. When this happens, click on the DASHBOARD link to return to the VM dashboard:
 
 


Back on the VM dashboard page, locate and copy the public virtual IP address located on the right hand side of the page under the quick glance section:
 
Using Windows Explorer on your local machine, navigate to C:\Windows\System32\drivers\etc. Locate the Hosts file and double click to open. Open with Notepad.


 
Inside the hosts file, paste the IP address and add the host name. The host name could be the server name, a host header name, and/or your SharePoint root URL. 
 
 
Open a browser on the local machine and enter http://hostname. When prompted enter your SharePoint VM credentials (don't forget the domain name). Your browser should render your SharePoint VM root site collection accordingly:


 

12 comments:

  1. Thanks Steve. But do we able to access the site collection created in Azure VM? for eg. I can access http://azurevmname but not http://azurevmname/sites/test. This is a PowerPivot site created. Thanks in advance for your reply. Regards,
    Ganesh

    ReplyDelete
    Replies
    1. You should be able to browse to that site. What error are you getting?

      Delete
    2. I get a 404 when I try to do this unless I update the hosts file. And I can't seem to set up an endpoint to a second web app that doesn't use 80.

      Delete
    3. What does your host file look like? I believe I had the same endpoint issue and it may be a limitation of the ports that they allow. It has been almost a year since I have played with this.

      Delete
    4. check out the steps mentioned in this blog to overcome this limitation in the form of anonymous access http://sanganakauthority.blogspot.de/2011/04/windows-azure-accessing-sharepoint.html

      Delete
  2. Great steps, but I need something else: I am running Project Server in an Azure Demo machine which does not have a domain; I tried to log using the name of the machine and the user, and still cannot get it (e.g. machine\user)

    Besides that, what about "everyone´s" access (outside visitors with no passwords)? How to set this up?

    Thank you,

    ReplyDelete
    Replies
    1. I am not sure if you can access it without a domain unless you allow anonymous access. There needs to be an authentication authority.

      Delete
  3. Thanks this is work for me... !!!

    ReplyDelete
  4. Hi, please why i can´t browse my SharePoint 2013 Site in Azure from my Windows Phone Emulator or my cell pone. I can browse without errors in my local browser. Thanks.

    ReplyDelete
    Replies
    1. Try http:// where the ip is the address of your VM.

      Delete
  5. Hi, Steve
    Thanks for the post, but it didnt fix my issue, I got the pop up credential box, after I typed in the login and password, this is what I got:
    HTTP/1.1 200 OK
    Server: Microsoft-IIS/8.0
    Date: Wed, 04 Jun 2014 14:27:04 GMT
    Connection: close
    So I tried to Ping the Internet IP address for the site, it s timeout. no response at all. but the site runs perfectly fine under Azure VM with remote desktop.
    Any ideas? appreciate your help.
    Linda

    ReplyDelete
    Replies
    1. After you update the hosts file you should close all of your browser sessions and start fresh. Not sure why you can't ping the address.

      Delete

Matched Content