1

I am going to explain first what I did, and then the expected result.

  1. I created a web application at http://apps.mydevdomain.com
  2. I created a site collection with developer template (on the root site collection)
  3. I followed this blog: http://blogs.msdn.com/b/how24/archive/2013/06/14/prepare-your-sharepoint-2013-farm-for-app-development-and-debugging.aspx Except the DNS part as I dont have control over that in the DNS server.
  4. I created an app using this blog: http://blogs.msdn.com/b/bspann/archive/2013/01/19/asp-net-mvc-based-apps-for-sharepoint-2013-on-premises.aspx
  5. I also followed this for the certificate thing http://msdn.microsoft.com/en-us/library/fp179901.aspx

Ok all set I press F5, and the app is deployed, I click on I trust it, and then its redirected to the app with a url like this:

https://<thelocalhost>:44301/Home?SPHostUrl=<http://apps.mydevdomain.com>&SPLanguage=en-US&SPClientTag=0&SPProductNumber=15%2E0%2E4481%2E1005

So obiously this works if I am inside the server. but outside the server it wouldnt work.

I have seen in many demos that Sharepoint would automatically generate an url with an app guid

something like

http://app-3452334.mydomain.com

What am I missing?

2 Answers 2

1
+50

You have to do the DNS stuff that you skipped in step 3! It's the step where you give the app domain a lookup record in the DNS and hence translate your computer name with an URL

2
  • I dont have access to the DNS of my company, so I cant really do that step, there should be another way to do this on a DEV environment, I realize that for production, that step has to be done later. Commented Feb 9, 2014 at 13:51
  • 1
    If you have a DEV environment you should make sure you also use your own DNS server (it is really just a role on a server, like IIS or AD) Commented Feb 9, 2014 at 14:13
1

You need to create an isolated app domain for apps to work. Moreover, it is evident from your web application url that you are using host named web application. So, you need to be extra careful.

You are now ready to deploy your apps. Because of all this extra domain stuff though there are a few things you should know about your web applications and site collections. If you are using a host header for your web application apps won’t just work for that web application. Because of how the redirect for the app domain works IIS will try to resolve the app url by using the default IIS web site, which of course doesn’t work. If you want to use host headers for your web applications you have to create an extra web application that is listening on port 80 (or 443 if you are using https) and that doesn’t have a host header. This means that you have to create a web application like you normally would. You have to make sure that you select port 80 (or 443 if you are using https) and you should not fill in a host header. Note that you have to stop the Default Web Site in IIS in order to be able to do this. The web application will use the server name as its url. The web application can be empty except for a root site collection.

Another option is to use web applications without host headers and to create Host Header Site Collections. Be aware that Host Header Site Collections cannot be created via the user interface, they can only be created by using PowerShell.

Source: http://sharepointchick.com/archive/2012/07/29/setting-up-your-app-domain-for-sharepoint-2013.aspx

I also had issues with setting up app domain and above article had all the answers for it: http://sharepointnadeem.blogspot.com/2014/02/sharepoint-2013-isolated-app-domain.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.