ASP.NET JS file does not update latest on SOME clients - javascript

I am not really sure how to fully explain this problem. There has been this ongoing issue where SOME clients web browsers are not able to get the latest JS file for my website no matter what they do. Mind you, everything works fine when I visit the webpage from my workstation, but for others the js files are old versions.
Things we have tried:
-Appending a random parameter to the end of the js file <script type="text/javascript" src="~/scripts/Main/main.js?319"> </script>
-Force-refreshing the cache (Ctrl-F5)
-Setting Internet Options browsing history to "Everytime I visit a webpage"
-Clearing all browser data (IE, Chrome, Edge)
What is getting me is this doesn't happen to everyone, and it doesn't happen all the time. Only occasionally and only to some users and the issue always eventually resolves itself within a day or two. Whats going on here?
Website is an ASP.NET MVC application running on IIS8 on Windows Server 2012 R2

I don't have a silver bullet for you on this but my application has the same issue. In my instance we have a third-party authentication system (specifically, Tivoli Access Manager) between our clients and our server. Our suspicion has always been that something in TAM is caching stuff invisibly to us, and despite of any settings we have in IIS or what have you.
In your environment do you have any proxies or middle tiers that could be performing caching on your app's behalf?

Related

Is there an easy reliable way to transfer a file over local network using Electron / Node.js / terminal?

Are there any built-in methods in Electron / Node.js allowing to transfer a file over local network to another device?
I want to be able to send files locally from one computer to another (through an Electron app), but I also want it to be able to send files to smartphones.
How do I do it? Is it possible to just create a temp local server and download the file from another device by opening the URL (e.g. 192.168.0.x:x/file.txt)?
I tried using https://www.npmjs.com/package/quick-transfer which does exactly that, but for some reason opening the link on another device doesn't do anything.
As painful as it is for me to suggest... I'd recommend WebRTC for this, for these reasons:
It will make a local connection, when possible.
It will work over the internet as well, if required.
You can work around any firewall difficulties with TURN.
You will have compatibility with browsers.
You won't be opening up some server to a file that anyone on the network can get... transmission occurs over a secured connection. (This doesn't mean you can ignore other security aspects in your application however!)
Sample code: https://webrtc.github.io/samples/src/content/datachannel/filetransfer/
Commentary: It's amusing to me that in 2018, we still haven't solved the problem of sending a file from point A to point B. Network Neighborhood in Windows was the golden age, and now it's all screwed up with this newfangled cloud crap. :-) Obligatory: https://xkcd.com/949/

How to easily run local content (javascript, Flash) especially in IE11

I've developed interactive content for a client ( VR Objects ) using javascript and Flash (if needed) that they now want to distribute to prospective customers via a flash drive. That makes it local content causing security issues especially with IE. Actually there doesn't seem to be much problem with any browser except IE. True, IE displays the "allow blocked content" button but they fear that is too complicated or scary. And on IE11 in Win 8.1 it still may not work.
The development environment I use has a way around that for testing using an "embedded web server" although all that seems to do is produce a localhost address such as http://localhost:60331/wyj-01xn/output/surfacide_flash.html. Paste that in the URL bar of any browser on the same machine and you are good. Try it on another machine and no go. So I gather the port address and whatever the /wyj-01xn/ is about are machine specific. Another possible problem -- it may not work easily with IE11 on Win8.1, but I don't personally have that setup to test.
QUESTION: Is there a way I can produce this same functionality for my client, distributed along with the content on the flash drive, without the need to install some special software (local web server) on each client computer??? The current workaround is to tell customers they should us any browser except IE. Client isn't happy.
You could distribute your webpages along with a portable Nginx server, or wrapped inside a Node-webkit or AppJS package.

Configuring maximum number of simultaneous open WebSockets (in IE)

