Page Authentication in Silverlight 4 Navigation Application - sql

I'm pretty much a newbie in programming C# and I've been looking for quite some time now.
I need help with page authentication in a Silverlight navigation application.
I have a SQL Database running and a WCF service that gets the credentials out of that database. When the user is logged in he needs to see a link in the upper right corner with his profile.
How can I do this without using any help from silverlight? Is this even possible? Can I write a class that says "this user is authenticated and can see the following pages" on my own?
This is a really urgent issue. So thanks in advance for anyone's help!

Firstly use AspNet Membership ,
Most of classes you need implemented yet.
This link shows you how to setup membershipt tables to your SQL Server DB.
http://weblogs.asp.net/sukumarraju/archive/2009/10/02/installing-asp-net-membership-services-database-in-sql-server-expreess.aspx
In membership struct you can register,delete, lock - unlock ,store user details operations,... and more easier.
Here is an article explains implementation of membership for you,
http://blogs.msdn.com/b/kylemc/archive/2010/05/10/using-asp-net-membership-in-silverlight.aspx

Related

Maximum number of claims

I have an asp.net core web app and I am using the built-in authorization system from Microsoft.
I have a number of areas, controllers and actions; every area, controller and action has its own separate claim.
I am running into a problem in that the webapp just crashes after a user logs in (no errors in output window). I am guessing this has to do with a maximum somewhere but I am not sure.
Is it ok to use 200+ claims?
The documents / tutorials I found are not clear about this.
Ruud answered the question. https://leastprivilege.com/2016/12/16/identity-vs-permissions/ look in the comments above.
The link states claims or not meant for use in complex authorization.
I ended up building my own autorization system.

MVC4 and Simplemembership

I am somewhat of a novice application developer, certainly very new to MVC4 and have been through a number of handy tutorials to learn the core principles of MVC. I do get lost with terminology as someone who is entirley self taught.
I am trying to replace an application I wrote previously that uses ASP.net membership which I was able to create myself. This application is an issue logging and reporting system that does a lot with an SQL database.
I have no concern dropping all the users and rebuilding the user database in the new simplemembership provider. Although, I am not sure where to start.
I feel as though using the ready made "internet application" template means I end up with loads of files / folders I do not need (or understand), so my question is, how to I start with MVC4 and simplemembership, ideally without using the "internet application" template.
Thank you.
The Internet template does not add that many unnecessary files. It will add controllers, views, and models you will need for handling user log-on and registration. If you start from an Empty MVC project you will have to create these items from scratch. If you want to start from scratch I would take a look at the open source project SimpleSecurity that decouples SimpleMembership from your MVC application. There is an article here that describes this approach which will make it easier to incorporate SimpleMembership into an Empty MVC project. You can look at the example in the SimpleSecurity project so you can copy the controllers, views and models you will need. The example adds email confirmation and other features that are not available in the Internet template.
There are some unnecessary files, but it depends on how you define "unnecessary".
If you don't care about signing in with a facebook or google account, and you don't care about WebApi, and you don't care about knockout.js and other stuff, you're free to delete it. You can use Nuget to uninstall the Webapi stuff. And you can also remove the OpenId stuff, but you will have to modify your AccountController to remove the code that makes use of it.
It would help if you could ask specific questions.. vague questions like this are hard to answer because we don't know what's unnecessary for you.
Thanks for your help, I know my question was vague, but I was only able to build my new site from an empty template by following this guide.
I have changed a few things (i.e. an instance of SQL rather than local DB) and it all worked.
How to add ASP.NET Membership Provider in a Empty MVC 4 Project Template?

JSF 2.0 authentication

