pdf not opening in ie in production evironment with load balancer - silverlight

I have a silverlight application with browsercontrol that needs to use Acrobat PDF Reader to display PDFs in the browser. I am using Acrobat Reader XI and internet explorer as browser. When the application is in the Stage environment everything works fine. However, when the application is in the Production environment pdf does not load or partially loads and stops. There is no difference between the two environments except production environment uses load balancer. The even weirder thing is that Production work and PDF loads when we hit a specific server URL instead of the load balancer URL. Why is it not loading. Why is this happening and better yet, how do I fix it?

Remember that Silverlight is a client technology. While you downloaded the initial site through the load balancer you live then on the client.
So the question is how do you load the pdf within silverlight?
If this is a direct url not through the load balancer the pdf file will not see the load balancer.
If the acrobat reader opens or not depends on the response mime-type and with pdf's this is a disscussion on its own.
Here you find a good stackoverflow question with an answer:
Proper MIME media type for PDF files
HTH

Related

In browser pdf viewer not working with React App

My web app contains many links to various pdf files which are stored in Amazon S3. When I click on these links, the pdf file is downloaded even though my in browser, default, pdf viewer is enabled. If I install a third party pdf viewer, this fixes the problem, but I don't want my users to have to install an extension.
I tried adding each pdf link to the Google Docs pdf viewer url, but because these S3 pdf files are protected by their bucket policy, this doesn't work. I am 100% sure my default pdf viewer is enabled correctly, it works for other pdfs on the internet.
Has anybody run into this bizarre problem? Could I fix this with PDF.js? I am pretty sure the source of the problem is due to the pdf files being uploaded to S3 using http requests and not via the s3 client, but I still have no idea how to fix this.
I was able to upload PDF.js to my s3 bucket and concatenate the viewer.html to the pdf links on my apps, now everybody can view pdfs in browser without having an extension

Chrome desktop application for web based product

Chrome desktop application for web based product. Is this possible in chrome web apps
Product has following items
Angular JS --- Front-end framework
Rails --- JSon Communication
I have created the chrome desktop apps, which will directly open the site with icon. It's more feel like desktop application. In any OS it will run. The thing is working fine.
Problem:
It will always download the js and css files.
How i want to develop the chrome desktop apps
When launching the chrome desktop app, save all the assets locally.
Whenever chrome desktop app launched, it should refer the locally saved assets (I mean angular js files and css)
Before launching the chrome desktop app, it should request the server whether the assets are changed or not. If changed delete the locally saved files and save the latest one.
If assets are not changed use the old assets files. In this way, we can avoid the initial loading of all the files from the server.
Anybody did it previously or chrome provide any options for this?
Ideas are welcome!
Its totaly possible.
Read these docs: https://developer.chrome.com/apps/offline_apps
By myself i pack the css and javascript into the chrome app so you never have to download them on startup. But in your context its more like a webview app with caching functions.
You can use indexeddb or other local storage APIs to store assets in the client computer.
You can solve this on the web app side by employing ApplicationCache, which specifically fits what you describe.
Using the cache interface gives your application three advantages:
Offline browsing - users can navigate your full site when they're offline
Speed - resources come straight from disk, no trip to the network.
Resilience - if your site goes down for "maintenance" (as in, someone accidentally breaks everything), your users will get the offline experience
The Application Cache (or AppCache) allows a developer to specify which files the browser should cache and make available to offline users. Your app will load and work correctly, even if the user presses the refresh button while they're offline.
While it is primarily an offline-fallback technique, it allows you to cache resources locally just for speedup purposes. Actually having an offline fallback is a bonus in this case.
Actually building a Chrome app for this will probably not help - you cannot update local resources from your web app side, you'll need to update your app through WebStore channels only.

Flash file upload in Domino and CDN

