|
I have made a login-page and have users.
Is there a way to see what password the user have?
It doesn´t seem to show when you click "manage users".
|
|
|
|
|
There a lot of methods to using login..
Some use active dr, some can be stored in the database..
I am sure you can get their password but a better question is should you ?
I would say prob not, instead build a way for them to reset it and you too reset it... best not to care what their password is, as long as follows your security rules.
=)
|
|
|
|
|
You should never be able to see users password, if you do, so will others do. Have the rights to reset as suggested. Anyways, why do you want to see them?
I remain joe!
|
|
|
|
|
The thing is that I am teaching a class and would like the students to be able to see what password they have chosen.
Then again I only have to make sure that they write the passwords they choose.
|
|
|
|
|
Use a select statement and bind to the data to Grid... I still believe that seing passwords is wrong, people have to memorise their passwords, have an option to reset it and a forgot password option... I always encrypt my passwords - seing them will not make a difference. Hope that you are sorted.
I remain joe!
|
|
|
|
|
Please don't do that I don't know what age your students are but in my opinion even the youngest kids should know that their passwords are personal and should not be shared nor written.
If I recall correctly the asp.net application by default stores passwords as hashes, so without altering configuration you won't be able to read them. Like the others suggested, please just implement reset password.
--
"My software never has bugs. It just develops random features."
|
|
|
|
|
My students are about 16-20 years.
I think I will take your advice
Thanks!
|
|
|
|
|
larsp777 wrote: The thing is that I am teaching a class Teaching them the wrong things is really not helping. Maybe you should take some more classes first.
Veni, vidi, abiit domum
|
|
|
|
|
Richard MacCutchan wrote: Teaching them the wrong things is really not helping. Maybe you should take some
more classes first.
What do you mean are the wrong things?
|
|
|
|
|
larsp777 wrote: The thing is that I am teaching a class and would like the students to be able to see what password they have chosen.
Need I say more?
Veni, vidi, abiit domum
|
|
|
|
|
Richard MacCutchan wrote:
The thing is that I am teaching a class and would like
the students to be able to see what password they have chosen.
Need I say more?
Well, although I´m not a superexpert in the subject I think it´s a valid question. The answer seem not to be a simple one either given the answers.
What I wanted to know was if you in a simple manor could view the passwords if the students forgot them.
I really don't know what you mean by "teaching them the wrong things."
If there is a way to view the passwords if you are administrator and I show them that then it is really a question of policy and not a technical one. So how would it help me to take a class?
|
|
|
|
|
If there was a way to view passwords on any system, then that system's security is compromised. As a teacher of IT you really should understand that.
Veni, vidi, abiit domum
|
|
|
|
|
Richard MacCutchan wrote: If there was a way to view passwords on any system, then that system's
security is compromised. As a teacher of IT you really should understand that.
And I should take a class to learn that?
|
|
|
|
|
Hello
I need a very basic example on how you achieve this,please do not add any reference links.i checked every link which is available on code project and google.
They may be correct but the thing is i was not able to achieve it
so any simple program and explanation on how this can be achieved would be great
Chandra Sekhar
|
|
|
|
|
Chandra Sekhar.bs wrote: They may be correct but the thing is i was not able to achieve it If you are talking about CodeProject articles, then there is a forum at the end of each article which allows you to ask the author. If you are talking about your own implementation then show what you have done, explain what is not working, and people will try to help you.
Use the best guess
|
|
|
|
|
I created asp.net website who is holding a login page,
Here is the code behind of my login page
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using DbProjectLibrary;
public partial class Login : System.Web.UI.Page
{
string constr = ConfigurationManager.ConnectionStrings["constr"].ConnectionString.ToString();
DBClass db = new DBClass();
protected void Page_Load(object sender, EventArgs e)
{
}
protected void loginbtn_Click(object sender, EventArgs e)
{
string type="Admin";
string get_login = "select * from login where Type='" + type + "'";
DataTable dt = db.get_data(get_login, type, constr);
//gview.DataSource = dt;
//gview.DataBind();
string user = usertxt.Text;
string pass = Passwrdtxt.Text;
string username = dt.Rows[0][1].ToString();
string password = dt.Rows[0][2].ToString();
if (username == user.ToLower() && password == pass)
{
Session["login"] = username;
Response.Redirect("~/Profiles/Default.aspx?type=Admin");
}
else
{
errlbl.Text = "You are not authorized to login";
}
}
}
when i run this code using vs 2012 than it runs perfectly
but when i publish it online and try to run it through iis than it shows that error
Server Error in '/' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0246: The type or namespace name 'DBClass' could not be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 9: public partial class Login : System.Web.UI.Page
Line 10: {
Line 11: DBClass db = new DBClass();
Line 12: protected void Page_Load(object sender, EventArgs e)
Line 13: {
can anyone help me with it
|
|
|
|
|
Make sure your application pool is set to the correct framework in your IIS Manager e.g.
if your website is build with framework 4, make sure you application pool is set to .Net Framework Version v4.0.
And if your website is build with framework 3.5, make sure you application pool is set to .Net Framework Version v2.0.
|
|
|
|
|
I made the modification but it still doesn't working still
|
|
|
|
|
If you use deploy, then you have to be aware that it does not always deploy everything.
You may need to look into a library that exist on your local dev but not on your deployed iis,
Check the dlls, and controls etc..
Make sure that they are all either in your app bin dir or registered on your deployment box.
=)
|
|
|
|
|
Can you share any sample code which tracks the user`s login and logout time
Chandra Sekhar
|
|
|
|
|
hi
i have result in datatable and i converted to excel using streamwriter. Now i dont want save to computer and then send mail by using that path.
Is there any other method that i can send that excel without saving to system in c#.
If anybody knows, please reply me.
Thanks in advance.
|
|
|
|
|
Try using a MemoryStream[^] to store the Excel file, and pass that stream to the Attachment constructor[^].
var ms = new MemoryStream();
using (var sw = new StreamWriter(ms))
{
RenderExcelAttachment(sw);
}
var attachment = new Attachment(ms, "data.xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
message.Attachments.Add(attachment);
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hey all,
I want to add a Return-Path to my message so that Bounces can be send to a specific email address.
I tried adding
mm.Header.Add("Return-Path",email) to my MailMessage, but no luck. I've done some research but found nothing useful. Some guys said that it is impossible with system.net.mail.
Any work around or ideas will be appreciated.
Thanks
|
|
|
|
|
I believe the Return-Path header is set based on the Sender property[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi
This is my first post.I will introduce my self first.My Name is Chandra Sekhar.I have 2+ experience in developing asp.net applications.
I would like to know where i have to start off if i have to earn a Microsoft certificate in .net.Any study materials,Links,E-Books which are relevant for this are helpful
Chandra Sekhar
|
|
|
|