/
CreateUserWizardPageArchive.aspx.cs
124 lines (106 loc) · 3.45 KB
/
CreateUserWizardPageArchive.aspx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
using System;
using System.Collections;
using System.Data;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security.Principal;
using System.Windows.Forms;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Net;
using System.Text;
using System.Xml;
namespace WordEngineering
{
/// <summary>CreateUserWizardPage</summary>
public partial class CreateUserWizardPage : System.Web.UI.Page
{
/// <summary>The database connection String.</summary>
public String DatabaseConnectionString = "Provider=SQLOLEDB;Data Source=localhost;Integrated Security=SSPI;Initial Catalog=WordEngineering;";
/// <summary>The configuration XML filename.</summary>
public String FilenameConfigurationXml = @"WordEngineering.config";
/// <summary>The server map path.</summary>
public String ServerMapPath = null;
/// <summary>CreateUserWizardMembership</summary>
protected System.Web.UI.WebControls.CreateUserWizard CreateUserWizardMembership;
/// <summary>LiteralFeedback</summary>
protected System.Web.UI.WebControls.Literal LiteralFeedback;
/// <summary>Feedback.</summary>
public String Feedback
{
get
{
return ( LiteralFeedback.Text);
}
set
{
LiteralFeedback.Text = value;
}
}//public String public String Feedback
/// <summary>Page Load.</summary>
public void Page_Load
(
object sender,
EventArgs e
)
{
String exceptionMessage = null;
ServerMapPath = this.MapPath("");
/*
FilenameConfigurationXml = Server.MapPath( FilenameConfigurationXml );
*/
if ( ServerMapPath != null)
{
FilenameConfigurationXml = ServerMapPath + @"\" + FilenameConfigurationXml;
}//if ( ServerMapPath != null)
/*
UtilityXml.XmlDocumentNodeInnerText
(
FilenameConfigurationXml,
ref exceptionMessage,
UtilityImage.XPathDatabaseConnectionString,
ref DatabaseConnectionString
);
*/
if ( exceptionMessage != null )
{
Response.Write( exceptionMessage );
return;
}//if ( exceptionMessage != null )
}//Page_Load
/// <summary>CreateUserWizard_SendingMail</summary>
public void CreateUserWizard_SendingMail
(
object sender,
MailMessageEventArgs e
)
{
// Replace placeholder text in message body with information
// provided by the user.
e.Message.Body.Replace("<%PasswordQuestion%>", CreateUserWizardMembership.Question);
e.Message.Body.Replace("<%PasswordAnswer%>", CreateUserWizardMembership.Answer);
}//public void CreateUserWizard_SendingMail()
/// <summary>CreateUserWizard_SendingMailError</summary>
public void CreateUserWizard_SendMailError
(
object sender,
SendMailErrorEventArgs sendMailErrorEventArgs
)
{
UtilityEventLog.WriteEntry
(
"Application", //Log
null, //Machine name
"Membership", //Source
"Sending mail via SMTP failed with the following error: " +
sendMailErrorEventArgs.Exception.Message.ToString(),
System.Diagnostics.EventLogEntryType.Error
);
sendMailErrorEventArgs.Handled = true;
}//public void CreateUserWizard_SendMailError()
}//CreateUserWizardPage class.
}//WordEngineering namespace.