I,m using the flash file upload solution to attach files in Domino applications.
Basically it works with dojo and flash.
It was working normally. The Security Information area decided to change the browser security (IE 8)to high.
The solution uses CDN and stopped work. The question is:
Is there way to copy the content from CDN to local network? How?
Is there a personalized configuration in IE that permits access to CDN site?
Thanks a lot!
Marcus.

IIS and WPF video streaming

I need someone to point to right direction in both silverlight in WPF video streaming.
I have two projects, one is a Silverlight web page and the other is a WPF project. The goal is, on the WPF application the user is able to upload a video to the server, and the Silverlight web page streams it using a any web protocol (most likely http).
I'm using Expression Encoder SDK to build the code that re-encodes the video files (since the original video files will be very big, over 1gb each), and so far I think I've got it right, but now I need to stream it on the web, and I'm not being able to do so.
The silverlight web page is hosted on a Windows Server 2008 R2 with IIS 7.0.
I've been reading about IIS streaming, but everything I find points that every time the user wants to add a video, it must go to IIS interface and add it manually, and that cannot be the only way, since the user knows nothing about IIS.
If possible I would like some code examples on how to achieve streaming through IIS, and some pointer on what I could do, or am doing wrong...
Thanks
I dont see why user have to manually do it everytime in IIS. From your WPF app, make it store your video in a specific location inside your IIS. Also do a one time configuration in your IIS to deliver the video extension you are uploading, if its mp4 or wmv, give it the MIME type, "application/octet-stream", so when a user requests it, it will be delivered by IIS.
No, configure your silverlight app to read the file from your IIS directory (you must be knowing the filename it got saved in IIS in the first place.)
If you need to have a "streaming" experience, IIS won't be enough, you will have to use a streaming server like windows media server or flash media server.
Hope this helps.

Understanding Silverlight, MEF, on-demand Xap loading and caching

I'm currently successfully using MEF to load-on-demand Xaps in my Silverlight 4 application. I am now looking into increasing performance through the use of caching. It is my understanding that MEF uses the WebClient to download the Xap, which in turn will use the browser's downloading mechanism, and is therefore subject to its caching policy.
In my testing, the results I'm seeing are slightly confusing, and results differ between browsers. Obviously, on the first access, with my cache cleared, the on-demand Xaps are requested from the server. And, for the duration of an application session, Xaps are downloaded only this once. All good so far.
However, I was expecting (or at least hoping) Xaps to be cached between browser sessions as well. But no - I observe the following (using fiddler):
Internet Explorer
If I refresh the browser (Ctrl+F5) then the on-demand Xaps are not requested from the server, and are loaded from the local cache. But If I restart the browser, then everything is downloaded again. Boo.
Firefox and Chrome
If I refresh the page (Ctrl+F5) then the on-demand Xaps are requested again from the server - no caching occurs at all. Boo. And obviously, no caching occurs if I restart the browser.
The ideal behavior for me is for the browser, when it needs to load a Xap, to query the server with an If-Modified-Since header to see if a new version exists, and if so download it, and if not, load it from its local cache. But in none of my testing did I see an If-Modified-Since header sent to the server. So my question:
Is there any way to achieve this transparently using MEF? Or another framework? Or do I have to roll my own caching layer using isolated storage (yuck)?
Seems like on-demand Xap loading should go hand in hand with caching, so I'm surprised this doesn't just work out of the box.
OK I figured it out just after I posted this question. I thought I'd share the solution here in case anyone else has the problem:
I was using the built in Visual Studio web server to host my project. It appears that it doesn't support caching at all. But as soon as I hosted my project in IIS, I saw the exact behavior I desired, specifically:
The ideal behavior for me is for the
browser, when it needs to load a Xap,
to query the server with an
If-Modified-Since header to see if a
new version exists, and if so download
it, and if not, load it from its local
cache
In Internet Explorer at least, I can now see it sending If-Modified-Since headers, and receiving the 304 Not Modified response for recently accessed Xaps. Perfect!

Resources