Silverlight 4: Business Application Template - silverlight

I am developing a Silverlight 4 application which is based upon Business Application Template.
I am interested to ask user to login and display a login form as soon as user arrives to my site. I need to makes sure that the user cannot see/navigate to any other page of the application until he/she logs in.
How can I achieve this functionality?

How about adding the following in your Home.xaml.cs.
LoginRegistrationWindow loginWindow = new LoginRegistrationWindow();
loginWindow.Show();
This will just prompt the user. You can check the status of whether he is logged on or not using the code in LoginStatus.xaml.cs

Related

DNN 7.4.2 Custom Registration / Login Module

I have DNN 7.4.2 installed. Besides standard registration/login I would also like to utilize Facebook,Twiiter,Windows Live, and Google authentication. However, I don't like the current workflow. I am now familiar using the Christoc templates to build custom modules, but is this what I want to do, or do I need to build a custom authentication provider. A lot of the examples out there reference old versions of DNN.
Here's the flow I want:
1) If User is not logged into site, check to see if they are logged into one of the social sites, and if so check their id to see if it is associated with a User on my site. If so, log them in automatically to my site.
2) If User is not logged in yet, display "Register" and "Login" Links on my menu.
3) If they click the "Register" link, a jquery popup should appear. Buttons for normal registration, and a button each for registering with one of the social sites should appear.
4) If they click on the regular registration, they should go directly to un-pre-populated registration form.
5) If they click on one of the social buttons, it should retrieve whatever info it can from the particular social site, and then go to the same registration form, but pre-populate the controls with the info it retrieved.
6) The registration form should have all the standard fields, plus a place for the avatar (which can be prepopulated from the pic retrieved from social site). In addition, I am using DISQUS comments, and so I want them to be able to enter their DISQUS login info and/or create a DISQUS account.
7) Once the user hits submit, only then is the User actually created. User should be returned to whatever page they were on when they started the registration process.
8) If User is not logged in, and they click "Login" link, a jquery popup will give them Username/Password controls if they want to login in standardly, and also have buttons for logging in with each of the social sites.
9) Id login is unsuccessful, jquery popup content would be replaced with "Unsuccessful" content, and content for retrieving lost usernames / passwords.
10) If login is successful, then they should also be logged into DISQUS.
If there is already a good module that will do all this, then I would prefer just to spend $100-$200 to get it. However, if there isn't, I would just like a push in the right direction on how to program all of this.
1) If User is not logged into site, check to see if they are logged
into one of the social sites, and if so check their id to see if it is
associated with a User on my site. If so, log them in automatically to
my site.
This point is unpossible. Every web page is isolated from each other. You can't determine that user is logged in or not in another webpage. Also you can't identify not logged user (in your website) to check if he is logged in with API (by userId).
I thnik all other points can be reached by this module: http://store.dnnsoftware.com/home/product-details/social-login-and-social-sharing.
While I thank Aram for his suggestion, I believe I am going to have to write my own custom authentication providers from scratch. I hate the fact that I could get no other responses. I also hate the fact that there is seemingly no good options for me to make a reasonable on-time module purchase to at least get something resembling what I need.

without username filed user only enter password! How

I have design a page where every time user go to page submit a code after entering a code or password then access all other website pages.
I know rest of work is achieved through Access Control List means only logged in users can access.
Now I need page where you can enter only password without enter username.
Here is an example click here
Currently this page is non joomla page ..rest of the site is joomla based.
How can I edit login page so that login page only have password filed.
also when user close browser he logout automatically
requirement is only one code is used thorough out the website for every user ....
Best Regards
Got to this directory
components/com_users/views/login/tmpl
Find default_login.php and modify it as per your usage. Make sure you are checking in active template directory.

UI credential popup is hiding behind the Services windows

i m sunil i have created a application that is written in visual studio in C language that i installed in my system , so it run as service .. but i want to put restriction to stop the service by popup a UI credential box , to stop seervice you need to fill the user name and password only then u can stop the services.. but the box is comming in back ground . so i am not able to see that popup box.i am using windows API ..CredUIPromptForCredentials().
can u please suggest that how to take that UI popUP in front so that user could able to pass the credentials. or any other API.
Thanks,
Sunil
you can check in which session the popup is running from the Taskbar. If it's in session 0 (the default session for system services)then you won't be able to see it. To get the UI in front you need run the popup with current desktop's loggedon user's session.
Read this article how you can invoke the process as user http://odetocode.com/blogs/scott/archive/2004/10/29/createprocessasuser.aspx
The code is in c# but you'll get the idea how it works.

Send data from silverlight application to a particular user in mvc application

I have an mvc application where you have to be registered to log in. So you have your profile page and etc... As a part of the application I have a chat for all users (silverlight page). You enter the chat from your profile page. You have a list of online users there (who logged in on the site and not necessary entered the chat page) but exchange messages you can just with users who did enter the chat page. Otherwise they won't see them. Here is my problem.
So, I want to realize next functionality: if user who didn't enter the chat page was chosen by another to start conversation in chat (silverlight), he should get a pop up message on HIS profile page (mvc) with invitation to the chat. I understand how to send data from silverlight to mvc through WebClient and json format. I don't understand how to reach particular user's profile page. I can think just about some database table with this kind of invitations and some timer on the profile page to check on them.
Please express your ideas, thoughts or opinions in this matter. I would appreciate any help. Thanks in advance.
Maybe you should check out SignalR.
Like you mentioned you need some way to signal another client about the message by checking periodically. SignalR does this for you and in modern browsers uses Websockets to make it even better.
It is very easy to setup and you can build a chat application in a few lines of code. Without the need to save messages in a database (when you don't want to).
Check out this blog post for a sample chat application:
http://www.hanselman.com/blog/AsynchronousScalableWebApplicationsWithRealtimePersistentLongrunningConnectionsWithSignalR.aspx

Windows Form Login

What is the easiest way to remember a users details within a winform application.
Basically I have an application which requires a login. How do I hold a session like value within the application so I can easily query who is logged in etc.
Here's more info on this subject: http://msdn.microsoft.com/en-us/library/aa348545.aspx

Resources