IT Hit Ajax Library - MODApplet.class Not Found - webdav

When I try to open .txt, .pdf or .odt by calling:
'ITHit.WebDAV.Client.DocManager.EditDocument(sDocumentUrl, javaApletFilePath)`
I noticed with Fiddler a GET request on /MODApplet.class with a 404 Not Found response.
Is it normal ?
Additional information:
I first tested the library on a simple configuration and everything worked fine so I didn't use Fiddler to look at requests and responses.
Since I have changed the configuration I have problems when editing .odt, .pdf and .doc but I can't figure out where it comes from.

Yes, the request to /MODApplet.class and 404 Not Found response is normal. This is done for maximum web browser compatibility as far as I remember. But make sure the request to ITHitMountOpenDocument.jar is fulfilled.
As soon as you mention reconfiguration you may need to cleanup Java cache on a client computer, pleas see the screenshot:
If you changed the authentication schema you may need to clean the cached credentials, please see "Credentials and Authentication Schema Caching" here.
Regarding .odt files: LibreOffice and OpenOffice does not provide any
web browser add-ins or protocol extensions to open documents without Java applet. However LibreOffice/OpenOffice documents can be opened via Java applet directly from server with no problem.
Regarding .pdf documents: Hypothetically Adobe Acrobat provides web browser add-ins to open documents directly from server. From our experience it never worked properly, you always get an error. Again Java applet should be ok with it.
Regarding .doc documents: There should be no problems opening .doc files both via web browser add-ins/protocol extensions and Java applet. Please also take a look at this article.

Related

Pupeteer is downloading unrequested files that cannot be intercepted or stopped

I am using Puppeteer along a proxy service, and after getting unexplainable high bandwidth usage I used a local proxy server to monitor the requests that were generating this bandwidth. I discovered that almost 90% of the traffic was used to request some crx files/updates.
My project requires me to open a a few thousand browsers every hour, in order to keep each task with it's own cookies and proxy. Every Chromium browser I open will eventually download ~10-15MB of files, using the proxy that is passed as arg to puppeteer.launch.
puppeteer.launch({
headless: false,
args: [
`--proxy-server=http://${this.proxy.host}:${this.proxy.port}`
]
)}
This requests do not appear in the network section of devtools and cannot be intercepted using:
await page.setRequestInterception(true);
this.page.on("request", cb);
I started a local proxy server and gave it to puppeteer via launch args to use, in order to monitor the requests made through it by Chrome. This is how I found out about this downloads. I blocked the first domain that Chromium was using to download these crx files, but Chromium started to download them from another domain, and so on. Some of this domains and URLs are:
http://redirector.gvt1.com/edgedl/chromewebstore/L2Nocm9tZV9leHRlbnNpb24vYmxvYnMvYjFkQUFWdmlaXy12MHFUTGhWQUViMUVlUQ/0.57.44.2492_hnimpnehoodheedghdeeijklkeaacbdc.crx
http://dl.google.com/chromewebstore/L2Nocm9tZV9leHRlbnNpb24vYmxvYnMvYjFkQUFWdmlaXy12MHFUTGhWQUVi
https://google.com/dl/something/something.crx
There were even more. When I block one domain, puppeteer finds another. This files are getting downloaded for every new browser launched, using expensive proxy bandwidth.
Is there a way to stop these downloads, or at least make Chromium only download them once? Not for every new browser launched. Can I at least instruct chrome to download these files without using the proxy?
This happens for both v5.5.0 and v8.0.0.
After a lot of time trying to find what is this extension that chrome always has to download, I found out about Chromium Components, that can be inspected using chrome://components. Looks like these are also shipped as crx files.
In my particular case Chrome was downloading "pnacl". The only way I was able to find this is by recognising the version number from the first link that I posted in my question (0.57.44.2492). Using chrome://components in a browser instance launched by puppeteer with the headless option to false, I found that pnacl had the exact same version.
I was able to prevent Chrome from downloading this component using the flag --disable-component-update. This flag is used by default by some webdrivers but not by the one that puppeteer (v5.5.0 or v8.0.0) downloads.
If anybody else encounters this problem, yours may be related to an extension instead of a component, so you may need to also use a flag to disable extension updates, but there is none, so I use --disable-extensions and --disable-default-apps just to make sure.

Windows Explorer not refreshing after CreateFolder (new folder)

