Cache issue in Sitefinity/IIS, what can i do? - iis

I have a problem which I am struggling to identify. It may be a Sitefinity(CMS)-problem or it may be a IIS-problem.
Explanation:
I have a external database, where the user login-information is stored. When I change my information in the external database the changes does not affect the Sitefinity-page. But if I wait for many hours OR restart the website in IIS, the changes are made and affect the sitefinitypage.
So, as far as I can see this could be either Sitefinity or IIS.
I tried to disable the Sitefinity OutPut Cache, but it did not help.
Now I want to try to do something in IIS, but I am not very familiar with IIS. Do you hae any idea of what should I do/try?

Sitefinit has caching profiles. The standard (default) one should be 20 minutes, sliding expiration if I remember correctly. Go to the page, click Title & Properties. In the dialog scroll down until you see "Advanced" seection. It's probably collapsed by default.
Expand it and see if Caching profile is anything different than "No caching". If so - make it "No caching" and save. Re-test.
This is output cache. You can think of it as saving the html page on the first request and then serving this saved copy. The cache invalidates on multiple events. For example if you publish the page - it will invalidate the cache.

Related

How to get more information from Server about why page is loading so slow initially?

I am using Glimpse and have attached a screenshot of what it tells me on a specific initial page load (after which is cached and loads fine), but when I touch the web.config, this flushes out the cache ofcourse, and the initial page load is what the pic says it is. The most time spent is on the server, but is there a plugin for Glimpse or something else that I can use to find out exactly where the problem is located on the server??
The problem is specifically with this one template, but I can not determine what is taking it soooo long to load initially. Any help is greatly appreciated. The template runs several User Controls, so it would be a lot of code to post up and ties into a Document Type in the back end of Umbraco 4.6.1 CMS. All other Document types seem to work fine, except for this specific one.
In 4.6.1 you should ensure that you have set the value for umbracoDebugMode in the appSettings section of your web.config to true. Once you have done that you can append ?umbDebugShowTrace=true to the url to see a breakdown of the elements on the page and how long they took to load via the trace that gets displayed.
See http://our.umbraco.org/wiki/how-tos for reference

xpages partial refresh can't save after replicate local replica

Scenario:
User preview xpage for editing in web browser.
Developer replicate a local replica to the server.
User click save button and trigger save action partial/full refresh
In 8.5.2 crash the whole database based on can't find java design classes. In 8.5.3 no error CS/SS accrued but there are no changes applied to the document. Seems like if you replicate the sessionID is overridden. Is there a way to fix/detect it?
Any ideas?
thx
It relates to this effect: Meaning of java.lang.ClassCastException: someClass incompatible with someClass.
Simply said, every design change resets XSP engine. Since 8.5.3 you can control it by property "Refresh entire application when design changes" in XPage properties - turning it off (default since that version) will just "soft reset" XSP engine.
Anyway, you may loose some scoped variables and beans. This concludes to some rules to obey:
Do not allow developers to change design in production during working hours.
Notify users about the problem (onError event for partial refresh) - Tim's comment explains, that you won't get an error from partial refresh after design change, unfortunately. Simple CSJS code pinging app availability and report problem when app does not respond could work, but I don't advise that: we use "keep alive" control from ExtLib, and troubleshooting in domlog.nsf became a nightmare - it is full of pings (almost all the time - many users keep their browsers open overnight).
If data are very important, implement auto save mechanism similar to Google apps.
BTW: This effect is similar to time-outed session - partial refreshes will fail and user need to reload the page (and possibly loose edits).

Feature deactivation doesn't work. Loads forever without performing deactivation

I'm experiencing problems when trying to deactivate a custom feature through the GUI. When I press the 'deactivate' button I'm, as expected, redirected to the warning page which asks if I'm sure I want to deactivate.
Upon confirming, the page starts loading.
The feature in question should normally be activated very fast, however on this occasion the page loads for more than 5 minutes without anything happening.
After concluding that the page seems to be stuck in an eternal loading cycle, I had to refresh the page to see if there had been any changes, but no, the feature remains active.
Any ideas?
Details:
The site I'm working is a previously existing office365 site. I've just made some changes to my custom solution (modifying one feature and adding another)deactivated the old solution and uploaded the new solution, so I'm trying to deactivate and reactivate the feature which I've modified.
It depends what's happening during deactivation - 5 minutes might not be very long if the deactivation has to perform a lot of updates (e.g. removing columns from lists in lots of subsites). I did once have a feature deactivation that took 45 minutes (?) to run.
I guess another possibility is that you've got C# code that contains an infinite loop? Though that seems a bit of a long shot.
Otherwise, Office 365 is very hard to debug; I'd suggest raising a support call with Microsoft through the O365 portal to see if they can see any logs.
When the feature is removed are you trying to remove items like CT's or anything that is dependant on another thing?
I've seen features get glitchy when this occurs on our test enviroment and make sure this is ironed out before deploying to live.
Theres a feature checker somewhere on codeplex but i'm not sure if this will connect to the office365 site. It's called something like FeatureAdmin.exe This might help you in removing the feature and clearing out left over stuff from the feature however it will not remove whatever your feature is struggling to remove(if it is of course!)
When the original feature was deployed did you test it could be deactivated cleanly?

SharePoint COMException

