Skip to main content

Configure DMZ for SharePoint provider hosted apps (accessing web site from internet).

If you are developing apps provider hosted apps for SharePoint (or Project Server) and want to deploy them to SharePoint Online you need to host your app's web site part somewhere. One good and obvious place is to host it on Azure, however I have found that in order to troubleshoot your app it is a lot easier if the app is hosted on a local IIS.

In order to host your app on a local IIS you need to configure the DMZ for the app (in addition to the website, certificate, app secret and app id).

Configure DMZ for a D-Link router

DMZ tells the router that you allow a specific port to go to a specific computer. In the following I will explain how to configure DMZ for my D-Link DI-524 router. Other routers will have similar approhes.

Log on to the router at IP address 192.168.0.1.
Enter the admin user name and password (default password is "password").

Click on the Advanced tab.

Choose
 - Enable
 - Your PC's IP address (the PC hosting the apps web site)
 -  The port your site is running on (4000 in my case, but it is properly port 80 in your case)

Click Apply. The entry is now located in the list.

You can now access your app's website from the internet.
Do not forget to also open the port in your firewall.

Comments

Popular posts from this blog

Install DLL in GAC - Windows 2008/2012 (Using Powershell, No GacUtil.exe)

If you want to install a DLL in the GAC and do not have the GACUtil.exe available. Powershell is properly the easiest way to procede.

Before Powershell you would properly just drag the DLL file into the C:\Windows\Assembly but this option is usually not available anymore.

Powershell - Add DLL to GAC So to install a DLL file in the GAC simply execute the below Powershell script. Remember you migth want to run the Powershell prompt as an administrator.
[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")$publish=New-ObjectSystem.EnterpriseServices.Internal.Publish$publish.GacInstall("c:\temp\MyDllFile.dll")iisreset
The first line adds a reference to the assembly we need to be able to mange the GAC.
The second and third lines retrives the GAC object and publish a new DLL file to it.
The last line resets the Internet Information Services. This is only needed if your DLL file is used in a websi…

Sharepoint 2013 - Fullscreen mode/hide quick launch

If you want to hide the quick launch on a SharePoint page or web part page in 2013 you could of cause use CSS scripts as in 2010.
But as a new thing in 2013 the user have the possibility to click on full screen mode. so why not load your page in this mode and then the user can choose to exit the mode if he prefers.

Add a content editor webpart to your page and click on Edit HTML from the ribbon.
Add the following code:

<script type="text/javascript">
window.onload = function()
{
  SetFullScreenMode(true);
}
</script>

SharePoint/Project Server - Firewall port open list

Firewall port open list Every time I have to install a new instance of Project Server I forget which ports have to be open.
The ports are divided into 3 lists, one list for the web front end servers, one list for the application server and one list for the SQL server.
These ports are based on a 2013 installation of SharePoint/Project Server. the 2010 installation defer a little bit.


Web Frontend ServerWhen a range is specified all ports between the range must be opened.
     Port(s)ProtocolBoundDescription
-80 TCPInhttp
-443 TCPInhttps/ssl
-25 TCPInSMTP for e-mail integration
-16500-16519TCPInPorts used by the search index component
-22233-22236TCPIn/OutPorts required for the AppFabric Caching Service
-32843-32845TCPInCommunication between Web servers and service applications
-32846TCPIn/OutSharePoint User Code Service
-808-809TCPInOffice Web Apps
-5725TCP