i have searched on google without succses. I whis to display a custom page when i publish my website on iis 7. I know about the Offline.html or something like this. But i whant the process to be automatic on publish. Display a page like : we are upgrading the website, it will be avaliable in a minute.
Now when i publish my mvc site, it can take up to 3 minutes, it only display an error.
Tanks.
Ps: sorry for my bad english, it's not my first language.
You can create a file called app_offline.htm in the root of your site. If this file exists then its contents will be displayed instead of your site. You can then deploy your site, and then just delete or rename the app_offline.htm file when you are done.
Related
I am just about to launch an Azure Web App (aka Azure Web Sites) and have a quick question.
I've noticed there was a pretty significant lag on using the site when I publish my site from Visual Studio. Each page(/controller?) appeared to be compiling only when it was first accessed so it made the site feel very slow at least for a few minutes. I want to avoid that so I am used the "Precompile" option when I Build and Publish from VS. This seems to work and, although there is still some initial lag after publishing, it's much better than it was.
My question is this: Because this is a new site and we are constantly adding functionality and fixing bugs, I would like to have a section on my main _Layout page which I can quickly edit with a notification (ie. "Site will go down in 15 minutes for maintenance."). The problem is that I don't want to go through the whole Build/Publish process to get that content up to the site. Is there a way that I can include some file / content (page_alert.html) in my _Layout.cshtml page that can be edited in something like the Azure App Service Editor? Because of the precompiled nature of the site, all my .cshtml files now just say "This is a marker file generated by the precompilation tool, and should not be deleted!" in the App Service Editor.
Thanks!
When you choose the Precompile option, you can also check 'Allow precompiled site to be updatable'. That will then allow you to update individual .cshtml files which will be compiled on the fly, while the rest is still precompiled.
See doc for details.
I think I found a solution that will work from another SO posting.
https://stackoverflow.com/a/14634578/1359788
#Html.Raw(File.ReadAllText(Server.MapPath("~/content/somefile.html")))
I can edit that somefile.html in the App Service Editor and it works
I am trying to install Umbraco 7.5.3 on an empty project but the back office has no items in the menus. It doesn't also load anything in the content tree.
I tried to do a clean installation based on this article but it was the same.
I went with a clean web application, I even select .net 4.5.1 in a try, and in the wizard part, I went with custom installation and in DB part I've entered the SA account.
Ok, I made it work. It sounds a bit strange, but it worked! I don't know why it wasn't on the how to page. and I still don't know what could be wrong :|
I had to set up the site on IIS and then accessing it using the domain address that I created.
So if anyone has the same problem do this:
1- create a new website set the directory to your websites address
(yourdomain.com==> c:...\yourUmbraco project)
2- go to hosts file and add your domain
(C:\Windows\System32\drivers\etc\hosts)
add
127.0.0.1 yourdomain.com
3- give access to your app pool worker (or everyone in your risk :D )
4- access your backoffice using yourdomain.com/umbraco
I'm new to MVC, and I have a Sandbox site I've set up to play around with. I want to set the site up in local IIS(7) so that I don't have to debug every single time through VS.
The site (my Home Index) is located in D:\Projects\MVC\MVCLearn\MVCLearn\Views\Home
So, in IIS, the Application's Physical path is set to:
D:\Projects\MVC\MVCLearn\MVCLearn
When I run localhost/[appname], I get the "ASP.Net is a free web framework yada yada yada" welcome page. What am I missing? How can I see my app? I've done copious amounts of Google searches, and I can't find one clear, concise, step-by-step walk through for setting up an MVC site in IIS7
OOOHHHHHHHHHH, I get it!!!!!!!!
A raw URL call of the application (localhost/[appname]) defaults to the Index of the Home Controller. That, by default, launches the Home/Index.cshtml page, which IS pretty much the Welcome to ASP.Net page I was seeing! It was working correctly all along! I was getting confused... I thought that page was a landing page built into IIS or something, but that WAS my Index page! It was put there when Visual Studio built my project! The reason Debug was showing me something different was because that was taking me directly to a different controller with a different view that I was working on!
I am using umbraco 7.1.3.
My requirement is to create another sub-domain in main site dynamically as per user request.For example I have implemented umbraco cms for my site "ww.xyz.com" & I am updating content through umbraco login. Now I want to create sub-domains for different clients as per their request... like : "www.xyz.com/client1", "www.xyz.com/client2" and so on...
Now all sub-domain site should have it's own umbraco framework, so client-site (sub-domain owner) can login and update their information respectively.
To achieve this requirement I implemented following steps...
First I register a umbraco website in IIS and configure it, and that worked properly.
Then I register another umbraco website in IIS and configured it, and that also worked properly.
Now to implement sub-domain logic...
I simply copied 2nd website's folder in to first website folder. Then convert that folder to application through IIS.
As per my expectation this should work, As I have already done the same in asp.net and it worked.
But with umbraco I am facing issue like "Invalid key value".
I think the issue is related to some umbraco configuration, but I am not able to figure it out.
Thanks & Regards
A bit of an open door, but since I don't see it mentioned in any of the comments and it's a bit hidden away in Umbraco 8. Have you tried setting the urls in the Cultures and Hostnames section?
Note: you get to this by going to "Content", in the content tree right click on your homepage and now you get several extra options which are normally hidden away with also the very useful Hostname and Cultures option which allows you to support multiple urls.
I have a new SharePoint server which I've attached a content database to. The new server is configured like the old one (same deployed solutions, settings, etc) and there was no errors when we attached the content database (which is a copy of the old server's content database).
At first, it looked fine, the site on the new server was working. But then we discovered that som sites couldn't be reached, when we try, we'll get a "404 File not found" error. The strange thing is that we can clearly see the sites in Manage Content Structure but when we try to open them, we get errors.
The error only occurs for a site called "Webbplatser" and all of it's subsites. The other sites, like Sök is working just fine. I can browse all the sites under "Webbplatser" without any problem from "Manage Content and Structure". I can see the default.aspx page for all the sites but when I try to open any of them, I'll get the 404 File not found error.
Anyone recognise this error? We are using Sharepoint 2007. Please help.
Sounds like there could be some site solution missing, perhaps even custom master pages or page layouts that were added in the 12 hive on which the Webbplatser site is reliant.
Use the the url of the webbplatser site and tack on the _layouts/settings.aspx to see if you can get to the site settings and see what is set up there. Failing that I'd do a directory tree compare between your old server and the new one, focusing on the 12 hive.