When adding or editing a page in a SharePoint Pages library we get the following exception:
[COMException (0x81020016): Item does not exist
The page you selected contains an item that does not exist. It may have
been deleted by another user. Click "Home" at the top of the page to return
to your Web site.]
at Microsoft.SharePoint.Library.SPrequestInternalClass.RenderColumn.
The weird thing is, when we first do "Check in" and then click the Publish button it works perfectly. But clicking "Publish" directly generates theis error, BUT NOT ALWAYS!
The Pages library has publishing and item planning on, NO workflow (seeing as the person who adds / edit pages is also the approver) and Major/ Minor versions.
We use a content type derived from publishing page and a custom PageLayout.
I'm sure you would have already checked this but is there any more information in the ULS logs?
Also have you tried setting the debugger to break on all exceptions and does this give you more information? Go to Debug, Exceptions and tick Common Language Runtime Exceptions. Then go to Tools, Options, Debugging and untick Enable Just My Code. Finally attach to w3wp.exe.
If you are running Windows Server 2008 you could also try taking a dump file at the point the debugger breaks above. ADPlus might help if you are running Server 2003 but I don't have experience with it. You should then be able to open the dump file with DumpChk or WinDbg.
Edit: As discussed in the comments, this is code deployed to production that can't have its service interrupted. The only way you could create a dump file is programmatically. Have a look at this question I asked that will hopefully help you if you need to go down this route.
Other things to try if you don't want to get down and dirty with debugging is to try deploying your custom bits to a clean server. See if you can still reproduce the problem or if it changes.
I am assuming that you are using load balancing with 2 web servers.
The fact that it does not happen always points to there being a difference between the servers.
There are then a few things that you could check:
Are all the versions and service packs are the same on both machines
Have any of the servers had beta software installed
Is your code the same on both servers
One thing you could do to test without taking the system down: Is to remove the first web server from the cluster see if the error occurs, then add it back and do the same thing with the second web server.

Classic ASP "Down for Maintenance" page

I'm making some changes to a legacy classic ASP application. I've made the changes locally, and now I want to copy the changed files to the server. At the same time, I need to download the Access database, add some fields to some tables, and upload it again. For this reason, I need to be able to stop visitors from modifying the database while this is happening.
My main question is, what is the best way to setup a quick "Down for Maintenance" page that will be shown immediately and no matter which page the visitor requests. The application is already established, so I'd rather an answer that didn't require me to rework the application's architecture.
My second question (maybe this should be a separate question):
Is there a better way to add fields to a db table than to copy it down, modify, and stick it up again? Please forgive if that's a dumb question - I'm new to ASP - new to Windows too.
I only have FTP access to the remote server.
Thanks.
two ways:
1
if you do a server-side include in every asp page you can do a response.redirect in that include to /upgrading.html
2
in global.asa you can do a response.redirect in the session on start event. THis is probably the best way. Will only work for .asp pages, not if the client comes to a .html page.
Do you have any control panel access to the site at all?
When I used to run a number of ASP Classic sites I often turned them off for the five minutes required to do what I needed.
Rude to do to your visitors I know.
As others have said you could redirect to a page, but that won't stop people visiting static content in html pages, but then that probably won't matter, at least it stops them making changes to the mdb whilst you download it.
It's a pity that ASP.net's app_offline.htm doesn't work for ASP classic.
Another option I used to use was to create a default.htm file that had the offline message, and the way IIS was setup default.htm overrode default.asp, so simply uploading default.htm changed the homepage. This of course doesn't stop anyone using any of the other .asp pages.
So no real answer! Sorry.
If you have just FTP access to the server (and no control over the IIS) just insert a response.redirect to the "down for maintenace" page in top of all the asp pages, and remove it when the update is completed.
The changes to the database can be performed with the ALTER TABLE statement.
With regards to the "Down Maintanance" page issue you can and taking mapache's idea a step further if there is an included file (for a header) in each of the pages you can put the Response.Redirect in that one file and upload that in place. This will avoid making changes to all pages.
Another option is to upload a temp html file which will be found first by IIS. In IIS you can set which page name.ext are looked for in a domain/folder. For example when you browse to www.example.com you don't specify the page you are looking for so it could load index.html or index.htm for example depending on setup. It will depend on your hosts configuration setup, but a bit of trial and error I'm sure you can find out which one they use. Common ones for IIS are default.htm, default.html, index.html and index.htm. You can then put it in each of the folders in the website (not ideal I know) and then carry out your maintenance.
When updating databases you can run a migration script, written in sql, to update the schema and data of the db. As you only have FTP access this will require some sort of page you can paste the sql into and run. This however opens security issues so downloading the db, making the changes and then uploading again is probably easier. In addition to doing it this way you can also save the file and you'll have a backup :-)
Hope this helps.
Better than an include file, just use the Global.asa.
In the Global.asa's Application_onStart, add
Application("Offline")= True
at the top of all of your ASP files, add
If VarType(Application("Offline")) = vbBoolean Then If Application("Offline") Then Response.Redirect "App_Offline.htm"
(The double-if gets around the lack of VBScript's short-circuit operators, and therefore any data type errors.)
You could even set the Global.asa code to
Set fso= Server.CreateObject("Scripting.FileSystemObject")
Application("Offline")= fso.FileExists(Server.MapPath("App_Offline.htm"))
Set fso= Nothing
Which would enable the offline page if it exists, like ASP.NET. However, the application start code is only reparsed when the server is reset (using iisreset), or when the Global.asa file is modified, merely adding the App_Offline.htm will not be enough.
Add below code in web.config
<?xml version="1.0"?>
<configuration>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
</configuration>
And place app_offline under root folder. This will work.

Resources