I know there are a lot of other question about this topic but I haven't found the right solution for my case.
The landscape is like that:
Backend runs on a tomcat and provides some services. Amongst others there is UserService.login().
The Frontend (JSF 2.0, Spring 3, OpenFaces or Primefaces) which i should implement runs on a different tomcat. I need to implement the security level in the frontend. For sure I'm searching for the best framework (seam, spring security, jaas). And if you know a good tutorial it would be great if you let me know. i can send username/password to the backend and receive a User with id, username and role.
I found lots of tutorials, but i didn't get it work properly. Can anyone help me?
I probably can't explain the whole thing. But you can follow these links and should get you want you need.
First setup basic JSF-Spring Security application like in this link . Here the author did hard code the user details in the applicationContext itself for simplicity. But for your requirement you need to implement a custom UserDetailsService and which is the authentication provider where it loads the user details from the backend. You can take a look at this link.

Objective-c web form based authentication

So I am working on an iPad app that needs to talk to our company server to pull in some XML. In a browser, when the user tries to first navigate to the site, they are redirected to an SSO form that generates a cookie that is saved.
Now my application may need to replicate this behavior and generate the cookie so we can pull xml data off various parts of the site. I have never done anything like this before and there is very little documentation on the web so I am really looking for some general guidance. So far I have tried doing something like this, here.
That works to return the web form, but where to go from there eludes me. Does anyone have any ideas they would like to throw out? Essentially all that I need to do right now is authenticate the user's credentials, and save that verification. If there is an easier way to do that based on this template, I would definitely be open to suggestions. Any help at all would be greatly appreciated.
What i use for a lot of my networking is ASIHTTPRequest it is an API that is available, instead of trying to use low level sockets or the Apple APIs, with a decent guide and an active Google Group for questions. It can certainly handle xml requests as well as authentication. Here is a link to the site, ASIHTTPRequest

Creating a login section - Im new an need some serious direction please!

Alright. So I am new, I know my way around html pretty well, and have gotten by for a while now doing so. But today I am presented with a seemingly simple issue.
My client needs the ability for users to create their own LOGIN/PASSWORD, my client wants to be able to MANUALLY approve visitors. And he want to be able to track how many times they login.
The login section will just be about 4 pages of PDF file downloads.
I cant imagine this is the hardest thing in the world, I just have no clue where to even start. Perhaps there is a code already written, as things like this are done every day using forum technologies...
Please help!
It may also help to mention that I am using Dreamweaver cs4 on a MAC
I'd check out Ruby on Rails if I were you. It's pretty easy to get something quick up with it that you can have users create accounts with that send e-mails to the client with approve/reject options, and be able to track downloads and users via MySQL or other databases.
I've found Agile Development with Rails to be a great source of info on how to do stuff like this (they do an online bookstore as the book's example) and with a little modification I think it should work for what you say you want to do (and the book is pretty cheap as far as programming books go).
If you want just really basic static login features without lots of coding, you can start with Password protecting your pages with htaccess. You can password protect directories like this without any effort at all. This way, you can be sure that your login routine is secure.
Then, you can continue with advanced features like account administration and login statistics. These will require some programming skills.
Tracking count of user logins should be easy too. You can put simple PHP code to the source of protected pages that will save the info about login to the database. This will require you to study some basics of databases. You can use plaintext files which is not as clean but much easier and it will allow you to export info for your client more easily.
If you want to do it profesionally, you should invest in learning about web development or hire someone to do it for you. These tasks might not be trivial.
Have you worked with PHP, ASP.Net or some other web language yet? What you're trying to isn't too difficult in the grand scheme of things but it may be somewhat challenging if you haven't programmed before and/or haven't had any experience with web development.
(P.s. Alter your question as a response and comment on my answer when you're finished.)
As you are looking into Ruby on Rails, take a look at bort which is a RoR app skeletton with RESTful authentication included, it should help (Chris Bunch answered on the general RoR question).
There is also this bort fork. There is also Authlogic which may be easier to work with.
Have a look at the ASP.net Membership provider and also the login controls which provides the UI for the login as well as registration screens out of the box.
Here is a Multipart Series on ASP.NET's Membership, Roles, and Profile
If this is too complex than probably you can also design you application from scratch using ASP.net. If you don't know asp.net than the best place to start is www.asp.net it has several videos and tutorials which would help you get going soon.