I have a program that checks if a file is present every 3 seconds, using webrequest and webresponse. If that file is present it does something if not, ect, that part works fine. I have a web page that controls the program by creating the file with a message and other variables as entered into the page, and then creates it and shoots it over to the folder that the program is checking. There is also a "stop" button that deletes that file.
This works well except that after one message is launched and then deleted, when it is launched the second time with a different message the program still sees the old message. I watch the file be deleted in IIS, so that is not the issue.
I've thought about meta tags to prevent caching, but would having the file be dynamically named solve this issue also? How would I make the program be able to check for a file where only the first part of the filename is known? I've found solutions for checking directories on local machines, but that won't work here.
Any ideas welcome, thanks.
I'm not that used to IIS, but in Apache you can create a .htaccess and set/modify HTTP-Headers.
With 'Cache-Control' you can tell a proxy/browser not to cache a file.
http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html
A solution like this may work in IIS too if it is really a cache problem.
(To test this, open using your preffered browser with caching turned off
A simple hack is to add something unique to the url each time
http://www.yourdomain.com/yourpage.aspx?random=123489797
Adding a random number to the URL forces it to be fresh. Even if you don't use the querystring param, IIS doesnt know that, so executes the page again anyways.
Related
I have been attempting to register a OneDrive File Handler as demonstrated on GitHub.
My initial PUT seems to work but I get very flaky results when I attempt to update. I have one domain where the handler works fine but another where I get these problems:
refresh works first time but not subsequently
refresh seems to work but handler not evident in OneDrive
change and update handler but changes not seen when I refresh
Is there any way to work out what is going on? The responses I get in Postman indicate that everything has worked but the file handler is not working.
Here are some observations which may help anyone else who stumbles on this:
the forceRefresh requests seems very patchy, I can make a change in the handler manifest and only some hours later will forceRefresh actually return the changed manifest
don't make the silly mistake I did and change the version in the handler manifest to something other than 2. If you do this the manifest will upload successfully but your handler will never appear. An error response would be much nicer than a silent fail.
I often find that even once forceRefresh has worked the new handler does not appear in my browser. To fix this I go to Local Storage (in the browser dev tools) and remove the entry for 'fileHandlerCache', then do a refresh.
BTW, handlers seem like a great way to extend OneDrive but I have found the developer experience to be pretty rough. Any chance of a smoother ride?
I am in the middle of working with, and getting a handle on Vuejs. I would like to code my app in a way that it has some configurable behaviors, so that I could play with parameter values, like you do when you edit your Sublime preferences, but without having to compile my app again. Ideally, I would want a situation where I could have my colleagues be able to fiddle with settings all day long, by editing a file over FTP maybe, or over some interface....
The only way I know how to do it now, is to place those settings in a separate file, but as the app runs in the client, that file would have to be fetched via another HTTP request, meaning it's a publicly readable file. Even though there isn't any sensitive information in such a configuration file, I still feel a little wonky about having it public like that, if it can be avoided in any way...
Can it be avoided?
I dont think you can avoid this. One way or another your config file will be loaded into the vuejs application, therefore being visible to the end user (with some effort).
Even putting the file outside of the public folder wouldnt help you much, because then it is unavailable for HTTP to request the file. It would only be available to your compile process in this case.
So a possible solution could be to have some sort of HTTP request that requests GET example.com/settings and returns you a JSON object. Then you could have your app make a cookie like config_key = H47DXHJK12 (or better a UUID https://en.wikipedia.org/wiki/Universally_unique_identifier) which would be the access key for a specific config object.
Your application must then request GET example.com/settings (which should send the config_key cookie), and your config object for this secret key will be returned. If the user clears his cookies, a new request will return an empty config.
I have images in private blockblobs in Azure.
I am using Azure Reader 2 and can access the image like this http://localhost:55328/azure/00001/IMG_0001.JPG - it works fine and redirects to the blob with a Shared Access Signature.
However, if I try to resize the image, e.g. IMG_0001.JPG?width=100&height=100, I just get a 404.
Stepping through the code, I notice this line
if (e.VirtualPath.StartsWith(prefix, StringComparison.OrdinalIgnoreCase) && e.QueryString.Count == 0)
{
....
}
So, if there's a QueryString, no processing happens.
Debug output here:
https://gist.github.com/anonymous/28fd112eec194181baae
Thanks in advance
Your debugging misled you. It's true that redirection only happens when there is no querystring. When there are parameters, the blob needs to be modified, which means we must proxy it. A 302 redirect in that scenario is impossible.
AzureReader registers a IVirtualImageProvider, which ImageResizer automatically uses when handling all the proxying, processing, and caching.
The default behavior is to download, modify, and re-serve the data. The 302 redirect is just an optimization for throughput on unmodified files.
Notes:
sharedAccessExpiryTime is ignored, there is no setting by that name.
If you are going to reference code, it's best to link to the line in the file on github, otherwise we can't easily find the context. Press y on any github page to get a permalink, then click a line number (or range).
I'm going insane here... my first day with Coldfusion/MySQL running on a local Apache 2.2.0 webserver.
I have an
index.cfm
file, which I took and modified, replacing 20k of code with just
<p>HELLO WORLD</p>
But when I refresh the browser, the old index.cfm keeps coming up. No matter what I do...
- empty the file altogether
- disable browser cache
- clear ColdFusion Admin Panel Cache
- rename index.cfm to wtf.cfm
If I refresh.... same old index.cfm.
All other files are updated once I change them.
Question:
What am I missing? Must be Apache, because everything else makes no sense, doesn't it?
THANKS for ending my index.cfm-misery...!
EDIT:
I removed the whole application besides index.cfm. Refreshing now gives me hello world. I then added the Application.cfm, refreshed and I'm back to my full index.cfm...
Application.cfm looks like this:
...
<CF_callLogin
datasource="dtb"
TableName="table"
UserField="user"
...
BGColor="FFFFFF">
So I guess this calls callLogin.cfm and passes along above parameters. Still I also deleted the callLogin.cfm after trying to edit it forever, so there shouldn't be anything.
Still clueless...
EDIT2:
Could be a cf cache_pages?
I now removed all files in wwwroot\WEB-INF\cfclasses as per http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:54088 let'see if this helps.... doesn't :-(
EDIT3:
Could be a cached template? - http://blogs.sanmathi.org/ashwin/2006/07/12/tangling-with-the-template-cache/ It is... See my answer below
Wasted half a day...
It is a cached template and CF or Apache just seem to not give a *%&/$ if you edit or delete the file.
Here is the hack that worked for me:
http://www.bennadel.com/blog/673-Force-ColdFusion-Server-To-Recompile-A-ColdFusion-Template.htm
= Generate a loong text, append it to the template, save, refresh and violá, all of a sudden your template is updated, as the file size changed enough to finally warrant an update of the template.
You also could try turning this off in development using the CF-Admin > Server Setting > Caching, but this did not work at all in my case (first place I started trying to delete...)
Anyway, maybe this saves someone else a day :-)
Restart Apache then see if resolved, then CF and see if resolved. I haven't run into an issue like this in CF that wasn't resolved after the CF service was restarted.
I had to move a website on a bluehost server, that is in the Joomla Platform 1.7. I did alot of reasearch on Joomla.org and google and still haven't resloved the issue.
I recieve the following error: Infinite loop detected in JError. I went threw the configuration file and made sure that database and user match up with my new database parameters match up and I am still recieving this issue. Thank you. Urgent response will be very helpful. Currently working on this and this is not a good start. :(
I have ran into the same issue moving my Joomla site from one server to another. What I learned is the following;
Make sure you look at the parameters in configuration.php. Double check if the following variables in your configuration.php file is correct. (Double Check) You did mention that you already have done so. In that case I am 98% sure that you have an issue dealing with file Attributes with configuration.php. Change the Attributes of configuration.php from 444 to 666.
To get detailed information about the error, open the error.php file located in /libraries/joomla/error/ on your server.
In the following code:
public static function throwError(&$exception)
{
static $thrown = false;
// If thrown is hit again, we've come back to JError in the middle of
throwing
another JError, so die!
if ($thrown) {
// echo debug_print_backtrace();
jexit(JText::_('JLIB_ERROR_INFINITE_LOOP'));
}
change the line // echo debug_print_backtrace();
to the following:
**print"<pre>";
echo debug_print_backtrace();
print"</pre>";**
Remember- When you change the parameters in configuration.php to you new database make sure you that configuration.php file attribute is set to 666, Otherwise when you go to save the file it will not change. Try this first.. Good luck.