Protecting Vidoes from downloading in asp.net - asp.net

Language: C#
Skill: Beginner
Tool: Visual Studio 2010
Technology: ASP.NET 4.0 WebForms
Hello StackOverflow,
I intend to develop an asp.net web app for my final year project (to complete my bachelors degree) ,Scenario is that I want to allow users of the app to post videos(vidz) and these vidz can only be watched by the user who is allowed by the owner of the vidz ,further more the viewer should only be able to view the vidoes...
I came to know about the DRM solution of silverlight but i think its comes with some cost ,so for me its unaffordable..

it's a bit of a kludge but I used the approach below to protect images from being downloaded without the right cookie being set ... a variation could be used to hide the video from random attempts.
if you need to be really certain that it's protected then a solution like PlayReady is going to be the answer, but if you just need to avoid casual "fly-by" then this might be enough
http://blog.offbeatmammal.com/post/2006/06/30/Using-ASPNET-to-restrict-access-to-images.aspx

If you're using ASP.Net MVC I recommend you to take a look at this project:
http://mvcresumingactions.codeplex.com/
By adding authorization layer on top of your controller you can easily manage access to that controller based on your own logic (Like members who have access to that video). For more information about authorization you can take a look at:
http://nerddinnerbook.s3.amazonaws.com/Part9.htm
I know this is little bit generic but I hope this can give you some clue :-)

Related

How can make a query string like facebook.com/username?

I am building a website with asp.net. But I have an issue: I want to make user profile page link like in facebook.
For example,
"hostname.com/username" instead of "hostname.com/profile.aspx?something=something"
How can I achieve this?
Thank you for your time and valuable answers.
That feature called "URL Routing". If you are using MVC, then MVC Framework has That feature included. But if you are using Web Forms application, then You have to do this manual.
For Web Forms application, You can use Nuget Package Microsoft.AspNet.FriendlyUrls to make your application so that it generate url's what you want.
Refer http://www.devcurry.com/2013/05/friendly-urls-in-aspnet-web-forms.html
http://www.hanselman.com/blog/IntroducingASPNETFriendlyUrlsCleanerURLsEasierRoutingAndMobileViewsForASPNETWebForms.aspx (This is microsoft suggested)
This is typically done with a framework of some kind, but the concept it fairly simple --
If you're trying to do this quickly, you'll want to do your research on which one to use, but I'll explain the principle that makes it work -
In your server config (like an .htaccess) - you will rewrite the requests for *.aspx files go to a central index.aspx - this file then bootstraps your index however you want -
In your case, it would take the /username portion and query the database for a user with that username, fetch the associated data, and do whatever with it.
It's a relatively simple concept, and you could write something of your own device to bootstrap the request to your code, but you're probably better off looking for some (micro)framework that handles all that for you...
Good luck - !

ASP.Net identity framework as a form of authentication?

I am a little confused as to how the identity framework works. For example in VS 2013 we can create an MVC application that the authentication is individual user accounts. Once we create it we can register with a username and password. But what if we wanted to have also a DOB in the registration or some other fields such as email or phone etc? Can we do this with the identity framework? What about the way the data base is structured, can we have a custom structure? Or if I want this should I be using forms authentication? Also what is the difference between the Identity framework and Forms authentication in terms of authentication?
Although your post has already been marked as answered, I’d like to add a little more info for future readers.
The first thing we need to understand with VS and Microsoft is that they’ve always tried to provide us with Templates to help us get started. There are many Pros and Cons to using Templates but the idea is that it gets you started quickly without having to manually include stuff yourself.
The idea of Templates is great but to the untrained eye, it provides Microsoft an opportunity to include stuff that THEY think you’ll need or better yet, what your application will need.
This opportunity includes promoting products such as Identity, Knockout.js etc...
In short, Microsoft is not wrong in doing that since the majority of the people do not second guess what is included in their project and because they…well…trust Microsoft.
A great analogy is when you purchase a new computer from a major retailer. When you arrive home and start your computer, you quickly notice that you have a bunch of pre-installed software running in the background (that you never asked for).
To the untrained eye, they will never realize that these are running in the background and their computer will work regardless. But for someone that is aware, he will most likely uninstall all of them and have a cleaner plate.
So Templates are similar to this...
As for the rest of your questioning, I’m sure by now you’ve found the answers.
Even though Microsoft sells ASP Identity as a single solution, Forms Authentication and Identity (Membership) are two distinct frameworks that work together, but serve different purposes:
Forms Authentication manages authentication session/cookies.
Membership/Identity is the store for user information (credentials, user demographics, etc.)
Look here for some additional information and links.

Deciding which tools to use for a web project (SharePoint, Workflow, ASP .NET)

