How can I publish my Umbraco site locally. I have it open in Visual Studio 2013 Professional. I have gone to Build, Publish. Now the settings is my problem. I don't know what to put here just to publish it on my desktop. I am hoping to just copy the published files to my server onto a test site which works fine in iis.
You don't publish a site locally, at least we don't. We use that for publishing to external servers.
Trust me when I say you don't want to publish locally.
Instead, Install IIS locally, and go in there and create a site and when it asks you for the physical path to the web site, point it directly at your Umbraco Visual Studio Project folder and set the "Connect As" to the account your are logged in as or an administrator.
Then make sure the application pool is set to .Net Framework 4.0 and integrated mode (this happens automatically in windows 8 or server 2012, but not in 7 or 2008/R2).
Then in your projects settings (right click project -> properties) go to the web tab,
Set Start Action to "Current Page"
check the checkbox for "Apply Server settings to all users"
and change the drop down to "Local IIS"
Then change the Project Url to the url you made the site in IIS (e.g. http://localhost:6789)
You can also use a binding like "http://ldev.mysite.com" and set a host header in your hosts file for ldev.mysite.com to 127.0.0.1
Once that's done you can f5 run the site and it will reset the app pool and iis open it in your default browser and attach to the w3wp running it.
Optionally you can manually attach to the w3wp running it and the user of the w3wp will always be "appPoolName\ApplicationPool" so you know which w3wp to attach to.
I recommend doing this because it speeds up debugging 10 fold. Instead of waiting for the site to spin up in IIS express, or having to wait on a publish you can just rebuild and refresh your browser.
If you rebuild it will cause the app pool in local IIS to automatically reset, and you can just refresh the page to see your code change without having to do a publish.
I have created the site and pointed IIS at it, is it ok to have it say on my desktop or does it have to be in the wwwroot folder? I have set the .net framework to 4.0 and integrated mode too.
The project settings - do you mean here?
I don't seem to have a Web tab.
I have set up binding to hpcintranet and in my Umbraco project I have set the homepage (under Culture & Hostnames) to the domain of hpcintranet. The hosts file is set too. I never heard of w3wp (this is my first publish!) how does it work?
The location of your project folder does not matter so long as you pointed the IIS site directly at the root of your Visual Studio Project (where the web.config is).
However folder permissions do matter so you need to do 2 things,
Make sure you used "Connect As" when setting the site path in the IIS Site to your project folder and make sure you set Connect As to an administrator with full access to your project folder (usually who you are logged on as)
Grant the Application Pool Identity full control to your project folder,
You do this by using explorer to browse to your project's root folder, set permissions on your projects root folder via right click -> properties
Then grant the application pool identity full control to it (do this for every site you create, if you have multiple.)
w3wp is the Windows Process for an IIS Application Pool. Every running application pool in IIS causes an instance of the W3WP.exe to be running on your computer.
To debug your website you have to attach visual studio to one of those W3WP processes.
For ease of use, never change the Identity of your application pools in IIS on your local machine, leave them set to "Application Identity". This will cause Windows to have user names like
"AppPool\AppPoolNameHere" on your computer, and you grant permissions to those on folders, sql server, etc etc etc.
The reason for this is when you are attaching to a w3wp.exe where you have multiple local sites running, you won't know which one to attach to except by its Identity "The User it's running as". If you leave the identity set to Appication Identity then the user that shows up in the debug attacher or in task manager will be the name of the ApplicationPool.
So if I want to attach to a local site with an ApplicationPool named "UmbracoTestSite" I attach the debugger to the w3wp who's user is "UmbracoTestSite".
Project Settings -> This is referring to the Project Properties of the Project in Visual Studio. You get to this screen by right clicking on your project file in Solution Explorer and clicking on Properties.
There should be a web tab there unless you used the wrong Project Template to create your project, but if you did that you should have a slew of other problems.
If you are there and don't see the Web Tab, post a screen shot of it in Visual Studio on here.
However you don't need to set the Web IIS Settings in the Project Properties, I only do that to prevent IIS Express from starting everytime I hit F5. However you don't actually need to press F5, in fact try to not use F5 debugging anymore.
Note: If you stop using F5 to launch debugging and attach manually as I am suggesting, don't forget to set debug="true" in your web.config. F5 does it for you, but without using F5 you will need to remember to do it yourself.
Excellent. I'll have to read that a few times, there's a lot to take in! Thanks.
I've set the site path in IIS and Connect As me (administrator). I gave the folder full access by right clicking - properties. I did this for the project folder, I don't know which is the root folder, but I'm hoping this will pick it up?
The project properties, I right clicked on "Solution 'Localhost_54136'(1 project)" and got:
If I right click on the project name I get this menu and
Property Pages gives:
This project was created in WebMatrix and then in Visual Studio I opened it as a Web Site. I don't know if this has any bearing or not.
I think I had pointed to the wrong folder all along! I'm now pointing at the Views folder - there is a web.config in there. I got confused and thought the web.config was in the project folder - I did see one there in WebMatrix. So now I'm now getting this error, which is a bit more positive (I hope!). This is on my Win7 desktop and not the server (its still out of commission!).
When I tried to download asp.net 4.5 it says same or a higher version is already installed.
Publishing
Hi All
How can I publish my Umbraco site locally. I have it open in Visual Studio 2013 Professional. I have gone to Build, Publish. Now the settings is my problem. I don't know what to put here just to publish it on my desktop. I am hoping to just copy the published files to my server onto a test site which works fine in iis.
Hope this makes sense.
Thanks. Tony
You don't publish a site locally, at least we don't. We use that for publishing to external servers.
Trust me when I say you don't want to publish locally.
Instead, Install IIS locally, and go in there and create a site and when it asks you for the physical path to the web site, point it directly at your Umbraco Visual Studio Project folder and set the "Connect As" to the account your are logged in as or an administrator.
Then make sure the application pool is set to .Net Framework 4.0 and integrated mode (this happens automatically in windows 8 or server 2012, but not in 7 or 2008/R2).
Then in your projects settings (right click project -> properties) go to the web tab,
Set Start Action to "Current Page"
check the checkbox for "Apply Server settings to all users" and change the drop down to "Local IIS"
Then change the Project Url to the url you made the site in IIS (e.g. http://localhost:6789)
You can also use a binding like "http://ldev.mysite.com" and set a host header in your hosts file for ldev.mysite.com to 127.0.0.1
Once that's done you can f5 run the site and it will reset the app pool and iis open it in your default browser and attach to the w3wp running it.
Optionally you can manually attach to the w3wp running it and the user of the w3wp will always be "appPoolName\ApplicationPool" so you know which w3wp to attach to.
I recommend doing this because it speeds up debugging 10 fold. Instead of waiting for the site to spin up in IIS express, or having to wait on a publish you can just rebuild and refresh your browser.
If you rebuild it will cause the app pool in local IIS to automatically reset, and you can just refresh the page to see your code change without having to do a publish.
Hi Ryan
Thank you very much for your detailed response.
I have created the site and pointed IIS at it, is it ok to have it say on my desktop or does it have to be in the wwwroot folder? I have set the .net framework to 4.0 and integrated mode too.
The project settings - do you mean here?
I don't seem to have a Web tab.
I have set up binding to hpcintranet and in my Umbraco project I have set the homepage (under Culture & Hostnames) to the domain of hpcintranet. The hosts file is set too. I never heard of w3wp (this is my first publish!) how does it work?
Thanks. Tony
The location of your project folder does not matter so long as you pointed the IIS site directly at the root of your Visual Studio Project (where the web.config is).
However folder permissions do matter so you need to do 2 things,
Make sure you used "Connect As" when setting the site path in the IIS Site to your project folder and make sure you set Connect As to an administrator with full access to your project folder (usually who you are logged on as)
Grant the Application Pool Identity full control to your project folder,
You do this by using explorer to browse to your project's root folder, set permissions on your projects root folder via right click -> properties
Then grant the application pool identity full control to it (do this for every site you create, if you have multiple.)
w3wp is the Windows Process for an IIS Application Pool. Every running application pool in IIS causes an instance of the W3WP.exe to be running on your computer.
To debug your website you have to attach visual studio to one of those W3WP processes.
For ease of use, never change the Identity of your application pools in IIS on your local machine, leave them set to "Application Identity". This will cause Windows to have user names like
"AppPool\AppPoolNameHere" on your computer, and you grant permissions to those on folders, sql server, etc etc etc.
The reason for this is when you are attaching to a w3wp.exe where you have multiple local sites running, you won't know which one to attach to except by its Identity "The User it's running as". If you leave the identity set to Appication Identity then the user that shows up in the debug attacher or in task manager will be the name of the ApplicationPool.
So if I want to attach to a local site with an ApplicationPool named "UmbracoTestSite" I attach the debugger to the w3wp who's user is "UmbracoTestSite".
Project Settings -> This is referring to the Project Properties of the Project in Visual Studio. You get to this screen by right clicking on your project file in Solution Explorer and clicking on Properties.
There should be a web tab there unless you used the wrong Project Template to create your project, but if you did that you should have a slew of other problems.
If you are there and don't see the Web Tab, post a screen shot of it in Visual Studio on here.
However you don't need to set the Web IIS Settings in the Project Properties, I only do that to prevent IIS Express from starting everytime I hit F5. However you don't actually need to press F5, in fact try to not use F5 debugging anymore.
Note: If you stop using F5 to launch debugging and attach manually as I am suggesting, don't forget to set debug="true" in your web.config. F5 does it for you, but without using F5 you will need to remember to do it yourself.
Excellent. I'll have to read that a few times, there's a lot to take in! Thanks.
I've set the site path in IIS and Connect As me (administrator). I gave the folder full access by right clicking - properties. I did this for the project folder, I don't know which is the root folder, but I'm hoping this will pick it up?
The project properties, I right clicked on "Solution 'Localhost_54136'(1 project)" and got:
If I right click on the project name I get this menu and
Property Pages gives:
This project was created in WebMatrix and then in Visual Studio I opened it as a Web Site. I don't know if this has any bearing or not.
Thanks :) Tony
Hi Ryan
I think I had pointed to the wrong folder all along! I'm now pointing at the Views folder - there is a web.config in there. I got confused and thought the web.config was in the project folder - I did see one there in WebMatrix. So now I'm now getting this error, which is a bit more positive (I hope!). This is on my Win7 desktop and not the server (its still out of commission!).
When I tried to download asp.net 4.5 it says same or a higher version is already installed.
Do you think I'm getting closer to a solution?
Thanks. Tony
OK I have made a little change in the Web.Config file -
IIS is pointing at the project folder, DefaultAppPool v4.0 integrated. Still IE is giving a 500 error.
is working on a reply...