We have built a WebDav Service with your Engine and have a one problem when we create a new Folder or File:
The new folder / file is created successfully, but not showing in the Windows Explorer. Only if you press F5, the new folder / file is showing (and the name is already selected to be edited).
This behavior is reproducible even with a blank WebDav Solution.
We can reproduce this on Windows 7 and Windows 8 (8.1) using WebDav .NET Server 3.8 and the latest 3.9.
Is there a way to get around this “refresh-problem”?
I solved this issue but clicking in the folder explorer at view > options > then i restored to default and everything is back to normal.
I assume this issue is in Windows Explorer on a single computer. Most likely the WebDAV server-side code is failing with with some exception. Here are some ideas how to detect what is wrong:
Unmount network connections executing 'net use * /DELETE' in a command prompt, this will unmount WebDAV connections too and simulate 'clean' environment.
Retry reproducing the issue and examine your WebDAV logfile. By default it is located in /App_Data/WebDAV/Logs/ folder. Are there any exceptions in it?
Use Fiddler tool or any other debugging proxy to capture and examine HTTP requests. Are there any failed requests?
In case you are creating a folder/file on one computer using Windows Explorer (Microsoft Mini-redirector driver) or IT Hit Ajax File Browser and expect the files list to refresh automatically on another computer this would not work. Mini-redirector does not support any notifications from server and WebDAV does not submit any notifications, you need to refresh the files list manually to see the new items created.
I found this video on Youtube that explains in very much detail how to fix this problem: https://www.youtube.com/watch?v=UUiCPsQquqc
It is a bit lengthy, so I'll just quickly sum it up here:
The reason for these problems are one or more (broken) Shell Extensions that prevent the refresh of the Windows Explorer
To fix it, open up regedit.exe (requires admin privileges), do a search for the Registry Key "DontRefresh". If it is "1", set it to "0". There might be multiple matches for that Key, so repeat until all Keys have the value "0".
This might not work immediately, you may have to kill and restart your explorer.exe process (easiest to do with the Task Manager). Or you can simply reboot your computer. In my case, it worked immediately.
According to the video, the Keys should only be located under HKEY_CLASSES_ROOT/CLSID, but in my case I could only find such Keys in HKEY_LOCAL_MACHINE/Classes/Wow6432Node/CLSID.
I figured it makes most sense to simply search the complete Registry, it does not take very long.
I tred a lot of hacks, from scanning the system, to recreating the profile to hacking Registry keys and hives.
Finally what worked for me -
Right click on desktop
Select Personalize
Click Themes
Click Change desktop icons
Click Restore default & OK
And instantly it began to auto refresh with a new folder, rename, delete, copy, etc.

Launch Client Console App from Web Page

I've been asked to launch a Console App from a WebPage. Sounds hairy, but there is sound logic for it.
Basically, the page is a Dashboard page which only super admins can access. We have a Console app which needs to run on the client machine. It cannot run headlessly on the server.
I figured I'd have some kind of small file which is downloaded upon the button click. Then that file could be run from the resulting dialog which would launch the exe.
I know apple does something like that with podcasts. You can subscribe by downloading a small link that would behave as I described and open iTunes.
I had a quick go using ClickOnce, publishing the application to IISExpress where I had my site up and running, but had no success with that.
Is ClickOnce the way to go, or is there some other easier approach?
I've also tried just adding a shortcut with a link to that shortcut nd adding .lnk as a mime type in IIS with mimeType="application/octet-stream". I had no luck there and received a 404 error which I have not been able to resolve yet.
Edit
I should also mention that the Console application is not just a single exe assembly. It has dependencies on a bunch of other 3rd party dlls.
I am assuming here that this desktop application needs to be executed at client side. Thus it will be installed by you or someone in your department i.e available to download.
If it is the case then what you need is to register URI - just like skype URI where href="skype:28347839" lanuches skype automatically.
For reference please click here: http://msdn.microsoft.com/en-us/library/ie/aa767914(v=vs.85).aspx
otherwise, get clickonce - -choice is yours.
As you say, just put the console application (an .exe file) on the server, and link to it in a webpage. When the user clicks on the link the exe file will be downloaded. The user can then run the exe file on their own computer.
There will be some warning dialogs about security issues, but if your users trust your exe then they can accept those warnings.
If you get the console application signed, and/or maybe use Group Policy on your LAN you might be able to reduce or eliminate those warnings.

The page you are requesting cannot be served because of the extension configuration

Well this morning I woke up to see that my site hosted on Windows Azure was producing 50X errors and in general being incredibly slow (up to 60 seconds response time).
Now after looking through the DetailedErrors folder I see that the error received is:
HTTP Error 404.3 - Not Found
The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
I tried creating a new test website and host it and guess what? I receive the exact same error here as well.
What could be causing this?
I found this for you.
There were more errors related to local machine below these errors.I looked up the net and after some digging figured out the solution to the problem:
Run Visual Studio 2008 Command Prompt as “Administrator”.
Navigate to C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation.
Run this command servicemodelreg –i.
for more info

Flex/Flash Debugging in the Browser

I'm having an issue with a Flash/Flex erroring in Firefox but not IE. I need to see the error that the Flash/Flex app is getting from the ASP.NET app. Is there any way to debug the response that Flash/Flex is getting?
Install the Debug version of the FlashPlayer for Firefox. Maybe this is already enough and an Error might pop up.
If not use the FlexBuilder and debug the Flex application. If you don't have a license for the FlexBuilder you may also use the Evaluation licence.
Remember that you can also observe the network traffic from firebug, even for flash apps.
Depending on how you are making calls to your ASP.net app - you could use something like LiveHTTPHeaders to see the url that your flex app is call and see what response is being sent back from the server (i.e. 200, 404, 503, etc...)
Also - you could use something like Charles to do the same thing but actually see the full response from the server (be it images, text, xml...) and not just the header info.

Resources