I have a question about a project we are planning to develop.
I will start by describing the project and later I will expose the possible approaches I see to tackle this task. I hope you can give me your opinion on them.
There are 2 main parts:
First part:
In our organization we want to create a kind central access point where users will log in (just one time) and from there they will have links (depending on their roles) to the different services we provide.
Approach:
We are using Active Directory to manage our users, so we thought to create this central access point with SharePoint Foundation.
Do you think that it is a good approach?
Second part:
We have services as a SharePoint were users can share documents, and also other web apps. The idea is to integrate all that in to the previously described central access point.
So far, so good. Now we were asked to develop a new web application. This application will be also part of our services; therefore will be needed to integrate it in the central access point.
Description of the application: It will be an application were 3 different roles of people will fill some information (in an specific order, 1st role will fill in, then the 2nd role, and then the 3rd role). After each step of filling information the next person will be informed by email that his/her part is ready to be filled in. The information to be filled in is an evaluation of a product (just for your information).
The managers of the organization will also want to have a control panel were they can have some statistic over the use of the application. There they can see thing like pending evaluations, evaluation per year, per role, …
Approaches:
As you will see our main doubt are about using
SharePoint Site <--> ASP .NET Pages (C#)
Workflow (SharePoint Workflow or just Workflow Foundation) <--> Using some flags in the internal code to control the workflow
We were thinking to:
1- Giving the idea that we would like to use SharePoint for our “central access point”. We would create the app as a SharePoint web (Using SharePoint Designer 2010 if possible). And apply the SharePoint Workflow to the process.
2- Create an ASP.NET Site and export it as a web part that we can integrate as an application in SharePoint. Try to use somehow the SharePoint Workflow on that. (We actually don’t know well how to do it).
3- Create an ASP .NET Site and forget about the Workflow tools, as our workflow is quite small and sequential, and control all that in the code with some flag.
What do you think about our ideas at the moment? Would you propose us something different?
Thank you very much for your help
Our SharePoint is the free version SharePoint Foundation.
Option 1 sounds the best fit for your approach as long as the web-app isn't aspiring to be something totally outside SharePoint bounds.
As far as basic workflow support goes, the SP Foundations should not be an issue. Refer this article for further details on workflow support in SP Foundations
Options 2 and 3 sound a little adventurous and will involve a lot of custom code which SP will provide you OOTB anyways.

Providing SaaS functionality to a .NET portal with DLLs

I'm not sure I'm asking the right question here, but I'm looking to provide web based functionality from one ASP.NET application to another remote 'portal-like' application. Is it possible to simply give the portal a DLL? As an example, let's say the SaaS web app has a patient-entry form that I want to be able to use from the portal application. I would like the portal app to be able to set preferences (permissions, color, style, etc), make a function call, and have that capability presented within a certain div or something. Is there any .NET technologies that provide this kind of integration?
EDIT:
Here is a link to a quick diagram I made trying to describe the scenario: http://img.ly/ESG. I know there are other ways of doing this (eg JSON-P calls), but I need to give the portal developers something they can control on their end. Also, if anything changes they'll know I will send them a new version of the DLL which will indicate to them the new functionality.
I'll give you a shopping list of things to check out:
DotNetNuke:
http://www.dotnetnuke.com/
Workflow Foundation -
http://msdn.microsoft.com/en-us/netframework/aa663328.aspx
Microsoft SAAS platform -
http://www.microsoft.com/serviceproviders/saas/default.mspx
Depending on exactly what you're looking for, you might also research "multitenancy".
To answer your original question, yes, you can do it with DLL's, but there are easier ways to do it.

Web App architecture questions

Background:
I am an intermediate web app developer working on the .Net Platform. Most of my work has been defined pretty well for me by my peers or superiors and I have no problem following instructions and getting the job done.
The task at hand:
I was recently asked by an old friend to redo his web app from scratch. His app is extremely antiquated and he is getting overwhelmed by it breaking all the time. The app in question is an inventory / CRM application and currently each customer requires a new install of the app (usually accomplished by deploying it on a different domain on the same server and pointing to a new database).
Currently if any client wants any modifications to the forms such as additional fields, new features, etc my friend goes in and manually adds those fields to the forms, scripts, database etc. As a result all installs of this application are unique. There is no one singular source repository and no one single version of this app. Generally new features are overtime rolled into the other sites, but still this is done on an individual site by site basis.
I will be approaching this on a very modular basis. Initially I will be coding a module that will query an external web service for some data, display and store it, and periodically update it automatically. The next module will likely be for storing and displaying inventory data. This way I want to over time duplicate the current feature set of his app 100% but do it incrementally.
The Million Dollar Questions
I want to make the app have user
configurable form fields. The user
should be able to go to an admin
page, create a new forms page of a
certain category, and then specify
what fields he wants in there. He
could say 'create a new text field
called Item # and make it a
requirement" and that will get
stored somewhere. All forms will be
dynamically rendered to screen based
on what the user has configured. Is
this a good way to go about the
problem of having no idea what a
customer could want in a form? and
thus be able to store and display
form data of any sort ? What sort of
design pattern should I follow here?
I am familiar with asp.net and
the .net framework in general and
have decent knowledge of javascript,
html, silverlight, jquery, c# etc
etc. I can work my way around web
apps in a good way, but I am not
sure what sort of framework or tech
I should use to accomplish this
task. Would ASP.net 3.5 webforms be
the way to go? or should I look into
ASP.NET MVC? Do I use jquery and ajax for
complete decoupling of frontend and
backend ? or will a normal asp.net
page with some spattering of ajax
thrown in working with a codebehind
be the order of the day?
Just looking for general advice before I start.
I am currently thinking of using ASP.NET 3.5 webforms, jquery for clientside animation, ui, manipulation and data validation, and sqlserver + a .net or wcf webservice for backend.
Your advice is much appreciated as always.
I've recently implemented a white-label ecommerce system for an insurance company that allowed each partner to choose their own set of input fields, screens, and order the flow of the application to suit their individual needs.
Although it wasn't rocket science, it added complexity and increased development time.
Consider the user configuration aspect very carefully In hindsight both my client and their clients in turn, would have been happy with a more rigid system.
As for the tech side of your question, I developed my project in VS2005, using asp.net webforms and webservices with a SQLserver back end, so the stack that you're looking at is definitely capable of delivering a working product. ASP.net MVC will almost certainly help as far as testability goes.
The biggest thing I would change now if I was going to start again would be to replace the intermediate webservices with message based services using nServiceBus, MassTransit or the like. While the webservices worked fine, message based communication should be quicker and more reliable.
Finally, before you start to code, make sure that you understand the current system's functionality inside and out. If the new system doesn't do something that the old system did, it will be pretty obvious to the end users straight away.

Resources