I've got this JS application. All client side JS communicating with a third party stream server via web sockets. I have about 18 different web sockets open for one page. Firefox and Chrome handle this many open web sockets at once just fine. IE11 seems to have a limitation of 4 open web sockets at once. Once I open that 5th web socket, regardless of socket call to the third-party server, I get an error thrown by IE, which closes the socket and gives the general error "SecurityError" and expanding the proto section it gives me . Seems to be pretty generic errors from my searches. At first I thought there may be a trusted zone type issue with IE, but I've added the client site to my trusted zone as well as the server providing the data.
This post provides info on max number of websockets for Firefox & Chrome, but I don't see anything specific about IE. Are there any known limitations to IE and web sockets? Answered, see edit below.
This MDN site talks about increasing the max value, but again, I can't find anything about IE. Is there some IE setting to up the amount of open connections? Answered: see below edit.
EDIT: This site shows the max connections settings for IE. It looks like it's a registry setting in Windows that controls the amount of web socket connections. Interestingly enough, I don't have that registry Key anywhere, but there is still a limit for this. The page speaks of IE10, and I'm working with IE11 specifically. Does anyone know if there are registry settings for this in regards to IE11? Has anyone just added these feature web socket registry keys and solved this issue?
The MSDN documentation you referenced is clear on the default being 6 concurrent connections (which means if not specified in the registry, that's what you'll get); and, if the documentation doesn't specify differently, it's probably safe to assume newer versions of Internet Explorer act in the same way as version 10.
Try setting through group policy. It worked for me.
https://jwebsocket.org/documentation/reference-guide/internet-explorer-tips

How to run a script from the Web in a Windows 8 app?

My organization already developed iOS and Android apps, and is starting to develop an app for Windows 8. In case it matters, the app is using Phonegap a.k.a. Cordova.
On the existing apps, the user downloads a very "slim" app from the store, containing a minimal HTML page. The user logs into a server, and then script tags are dynamically added pointing to locations on that server. Similar to web apps, scripts are downloaded to the client and then executed.
Windows 8's new security model blocks this behavior. Since the app runs in the local context and the script is on the web, I get the error "An app can’t load remote web content in the local context."
Is there a way to get around this restriction?
I'm open to "creative" suggestions and hacks, up to a point. I've already tried a few things, such as fetching a script with plain XHR calls and then injecting the response to a pre-defined script tag. Windows blocked this and all other attempts.
I also considered rendering everything in an iframe with a "ms-appx-web:" scheme (learned about this scheme here, "Schemas and contexts" section). This might allow me to load remote scripts, but would prevent code from accessing APIs of the locally-running JavaScript code -- Cordova and Windows Runtime. This access is necessary for my app. If there's a way to access Cordova and Windows Runtime from the web context, that might be useful too.
I very much doubt it.
The whole point of the MS Windows Store certification model is that they can test your code for malware/ crashes. If you can change the code on the fly, you could ship a perfectly harmless app, have it certified by MS, and then change it to something dreadful after the user installs it.

Constant Client Disconnects in Classic ASP Web Application

I'm working with a Classic ASP web app that typically runs well considering the old technology. It is an online support chat application that basically refreshes the client side Live Monitor page every 10 seconds to see if there are any pending chat requests. The past few days, a lot of our users are having a problem where this page either just ends up refreshing and going blank white (with no html in view source), or it goes to a generic IE error page "This program cannot display the webpage" - the same error you see when you are offline. I was able to recreate the issue after hours when I was the only user in the chat system, so it's not a matter of an overloaded server I don't think.
I've tried the following to no avail:
Recycle Application Pool
Reboot IIS Server
Change refresh from javascript to meta tag
Check IIS Error logs (nothing)
Check IIS event logs (nothing)
One thing that seemed to work for me, but didn't work for everyone else, was to disable our network Proxy server settings in the browser. Once I disable this, I can't get it to error out anymore... however, other users aren't quite so lucky.
Any thoughts on where to go with this? I'm at a bit of a loss here...
Thanks,
Shawn
We are finding the same problems in a .Net solution. It looks as if the issues are related to SQL Locking so we're working on those as we find them.

Categories

Resources