|
Hello All,
I want to get all System IP address Which is running from a DNS Server.
Thanks
|
|
|
|
|
Please Google first before you post , there are plenty examples
IP list, Check an IP number against a list in C#[^]
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
public static string GetClientIP()<br />
{<br />
string ip;<br />
string[] temp;<br />
bool isErr = false;<br />
if (System.Web.HttpContext.Current.Request.ServerVariables["HTTP_X_ForWARDED_For"] == null)<br />
ip = System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"].ToString();<br />
else<br />
ip = System.Web.HttpContext.Current.Request.ServerVariables["HTTP_X_ForWARDED_For"].ToString();<br />
if (ip.Length > 15)<br />
isErr = true;<br />
else<br />
{<br />
temp = ip.Split('.');<br />
if (temp.Length == 4)<br />
{<br />
for (int i = 0; i < temp.Length; i++)<br />
{<br />
if (temp[i].Length > 3) isErr = true;<br />
}<br />
}<br />
else<br />
isErr = true;<br />
}<br />
if (isErr)<br />
return "1.1.1.1";<br />
else<br />
return ip;<br />
}<br />
living none stoping.
|
|
|
|
|
Hi there..
I am a new user of .net and don't know much about it.I wanna make a application when i upload a video file it should be split into chunks and get uploaded simultaneously (means all the chunks get uploaded at the same time)but don't know how to split the single file into chunks and integrate it at the receiving end is well.
I hope you will help me as soon as possible.
Thanks In Advance
Thanks & Regards
Naved Mohammad
|
|
|
|
|
Only using HTML in client side cant do this. You need flash objects for this.
HTML Input type=file can only send files up in continuous stream.
|
|
|
|
|
Hi abhishek,
Thanks for replying man.I don't have any idea about flash objects,even i never ever heared about it is well,so Will you help or guide me to acheive this.
Hope you will reply as soon as possible. Smile
Thanks & Regards
Naved Mohammad
|
|
|
|
|
hai all,
am using the following code for encryption and decryption for a password field.
But when am testing this with TamperIE for web security,there the password is showing in plian text,so any hacker can do anything,
My code is
Private Function Decrypt(ByVal myString As String) As String
cryptDES3.Key = cryptMD5Hash.ComputeHash(ASCIIEncoding.ASCII.GetBytes(Session("salt")))
cryptDES3.Mode = CipherMode.ECB
Dim desdencrypt As ICryptoTransform = cryptDES3.CreateDecryptor()
Dim buff() As Byte = Convert.FromBase64String(myString)
Decrypt = ASCIIEncoding.ASCII.GetString(desdencrypt.TransformFinalBlock(buff, 0, buff.Length))
End Function
Private Function Encrypt(ByVal myString As String) As String
cryptDES3.Key = cryptMD5Hash.ComputeHash(ASCIIEncoding.ASCII.GetBytes(session("salt")))
cryptDES3.Mode = CipherMode.ECB
Dim desdencrypt As ICryptoTransform = cryptDES3.CreateEncryptor()
Dim MyASCIIEncoding = New ASCIIEncoding
Dim buff() As Byte = ASCIIEncoding.ASCII.GetBytes(myString)
Encrypt = Convert.ToBase64String(desdencrypt.TransformFinalBlock(buff, 0, buff.Length))
End Function
The above code is am calling on pageload like
txt_password.text=encrypt(txt_password.text)
str=decrypt(txt_password.text)
It is working perfectly.
But if i tested with TamperIE it is showing plian text.Then how to do this?What i have to use,so that it should not show in plain text for the end user???
Sorry if i disturb u,please let me now the answer
kissy
|
|
|
|
|
Kissy16 wrote: am using the following code for encryption and decryption for a password field.
Password fields should be stored as a one-way salted hash value (e.g. SHA256). That way you (or a hacker) can never get them back. When you want to check that a password matches then you create a salted hash of what the user typed and compare the two hashed values.
Kissy16 wrote: But if i tested with TamperIE it is showing plian text
At what point is it showing plain text. What the user types in will be in plain text until you encrypt it.
|
|
|
|
|
ya.
Actually i am using plain text passwords in the back end.
when i use salted hash on the new password field,then while changing password,it will become the hashed password getting updated which i want to store as plain text.
So this is my question ki how to do that?storing the changed password as plain text and not the hashed one.
kissy
|
|
|
|
|
|
Actually, I read some advice recently that suggested that it is better to move authentication over to a dedicated service that can implement it better than you can. I've since started using OpenID as the authentication mechanism for my websites so I never have to store passwords again.
You might want to look into OpenID frameworks for .NET.
|
|
|
|
|
Hi All,
I want to open everytime only one window when i click on link. Suppose my page like this -
1) One
2) Two
3) Three
These all three link. On these link i written below javascript -
var popupWindow = window.open( "myPage.aspx", 'testPopup','width=405,height=220,scrollbars=no ,toolbars=no,titlebar=no,menubar=no,status=no,resizable=1');
popupWindow.focus();
My requirement is - When some one click on above links then only one window open everytime, for this requirement my code work.
Problem is - when i click first time on "Two" link then page load event fire on myPage.aspx but when i clicked again on "Two" link then page load event no firing. If i click on "One" link then page load event will fire but second or third time click then page load event no fire on myPage.aspx.
Means if you have clicked once on any link then second time load event will not fire.
And i want every time page load event on every link click. Please help.
Have some one any idea.
Thanks,
Jaydev Jangid
Do hard work, you will get your result sure !
|
|
|
|
|
your question is not clear. Well, if you reload a page completely using window.open, it will call Page_load in the server side.
If you want to have any server side event to occur even if the page is not loaded, means the user tries to click on the link twice, use handler or Callback to execute server side event.
Use of ICallbackEventHandler will help you in this.
If this is not what you want, just make your question clear first.
|
|
|
|
|
you must colsed opened windows
.
fire second link;
living none stoping.
|
|
|
|
|
Hi, I have a treeview control.On Page Load I am populating this Treeview through code.
The TreeView contains one parent node and this parent node contains several child nodes.
My problem is that on Treeview_SelectedNodeChanged event Whenever I am selecting a child node,it automatically selects the first child node only.
I am after this for last 2 days.I have worked with TreeView several times, but never faced such problem.
if I change the treeivew populating program it works.But with my existing populating program it gives such problem.
Please Help.
My treeview populating program is given below :
public void PopXml()
{
TreeView1.Nodes.Clear();
com = new OracleCommand();
con = new OracleConnection(ConfigurationManager.ConnectionStrings["constr"].ConnectionString);
com.Connection = con;
com.CommandText = "select a.meeting_no,a.meeting_no ||'-->' || a.meeting_desc comb,b.meet_no from tpc_meetings a,tpc_meets b where a.meeting_no=b.meeting_no and a.status='LIV' and b.status='LIV' order by a.meeting_no,b.meet_no";
da = new OracleDataAdapter();
ds = new DataSet();
da.SelectCommand = com;
da.Fill(ds, "Meets");
object[] marr = GetDistinct(ds.Tables["Meets"], "meeting_no");
foreach (object mval in marr)
{
string mcomb = ds.Tables["Meets"].Select("meeting_no='" + mval.ToString() + "'")[0]["comb"].ToString();
TreeNode meetingnode = new TreeNode(mcomb, mcomb);
meetingnode.SelectAction = TreeNodeSelectAction.None;
TreeView1.Nodes.Add(meetingnode);
DataRow[] children = ds.Tables["Meets"].Select("meeting_no='" + mval.ToString() + "'");
foreach (DataRow drow in children)
{
TreeNode meetnode = new TreeNode(drow["meet_no"].ToString(), mval.ToString());
meetnode.SelectAction = TreeNodeSelectAction.Select;
meetingnode.ChildNodes.Add(meetnode);
}
}
}
CC26
|
|
|
|
|
Solved the problem.Actually the child nodes have different text but I assigned values as same.That's why there was an ambiguity.
CC26
|
|
|
|
|
Hi Friends,
I have created a web based application in asp.2.0 and now i want to implement the facebook api(Login Using facebook account ) in this application.
I want implement this API in my page not in iframe
can any one help me, thanks in advance.
Never Think That You Have Failed Instead Always Think That u hav Better Chance Next Time...
|
|
|
|
|
If Facebook is an OpenID provider then there are some frameworks to do that - And at the same time you get the benefit of allowing people to log in to your application that don't care for Facebook.
|
|
|
|
|
hi all,
how can i link js file to css file?
to do this
//cssfile
font
{
font-size:expression(setFontags(this.currentStyle.fontSize));
}
// js file containing the function setFontags
function setFontags(x){
var y={1:10,2:13,3:16,4:18,5:24,6:32,7:48};
return y[x]+'px';
thx.
|
|
|
|
|
Hi,
In your css file write
.font
{
font-size:expression(Test());
}
In your external Js file write
function Test()
{
return "10 px";
}
In head section f your page write
<link rel="Stylesheet" href ="StyleSheet.css" type="text/css">;
<script type="text/javascript" language="javascript" src="JScript.js">
himanshu
|
|
|
|
|
Thx for u r replay!
but.
i walked throw this method to overcome modifying too many files , what i need is changing the font size from points to pix without modifing all aspx pages, because of that m trying to find a way to link css file to external javascript file.
---css file ----
<script type="text/javascript" language="javascript" src="JScript.js">
/* to be able to call */
expression(Test());
|
|
|
|
|
Hi,
In my application,the user have to upload a particular document.
I have to check the database and if the document has been already uploaded by the user.If so,then i have to get the consent of the user to overwrite.
If he says ok,then the updation should happen.
This should be done in the middle of btnUpload_click() event.
Since confirm(msg) is a javascript function,how to call it from aspx.cs page?.
It seems that a javascript function can be called only at some events(Buttonclick etc.) and <body onload()....
How to call the confirm(msg) without any event firing?.Any ideas?.
Thanks in advance
Yazhini
|
|
|
|
|
write a javascript function
function check
{
return confirm('your msg');
}
and in form load add attribute
btn.Attributes.Add('onclick','return check();');
|
|
|
|
|
Have you thought of changing your workflow?
Upload the file to a temporary area. Then makes the check for overwrite and inform the user if that is the case.
If there is no overwrite needed or the user permits the overwrite then move the data from the temporary area to the permanent area. If the user declines the overwrite then delete the data in the temporary area.
NOTE: By Temporary area I do NOT mean TempDB
|
|
|
|
|
Hi im actually working on a project. Actually its about storing and retrieving student details from the data base. I hav totally designed 3 webforms.
1st webform has a login form
2nd webform has 3 buttons in it
3rd webform has the grid view which displays the student records frm DB
Now heres the problem actually when i click button1 in my 2nd webform it must disable the edit and delete option of my grid view in the 3rd webform and wen i click button2 in 2nd webform it must enable the edit and delete option in my gridview in the 3rd webform. the edit and delete are link buttons.
Can anyone plzzz help me its bit urgent...
Thashif
modified on Thursday, June 18, 2009 7:08 AM
|
|
|
|