Opening Umbraco site from Visual Studio and from a browser
Hello!
I am new to Umbraco and IIS.
I have just installed the latest Umbraco (7.5.x) using NuGet from within Visual Studio (also created a database in the SQL Server and a Site in the IIS Manager).
When I press F5 (Start Debugging) button in Visual Studio, my Umbraco site is successfully opened in the browser and as long as I am in the Debug mode in Visual Studio, I can open a new page and navigate to my URL 'http://localhost:#####' and everything works fine.
BUT, as soon as I am exiting the Debug mode or close Visual Studio and manually open the browser and enter the same URL 'http://localhost:#####', then the page cannot be open anymore.
When you press F5 in Visual Studio you open website in IIS Express, when you exit from debug it close down. So it works as all asp.net web-sites. Do you want to have possibility to open your web-site without running debug mode? Try to look how to do it - https://support.microsoft.com/en-us/help/323972/how-to-set-up-your-first-iis-web-site
However, I did actually create the site in IIS (I wrote it in the beginning of the initial post).
Here is what I did:
1) Went to IIS Manager, Sites, right click and chosen 'Add Website' and create a new site 'MyUmbracoCMS'.
2) In the Physical path field I have specified a path to the Visual studio project with Umbraco installed (..\Documents\Visual Studio 2015\Projects\MyUmbracoCMS\MyUmbracoCMS), left the standard port 80 and IP address setting set to 'All Unassigned' and in the Host name field I wrote 'myumbraco.com'.
3) Then I gave 'Modify' rights to the Visual Studio folder where the web site is referring to for users IUSR and IIS_IUSRS
4) Then I went to C:\Windows\System32\drivers\etc, opened the file Hosts and added a line: 127.0.0.1 myumbraco.com.
6) Now if I go back to the IIS Manager and choose 'Browse myumbraco.com on *:80 (http)', then I am getting an empty page, but I would expect to see my Umbraco site.
Note, it is not an error, it is just an empty page!
5) My Visual Studio Project setup has Web settings set to 'IIS Express' and Project URL to http://localhost:50821/
and if I am trying to change it to 'Local IIS' and to specify my new URL 'myumbraco.com', then I am getting a warning and if I choose 'Yes', then an error:
So, my questions are still open:
Why is my IIS setup not allowing me to see the Umbraco site when I am typing 'myumbraco.com' in the browser?
Why is Visual Studio giving me an error when I am trying to specify the 'Local IIS' and my local URL 'myumbraco.com'?
As long as I am in the Debugging mode in Visual Studio, I can go to Umbraco site or the back office and everything is shown correctly. BUT, as soon as I exit the Debugging mode, the sites are not accessible any more, see the screen shots below.
As far as i know, once debugging has stopped, the IIS Express will stop. You could run it via ctl F5 (which runs the site not in debug mode), but this has nothing to do with the IIS setup.
As you have already mentioned, you have set up IIS with myumbraco.com, so you will need to use that and not localhost.
Of course, my Knowledge in this matter is not very good, and i can only go on my experience. IIS Express in VS is not IIS on your machine (i am sure they could be related, but thats beyond my knowledge).
With Visual Studio 2015 - you should be able to right click on the web project and choose view in web broswer (if it's a website)
or
view -> View In Web Browser (if it's a web app)
In Visual Studio 2017 this option is avalible if you right click on the views folder.
both options will start iisexpress (just like in debug) but not debugging. the site will run (and reload) as you continue to edit in visual studio - it will only stop if you exit visual studio, or close the site from the iis express icon in the taskbar.
Try to add 'myumbraco.com' domain to Umbraco root node. As I see you don't have any content nodes yet, try to create first content node and assign 'myumbraco.com' domain to this node.
Press right button on root node -> Culture and hostnames -> add 'myumbraco.com' domain
Erudit, when you stop debugging IIS express is stopping, and your localhost site isn't working this is right functionality, you have to press F5 and debug each time or use IIS with 'myumbraco.com' domain.
Thank you Alex, Richard and Kevin for your replies.
I understand from you answers that it is working as expected from within Visual Studio and I could just use that.
However, I would still like to set it up on the IIS and be able to access Umbraco site via URL 'myubmraco.com' and wondering why it is not working there.
Sebastiaan, do you recommend setting up the development of Umbraco in IIS express as detailed by the poster, erudit, by opening IIS express and creating a new website rather than just using Visual Studio's function to serve via IIS express? Does it make it easier to deploy the website to a remote IIS server? OR do you recommend using web deploy within VS to publish to a server running IIS Express and not worry about the localhost IIS Express website setup?
Opening Umbraco site from Visual Studio and from a browser
Hello!
I am new to Umbraco and IIS.
I have just installed the latest Umbraco (7.5.x) using NuGet from within Visual Studio (also created a database in the SQL Server and a Site in the IIS Manager).
When I press F5 (Start Debugging) button in Visual Studio, my Umbraco site is successfully opened in the browser and as long as I am in the Debug mode in Visual Studio, I can open a new page and navigate to my URL 'http://localhost:#####' and everything works fine. BUT, as soon as I am exiting the Debug mode or close Visual Studio and manually open the browser and enter the same URL 'http://localhost:#####', then the page cannot be open anymore.
Do you have any idea on how to solve it?
Thank you in advance!
Hello Erudit
When you press F5 in Visual Studio you open website in IIS Express, when you exit from debug it close down. So it works as all asp.net web-sites. Do you want to have possibility to open your web-site without running debug mode? Try to look how to do it - https://support.microsoft.com/en-us/help/323972/how-to-set-up-your-first-iis-web-site
Thanks,
Alex
Hi Alex!
Thank you for your quick response!
However, I did actually create the site in IIS (I wrote it in the beginning of the initial post).
Here is what I did:
1) Went to IIS Manager, Sites, right click and chosen 'Add Website' and create a new site 'MyUmbracoCMS'.
2) In the Physical path field I have specified a path to the Visual studio project with Umbraco installed (..\Documents\Visual Studio 2015\Projects\MyUmbracoCMS\MyUmbracoCMS), left the standard port 80 and IP address setting set to 'All Unassigned' and in the Host name field I wrote 'myumbraco.com'.
3) Then I gave 'Modify' rights to the Visual Studio folder where the web site is referring to for users IUSR and IIS_IUSRS
4) Then I went to C:\Windows\System32\drivers\etc, opened the file Hosts and added a line: 127.0.0.1 myumbraco.com.
6) Now if I go back to the IIS Manager and choose 'Browse myumbraco.com on *:80 (http)', then I am getting an empty page, but I would expect to see my Umbraco site.
Note, it is not an error, it is just an empty page!
5) My Visual Studio Project setup has Web settings set to 'IIS Express' and Project URL to http://localhost:50821/ and if I am trying to change it to 'Local IIS' and to specify my new URL 'myumbraco.com', then I am getting a warning and if I choose 'Yes', then an error:
So, my questions are still open:
Why is my IIS setup not allowing me to see the Umbraco site when I am typing 'myumbraco.com' in the browser?
Why is Visual Studio giving me an error when I am trying to specify the 'Local IIS' and my local URL 'myumbraco.com'?
Any feedback highly appreciated!
I am not certain why, but i do roughly the same process.
What happens when you go to the Umbraco back office? Does it show a login screen? Are all your documents published?
Check the logs to see of they are providing any extra information. Might give a reason why your published pages are not showing.
As long as I am in the Debugging mode in Visual Studio, I can go to Umbraco site or the back office and everything is shown correctly. BUT, as soon as I exit the Debugging mode, the sites are not accessible any more, see the screen shots below.
As far as i know, once debugging has stopped, the IIS Express will stop. You could run it via ctl F5 (which runs the site not in debug mode), but this has nothing to do with the IIS setup.
As you have already mentioned, you have set up IIS with myumbraco.com, so you will need to use that and not localhost.
Of course, my Knowledge in this matter is not very good, and i can only go on my experience. IIS Express in VS is not IIS on your machine (i am sure they could be related, but thats beyond my knowledge).
Hi
With Visual Studio 2015 - you should be able to right click on the web project and choose view in web broswer (if it's a website)
or
view -> View In Web Browser (if it's a web app)
In Visual Studio 2017 this option is avalible if you right click on the views folder.
both options will start iisexpress (just like in debug) but not debugging. the site will run (and reload) as you continue to edit in visual studio - it will only stop if you exit visual studio, or close the site from the iis express icon in the taskbar.
Hi Erudit
Try to add 'myumbraco.com' domain to Umbraco root node. As I see you don't have any content nodes yet, try to create first content node and assign 'myumbraco.com' domain to this node.
Press right button on root node -> Culture and hostnames -> add 'myumbraco.com' domain
Thanks,
Alex
Alex, please, read my previous comment. I cannot even load the Umbraco site. I guess there is something wrong with the IIS setup.
Erudit, when you stop debugging IIS express is stopping, and your localhost site isn't working this is right functionality, you have to press F5 and debug each time or use IIS with 'myumbraco.com' domain.
My answer was to this question - Why is my IIS setup not allowing me to see the Umbraco site when I am typing 'myumbraco.com' in the browser?
Thank you Alex, Richard and Kevin for your replies.
I understand from you answers that it is working as expected from within Visual Studio and I could just use that.
However, I would still like to set it up on the IIS and be able to access Umbraco site via URL 'myubmraco.com' and wondering why it is not working there.
Erudit, try to add content node and add your domain to Umbraco Domains and Cultures.
I did and it didn't help.
Seems like something is up with your mapping in IIS. Try using http:// as a prefix or use 'localhost'
Try to open Visual Studio as administrator.
@Michal you don't need to run as admin at all when working with Umbraco.
The way to do this is:
continue
browser
javascript
Sebastiaan, do you recommend setting up the development of Umbraco in IIS express as detailed by the poster, erudit, by opening IIS express and creating a new website rather than just using Visual Studio's function to serve via IIS express? Does it make it easier to deploy the website to a remote IIS server? OR do you recommend using web deploy within VS to publish to a server running IIS Express and not worry about the localhost IIS Express website setup?
is working on a reply...