|
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
|
|
|
|
|
|
Thank you for the link.i have gone through the list of certifications and i am willing to pursue <b>MCSD: Web Applications</b>.
Can you share few <b> sample questions </b> and any study material On Programming in HTML5 with JavaScript and CSS3,
Developing ASP.NET MVC 4 Web Applications,Developing Windows Azure and Web Services
|
|
|
|
|
|
how to get min max restore and close links in calender using webparts in vb.net
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>DISPLAY</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:WebPartManager ID="WebPartManager1" runat="server">
</asp:WebPartManager>
<br />
<asp:WebPartZone ID="WebPartZone1" runat="server">
<ZoneTemplate>
<asp:Calendar ID="Calendar1" BackColor="White" runat="server" BorderColor="#999999" CellPadding="4" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" Height="180px" Width="200px">
<DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
<NextPrevStyle VerticalAlign="Bottom" />
<OtherMonthDayStyle ForeColor="#808080" />
<SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
<SelectorStyle BackColor="#CCCCCC" />
<TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
<TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
<WeekendDayStyle BackColor="#FFFFCC" />
</asp:Calendar>
</ZoneTemplate>
</asp:WebPartZone>
<asp:WebPartZone ID="WebPartZone2" runat="server">
<ZoneTemplate>
<asp:BulletedList ID="BulletedList1" displaymode="HyperLink" title="MyLinks" runat="server">
<asp:ListItem Value="http://www.microsoft.com">MicroSoft</asp:ListItem>
<asp:ListItem Value="http://www.msn.com">MsN</asp:ListItem>
<asp:ListItem Value="http://www.contoso.com">Contoso Corp.</asp:ListItem>
<asp:ListItem Value="http://www.yahoo.com">yahoo</asp:ListItem>
</asp:BulletedList>
</ZoneTemplate>
</asp:WebPartZone>
<asp:EditorZone ID="EditorZone1" runat="server">
<ZoneTemplate>
<asp:LayoutEditorPart ID="LayoutEditorPart1" runat="server" />
<asp:AppearanceEditorPart ID="AppearanceEditorPart1" runat="server" />
</ZoneTemplate>
</asp:EditorZone>
<asp:Button ID="Button1" runat="server" Text="Browse Mode" OnClick="Button1_Click" />
<asp:Button ID="Button2" runat="server" Text="display Mode" OnClick="Button2_Click"/>
<asp:Button ID="Button3" runat="server" Text="Edit Mode" OnClick="Button3_Click" />
</div>
</form>
</body>
</html>
|
|
|
|
|
How do i want to do to sent a plain email to the user in visual basic seem i m doing the part of password recovery in the website.
i m new to visual basic and anyone could give me an simple way to solve this problem? is the smtp necessary in sending email or have other method. thank for you willing to help~
|
|
|
|
|
What version of asp.net are you using?
The code for 2.0/3.5 is different that 4.0
|
|
|
|
|
|
You use netmail, the mailclient and mail exception to track errors
Dim NetMail As New MailMessage
Dim MailClient As New SmtpClient
Dim smtp_credentials As Net.NetworkCredential = Nothing
Dim mailException As New SmtpException
Then you create your target, subject, encoding and so forth.
NetMail.From = _
New MailAddress(smtpC.Options_WebsiteName & " <" & smtpC.Options_ReplyTo & ">")
NetMail.ReplyToList.Add(New MailAddress(smtpC.Options_WebsiteName & " < " & smtpC.Options_ReplyTo & " > "))
NetMail.To.Add(New MailAddress(m_CustomerName & "<" & m_EmailAddress & ">"))
NetMail.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure
NetMail.IsBodyHtml = True
NetMail.BodyEncoding = System.Text.Encoding.UTF8
NetMail.Priority = MailPriority.Normal
NetMail.Subject = m_RM.GetString("Confirmation of Payment for Order Number")
If your message is HTML, use the NetMail.Body. YOur Body can be any mix and match of properly formatted HTML code, packaged as a string or use can use a string Builder.tostring
NetMail.Body = html_Template.ToString
This part is tricky, I've been playing around with this for a couple of months now, and I think I have it now. I've had to adjust sending credentials to exchange servers in a windows domain, and plain smtp servers outside the domain.
select case smtpC.Connector_AuthMethod.ToUpper
Case "WINDOWS"
If (Convert.ToBoolean(smtpC.Connector_DefaultCredentials) = True) Then
MailClient.UseDefaultCredentials = True
Else
MailClient.UseDefaultCredentials = False
smtp_credentials = New Net.NetworkCredential
smtp_credentials.Domain = smtpC.Credentials_DomainName
smtp_credentials.UserName = smtpC.Credentials_LoginID
smtp_credentials.Password = smtpC.Credentials_Password
MailClient.Credentials = smtp_credentials
End If
Case "SMTP"
MailClient.UseDefaultCredentials = False
smtp_credentials = New Net.NetworkCredential
smtp_credentials.Domain = smtpC.Credentials_DomainName
smtp_credentials.UserName = smtpC.Credentials_LoginID
smtp_credentials.Password = smtpC.Credentials_Password
MailClient.Credentials = smtp_credentials
Now I set the port, host and delivery method and send the message
MailClient.DeliveryMethod = SmtpDeliveryMethod.Network
MailClient.Host = smtpC.Connector_ServerAddress
MailClient.Port = smtpC.Connector_SMTP_PortNum
MailClient.Send(NetMail)
And then dispose of the netmail object
If Not (NetMail Is Nothing) Then
NetMail.Dispose()
NetMail = Nothing
End If
|
|
|
|