Click here to Skip to main content
15,898,373 members
Home / Discussions / C#
   

C#

 
AnswerRe: Decrypting a text using Rijndael Pin
Keith Barrow22-Feb-10 4:20
professionalKeith Barrow22-Feb-10 4:20 
AnswerRe: Decrypting a text using Rijndael Pin
Luc Pattyn22-Feb-10 4:51
sitebuilderLuc Pattyn22-Feb-10 4:51 
GeneralRe: Decrypting a text using Rijndael Pin
Keith Barrow22-Feb-10 5:03
professionalKeith Barrow22-Feb-10 5:03 
GeneralRe: Decrypting a text using Rijndael Pin
Luc Pattyn22-Feb-10 5:49
sitebuilderLuc Pattyn22-Feb-10 5:49 
QuestionDatatable Pin
jojoba201122-Feb-10 2:36
jojoba201122-Feb-10 2:36 
AnswerRe: Datatable Pin
Not Active22-Feb-10 3:12
mentorNot Active22-Feb-10 3:12 
GeneralRe: Datatable Pin
jojoba201122-Feb-10 4:25
jojoba201122-Feb-10 4:25 
Questionidentify authorised user on web method using c# Pin
dalila y22-Feb-10 2:01
dalila y22-Feb-10 2:01 
Hi everyone,

Does anyone have any idea how to do the following code snippet i posted below in web method?



protected void Page_Load(object sender, EventArgs e)
{
// Get the hostname
string myHost = System.Net.Dns.GetHostName();
// Get the IP from the host name
//string myIP = System.Net.Dns.GetHostEntry(myHost).AddressList[0].ToString();

string connect = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=C:\\inetpub\\wwwroot\\Request\\App_Data\\TV.mdb";
string query = "SELECT COUNT(IPAddress) FROM Request WHERE IPAddress = ?";
int result = 0;

using (OleDbConnection conn = new OleDbConnection(connect))
{
using (OleDbCommand cmd = new OleDbCommand(query, conn))
{
cmd.CommandType = CommandType.Text;
cmd.Parameters.AddWithValue("IPAddress", myHost);

conn.Open();
result = (int)cmd.ExecuteScalar();
}
}
if (result <= 0)
{
Response.Redirect("Unautorized.aspx");
}

thanks.
AnswerRe: identify authorised user on web method using c# Pin
Not Active22-Feb-10 2:04
mentorNot Active22-Feb-10 2:04 
GeneralRe: identify authorised user on web method using c# Pin
dalila y22-Feb-10 5:27
dalila y22-Feb-10 5:27 
GeneralRe: identify authorised user on web method using c# Pin
Not Active22-Feb-10 5:47
mentorNot Active22-Feb-10 5:47 
QuestionMDI Problem in C#.Net? Pin
Pawan Kiran22-Feb-10 1:58
Pawan Kiran22-Feb-10 1:58 
AnswerRe: MDI Problem in C#.Net? Pin
DaveyM6922-Feb-10 8:39
professionalDaveyM6922-Feb-10 8:39 
GeneralRe: MDI Problem in C#.Net? Pin
Pawan Kiran22-Feb-10 18:15
Pawan Kiran22-Feb-10 18:15 
QuestionParse javascript Pin
Ziga122-Feb-10 1:37
Ziga122-Feb-10 1:37 
AnswerRe: Parse javascript Pin
Not Active22-Feb-10 2:02
mentorNot Active22-Feb-10 2:02 
GeneralRe: Parse javascript Pin
harold aptroot22-Feb-10 2:31
harold aptroot22-Feb-10 2:31 
GeneralRe: Parse javascript Pin
Not Active22-Feb-10 3:09
mentorNot Active22-Feb-10 3:09 
GeneralRe: Parse javascript Pin
harold aptroot22-Feb-10 3:22
harold aptroot22-Feb-10 3:22 
GeneralRe: Parse javascript Pin
Ziga122-Feb-10 3:43
Ziga122-Feb-10 3:43 
GeneralRe: Parse javascript Pin
Not Active22-Feb-10 3:48
mentorNot Active22-Feb-10 3:48 
GeneralRe: Parse javascript Pin
harold aptroot22-Feb-10 4:16
harold aptroot22-Feb-10 4:16 
GeneralRe: Parse javascript Pin
Dave Kreskowiak22-Feb-10 6:42
mveDave Kreskowiak22-Feb-10 6:42 
GeneralRe: Parse javascript Pin
Not Active22-Feb-10 3:45
mentorNot Active22-Feb-10 3:45 
GeneralRe: Parse javascript Pin
harold aptroot22-Feb-10 4:14
harold aptroot22-Feb-10 4:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.