Finding Alternatives To The Often Broken App_offline.htm Hack?
Mar 14, 2011
In quite some scenario's, placing app_offline.htm in the root is just right: you do some updates, the message appears while updating, and that's that. The idea is, as Microsoft puts it, that before anything is called, IIS first checks if app_offline.htm is there and if so, it cancels everything and displays it.
So for so good, but in many situations it doesn't work:
When you have a compile error in an ASPX page and a user links directly to it When you have conflicting assemblies When you have a parsing error in your web.config In the midst of removing / uploading the entire site.
A direct link to a static HTML page is still displayed as suchm File-not-founds, access-denieds are thrown before the message is shown Possibly more scenario's exist that fail. My point is: for any serious updating work, app_offline.htm is not suitable. I sometimes create a redirect in IIS, to another site, but another site may not always be available and it can confuse users.
Ideally, I'd want to keep the current location in the url location bar of the end-user, show the message, and have the page auto-refresh each minute to see whether the site is back, so that the user continues where he left of when the site comes back. While technically easy enough with a static page, it will fail for the above mentioned reasons the minute an error is thrown.
View 3 Replies
Similar Messages:
Jan 26, 2011
I am new to MSDeploy as well as IIS admin.
In order to show a "site under maintenance" page we are looking at two alternatives.
1) Have an app_Offline.htm page and sync it to the server when maintenance starts.
2) Create a separate folder with a totally different site (which can show a lot more dynamic information than what we can with the app_offline page). During maintenance, it is being that we change the virtual folder mapping of the site to point to this other folder while we work on updating the site.
Is there a way to change the virtual folder to point to another folder using MSDeploy? Is there any other way to do this via a script rather than having to go to each server and manually change the folder ?
View 1 Replies
Feb 28, 2010
I've got a DropDownList and I'm trying to prevent it from being used as an attack vector. Can I assume that the user is unable to actually change the values of the DDL and postback to the server? At the moment, I get this ASP.NET error message thrown if I try and change the packet after submission:For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.Am I right in thinking that this is due to the integrity being compromised in the viewstate hash?
View 2 Replies
Nov 14, 2010
I have an app using iis7 and the urlrewrite module, it take friendly urls and converts them to queries like this: [URL]
and converts it to: [URL]
the question I have is that will looking through my server event logs I notice that some ips are calling the following:[URL]
do you think this is the urlrewrite module messing up or is somebody trying to hack my site.
View 2 Replies
Apr 3, 2010
I'm uploading xls file onto my server using ASP.NET VB. Should I take some precautions so that not one would upload some hacking script to hack my site using this upload?
View 14 Replies
Oct 1, 2010
Is there an auto hacking software that tries to hack my localhost asp website? I need this to know my weak points in my website.
View 1 Replies
Aug 23, 2010
Normally, I use App_Offline.htm for taking the site offline. But occasionally, when I do that, the site just hangs (like in: browsers wait forever, server gives no response at all). This seems to happen on an updateable site when I change something, like a control and afterward, when it doesn't go quick enough (site hangs), I place App_Offline.htm in the root of the website.
In most cases, this immediately takes down my site. But occasionally it doesn't. In those cases, I cannot just stop the website (when I restart, the behavior continues). Stopping the application pool doesn't let me restart the same app pool. The only two solution so far is restarting the whole IIS web service.
I'd like to prevent this from happening. Is this a bug in IIS not "breaking all actions" when App_Offline.htm is found? I use IIS 7 with Windows 2008 SP2 64 bit.
View 2 Replies
Jan 27, 2010
I regularly (every few days or so) publish my ASP.NET web project to the local web server.
But the weirdest thing keeps happening... a file called "app_offline.htm" keeps appearing, unbidden, in my web project!
I have deleted this file several times, it is not in source control, and AFAIK nobody else is tampering with the project. But practically every time I try to publish the project, my publish fails (Unable to add 'app_offline.htm' to the Web site. The file 'app_offline.htm' already exists in this Web site.Error: The operation could not be completed. Unspecified error), I go back to look at the project, and there it is again, large as life, and I suspect if it could it would be blowing raspberries at me.
Having read up a little about this file, I gather it's meant to be an easy way to take your app offline. But I didn't see anywhere that it's supposed to impose itself on you arbitrarily for no good reason.
View 2 Replies
May 17, 2010
When I publish my ASP.NET MVC application it generates a app_offline.htm file to take the site offline while it updates the website and then deletes the file once the publish is successful.
This is cool and I really like the idea, but I want to create my own custom app_offline.htm file that the publish action is aware of and put it somewhere where it doesn't effect my development site - i.e. it doesn't sit in the root of my development site rendering it offline all the time.
EDIT: From the comments on Scott Gu's post about app_offline.htm, it seems that customization of the app_offline.htm file wasn't possible with VS 2005 - has this changed with VS 2008 and now VS 2010?
View 3 Replies
Apr 21, 2010
I loved the features of using app_offline.htm on my ASP.NET WebForm based sites.
Upload the file and your app is immediately "offline". Snappy.
Now that I'm using MVC 2, I noticed that this no longer works.
Is there a way to get this behavior in ASP.NET MVC 2 like it did in WebForms?
View 1 Replies
Dec 3, 2010
I have a web app that has an app_offline.htm file, this file is stored in source control along with everything else.
The problem I have is that each time I (or any other developer) do a get latest on the source I get the app_offline.htm file and then when I try to run the app all I see is the app_offline rather than the actual web site.
Is there way that I can stop this from happening?
View 1 Replies
Feb 8, 2011
I have created an app_offline.htm file for an ASP.NET MVC2 application running on IIS7 / Win2008 64-bit, and ensured that it's over 512 bytes (it's 2KB right now). On my dev box running Visual Studio 2010, it works like a charm, but when I put it on the production box, all I get is the generic HTTP 500 error saying "The page cannot be displayed because an internal server error has occurred."
What's especially strange is that I don't get anything logged in the application event log, nor does ELMAH pick anything up. I've disabled custom errors, put FormsAuthentication location exceptions for the file, ensured I'm not referencing any other files (images, etc.), but nothing fixes it.
View 1 Replies
May 10, 2010
I have placed an app_Offline.htm in the root of my IIS7 application. This works for calls to pages on the root, but not for calls to pages in a subfolder of the application.
How comes? And how to make it work also for subfolders?
View 1 Replies
Sep 18, 2010
I get the message "This application is currently offline. To enable the application, remove the app_offline.htm file from the application root directory. "
However, this is no app_offline.htm file in the root directory. Where in the heck is it?
I am looking in the Solution Explorer, and I also looed in Windows Explorer . . . not a sign of it. ?
View 4 Replies
Apr 9, 2010
i am trying to delete app_offline.htm programmatically but the code doesnot even get called as the app_offline does not other pages load. how should i delete the file after the updations have been done in the website. i know that i can delete the file manually but i dont want to do that.
code:
if(File.Exists(filename))
{
File.Delete(filename);
}
View 1 Replies
Jul 31, 2010
i found app_offline.htm created automaticaly in my project while i was working on my website offline.
View 4 Replies
Feb 22, 2011
The app_offline.htm file that ASP.NET serves returns the http status 503. This is the correct behavior for most situations. However, in the scenario where a specific URL is requested (e.g. [URL]), I'd like to change the returned http status to 200, while still returning http status 503 in all other situations. Is this possible?
The reason why I want to do this is whenever we do scheduled maintenance on our website, we use the app_offline.htm file, but we don't want our uptime monitoring service [URL] to report downtime during our scheduled maintenance.
I assume this would have to be at the IIS level because the app_offline.htm gets served very early on in the request processing cycle.
View 6 Replies
Mar 2, 2011
have been using the Publish Web Site option VS 2005, and all of a sudden it quick working correctly and do not get an error message. Also, compiling the web site does not take as long as it did before. Now Pubish Web site only puts the bin folder and PrecompileApp.config file in the C:InetpubwwwrootOIAEmailMaint. Because I am working and testing this website sometimes I delete any previous files that was in the folder C:InetpubwwwrootOIAEmailMaint before Publish Web Site. I did notice when I was looking at the files I delete in the Recycle Bin that a app_offline.htm. Apparently I changed some kind of option by accident by I do not have a clue what.
View 1 Replies
Sep 2, 2010
After seeing the Hanselman "You are doing it wrong" video I start to use the Web Publish feature of VS2010.
What I'm really missing is that the websites sometimes gives errors while the site is publishing because the feature does not copy the app_offline.htm file to the server.
I do not want to start using MSDeploy scripts, because I have several sites and want to keep it simple.
Maybe there is a simple tweak to tell the wizard to copy and then delete the file.
View 1 Replies
Aug 4, 2010
Im looking for some input on a validation problem i have. My demands for validation are:
1. Able to do database checks
2. Error messages are custom and imported from other localized source as stringvariables(NOT resource files).
3. DRY serverside and clientside validation.
As far as ive seen data annotations dont work well under these cirumstances, custom attributes are needed just to be able to output the strings(wonder why this wasnt thought of). This isnt a dealbreaker but as ive tested sofar custom attributes must be added in the global.asax wich i 1. cannot get to work in the CMS im building this on and 2. i dont want to have to edit the global.asax everytime the scripts are implemented. Serverside this solution works fine though. From what ive read IDataErrorInfo should not be used? So havent really checked how to get this rolling with client-side either.
My thought was using custom service layer validation with xval but documentation is very poor to the extent i could find any(couldnt find any real nfo on how to implement xval with your own code, ie not using the autgened client-side metadata wich leads to the annotation problem described above). So i have a hard time finding any working solution other than to build something 100% custom.
Do anyone have a solution or perhaps some information or can steer me in any direction on the best way to getting this done in a good fashion other than building custom?
View 4 Replies
May 14, 2010
I'm considering purchasing a resharper license but would like to know if there are any possible alternatives to resharper and how would you rate these compared to reharper? It doesn't necessarily have to be a free alternative but I would just like to know how good equivalent products are.
View 8 Replies
Jan 8, 2010
I am looking for an alternative to using UDP multicast on the .NET Framework and am looking for suggestions.I need to send messages to several web servers running quite a few ASP.NET applications. These messages would be one-way only, coming from several different machines. UDP multicast would be perfect except that I can't use it due to it requiring administrative rights. Seehttp://stackoverflow.com/questions/1941463/asp-net-multicast-udpclient-problems for details as to why.Is there something else that would work in a similar manner, allowing multiple applications to receive broadcast-type messages?
View 4 Replies
Jan 25, 2010
I found an interesting discussion here:
[URL]
Quote:
DataSets are sub-par amateur solutions to code your Data layer...Stop Using Them and learn to CODE! :)
What is your opinion of DataSets vs. just stubbing out custom classes and working with those? What are other alternatives?
View 3 Replies
Sep 23, 2010
I'm developing an ASP.NET website that will allow users to view and print Microsoft PowerPoint slides. Right away, I knew that Aspose had a product that would likely allow me to do this. What I'd like to do is look at alternatives just to say to management, "Yes, I've looked at the alternatives and they are". I can't seem to find any other than the open source project on Source Forge which seems to be mostly dead and I'm not even sure if it's something that would meet my needs anyway: [URL]. Is anyone aware of any alternatives to Aspose Slides .NET? Please list them if so. If you are aware there are no decent alternatives, I would find that information useful as well.
View 2 Replies
Apr 5, 2010
In my web application, I have a dynamic query that returns huge data to datatable and this query is often recalled with different parameters. So database is exhausted. I want to get all record with no parameters to an object, and perform queries (may be with linq) on this object. So database will not be exhausted. Which objects can be used instead of datatable?
View 1 Replies