Simple 2 way encryption for image - encryption

In my browser based application,we have to encrypte the image in the server side,and then decrypte it in the client using flash or other language,then display it.
First, I try to use the "System.Security.Cryptography" int .net2 to do the encrypte,but I am afraid in the client side the image can not be decrpyted using flash or others.
SO I wonder if there is some solution?

Why don't you deliver it via a Secure Socket Layer?(HTTPS) Just force it for all the site if you want.

Related

MVC 4 not redirecting to mobile for Android v4+?

I am finding certain devices are not being redirected to the .Mobile.cshtml counterpart automatically. Is there a way to fix this or force mobile based on screen resolution via HttpContext.GetOverriddenBrowser method?
You could try to add a little piece of Javascript to create a cookie with Javascript's
window.screen.availHeight
window.screen.availWidth
and then on the server side inspect the cookie in the _PageStart.cshtml (which runs before each page is returned) and and if it meets your requirements override with
HttpContext.SetOverriddenBrowser(BrowserOverride.Mobile)

Implementing back-forward in a Flex application

I'm responsible for a Flex application which shows cards/tiles. A click on each card sends a request to the server and then the Flex app renders new cards from the data returned from the server.
Now I need to add a back-forward functionality, so that after several clicks on cards, I will be able to return to the previous requests. As I understand it, I just need to save some kind of a stack of URLs which were sent to the server.
The need is for regular back-forward, so that if I'm viewing card X, then click back and then click on a different tile, I can drop card X from my data structure and forget it.
What data structure would you recommend using? Any examples?
Thanks.
Use SWFAddress and simply use the browser's back/forward functionality. Here's a video tutorial to get you started.

Centralized image server with security and water mark on it

I have a situation where I have to make a centralized image website. I want to secure those images from direct access. I want to send response with a watermark over it depending on request parameter. What is the best approach for it.
So far I have created a content website and directly accessing image.
Should I create handler from response.
But if I use handler will it be slow (response).
Kindly suggest me the best approach.
An image handler is the way to go, you will be able to check the http header referer and only serve image when appropriate.
There is an article on the code project that has all the parts you need:
http://www.codeproject.com/Articles/126421/Image-Handling-In-ASP-NET
You'll have to ignore certain sections and expand on others, but there is basically everything you need in the article.
This might help you: http://www.naveenbhat.in/2012/06/directory-security-on-webservice-with.html
Here, I created the handler for html and pdf types. You can implement the logic in same way for image.

Synchronize flash video on multiple PC's?

For an event we need the following setup:
Multiple computers running a kinda of quiz (in asp.net). Every one of them plays a video as background (in the browser), sorta like a screensaver (with advertising). When moving the mouse a div pops up which allows the user to choose a quiz in fill out the forms. The catch is that the video needs to be synchronized on all the PCs.
These are the constraints:
The asp.net code is already there, so writing it completely in flash is no option.
We know .NET, javascript, html, the standard webdev stuff best, so investing time is something new is a last resort.
Any suggestions?
The way I see it, you have a couple options here:
1) Hack together synchronicity using a server-side timestamp passed to the Flash clients. Give the client the current time (server-side) and the time you want playback to begin (server-side, also). Then have the client wait that many milliseconds.
2) Configure your media server to stream the video as though it were a live feed. I am 90% sure this is possible with Flash Media Server, but I've never had the budget to manage my own video server.

Can I programmatically tell when a new tab is opened in the browser?

I'm addressing a problem with an ASP .NET web application where I want to avoid using query strings to uniquely identify dynamic content. I want to index the content relative to the opened tab/window that is displaying it. Is this programmatically possible? If so, what is the compatibility of the approach across multiple browsers? Thank you for your help.
No. It's not really any different to the user opening a new browser window, or opening the calculator application to work something out, etc. It happens outside the context of your web page and, short of a browser plugin, you can't get notification of this.
No, it's not possible by "tab" (i.e., browser window instance).
The closest you'll get is to drive new page requests off of session data established in previous requests but that's really a far cry from what you're asking asking for.
I'd tell whomever is "tasking" you with this that they are a moron you can't change the fundamental communication protocols of the web.

Resources