preventing users to copy displayed image in mvc 4 - asp.net

I'm developing a website in Asp.net MVC 4.
Part of the site must display images that their showing right is only belong to this site and users can only view this images through site without ability to copy them using either "save as .." option or copying image URLs using web developing tools.
How can I implement this scenario using MVC4.
These images can be stored either in web host or database. Witch one is preferred for this work?

Related

How can non-developers manage static html files that are a part of an asp.net mvc core app?

I need a way to let non-developers manage partial html pages within an asp.net mvc core app so the developers aren't being bothered with simple content updates like text and image swaps - ideally using wordpress tools / plugins we already have (ie. divi or some other method) to manage those html partials.
Mainly I want to be able to control the layout (header, footer, nav) with asp.net core but load the content either within or external to the application for each page.
Ideally when we make changes to these partials, we don't even need to rebuild the app and deploy, we can just save / publish the files and move on, leaving the developers focused on their application jobs and the web updates can be handled by designers and project managers. I need suggestions on best practice workflow in this situation and tool recommendations - would I need something like a Joomla or Drupal or would Wordpress (ideally) be able to author partial pages that the asp.net core app can then link to and display?
We are using wordress plugins so non web developers can build and manage web sites and pages with little to no coding. We also have a few web developers who are programming applications needed by the org. These developers are getting requests that don't / shouldn't require a developer to complete, but some of these pages live within an older asp.net application we are updating.
You have a number of options
Partial Views
The Views in ASP.NET are not compiled during deployment. You can edit them on the production server real-time without affecting any deployment process. They are compiled real-time. All you have to do is press ctrl-F5 in your browser to get the latest views from the file system.
Options for Workflow
Refactor your content so that the partial views contain only content that is to be edited by the non-developers.
This would mean that the partial views that the non-developers edit contain only html and no razor-type code.
If you really don't want the non-developers touching the source code directory, including the views, you can have the content that they provide stored in a database.
This way in your controllers, you can check the database for the content the non-developer has stored, and save it in a ViewBag variable. That way the non-developers are not touching any of the source code
Content Management
If your non-developers are going to have access to source code files, why not just five them FTP access. Updating Views real-time is perfectly fine. Or you can look into using Subversion source code client to keep a version history

Edit or change or manage an existing website or web pages (which were created by a different CMS or VS asp.net ) by a new CMS

If we already have a website and web pages(created by VS asp.net) can we able to edit or change or manage these by a new CMS?.
It is highly unlikely. It may be possible to partially accomplish this via a converter tool (something that can parse the .NET site into another CMS) or a scraper tool (something that scrapes the HTML content of the live .NET site and formats it or imports it into a new CMS).
Neither of these, though, if even possible/available, will result in an exact copy of the site in another CMS.

Use web application project and call it from Web site

I already have one existing website project which is in production. Now i want to have another different functionality with set of new pages. So i want to keep another web application project and refer the same in my existing website.
Button click in my website will call my webpage in seperate web application project.
Am not using M.V.C
Is this possible? Can i host my newly creating web application along with my website?
I have tried to call webpage from website to my web application. It is working. But is this the correct way?
what is the best way?
You can point your new domain to previously hosted website. Also you can use url rewriting to show whatever url you need to display to user.

Create Thumbnail from url using asp.net 2.0

Can any one help me on how to create a thumbnail from a url.
when the user saves a link, i want to show the screenshot of the web page as a thumbnail
i am using asp.net 2.0
Thank You
If you need to do this yourself, you can use the Winforms WebBrowser control in an ASP.NET application, with a few caveats:
It needs to run in a single threaded apartment thread
It might not work on all pages, such as pages which require Javascript or Flash interaction
Here are a few links to some walkthroughs:
Build A Self-Caching ASP.NET Web Site Thumbnail Control
How To Get Web Site Thumbnail Image In ASP.NET
I'd look at using a webservice like thumbalizr or WebShotsPro.
alt text http://beta.thumbalizr.com/app/thumbs/?src=/thumbs/onl/source/78/78f5e5a94c19c2999b1dc6eec3a2f2bf.png&w=640&q=0&enc=

How can I display an ASP.NET MVC html part from one application in another

We have several asp.net MVC apps in the following setup
SecurityApp (root application - handles forms auth for SSO and has a profile edit page)
Application1 (virtual directory)
Application2 (virtual directory)
Application3 (virtual directory)
so that domain.com points to SecurityApp and domain.com/Application1 etc point to their associated virtual directories. All of our Single Sign On (SSO) is working properly using forms authentication.
Based on the users permissions when logging in a menu that lists their available applications and a logout link will be generated and saved in the cache - this menu displays fine whenever the user is in the SecurityApp (editing their profile) but we cannot figure out how to get the Applications in the virtual directories to display the same application menu.
We have tried:
1) Using JSONP to do an request that will return the html for the menu. The ajax call returns the HTML with the html; however, because User.IsAuthenticated is false the menu comes back empty.
2) We created a user control and include it along with the dll's for the SecurityApp project and this works; however, we dont want to have to include all the dlls for the SecurityApp project in every application that we create (along with all the app settings in the web.config)
We would like this to be as simple as possible to implement so that anyone creating a new app can add the menu to their application in as few steps as possible... Any ideas?
To Clarify - we are using ASP.NET MVC 1.0 since these apps are in production and we do not have the okay to go to ASP.NET MVC 2.0 (unfortunately)
Have you thought about using Single Project Areas?
Areas allows you to partition your application into discrete areas of functionality. It helps make managing a large application more manageable and allows for creating distinct applets that you can drop into an overall application.
There is a version of Areas that works in MVC 1.0 available here: http://haacked.com/archive/2008/11/04/areas-in-aspnetmvc.aspx

Resources