|
yes, and due to the architecture of the web. Knowing the actual computer ID is unreliable also.
But you can still trace the IP to the origination IP. It all depends on how much effort you want to use.( there are tons of utilities that can trace this) But, using whois you can trace down the ISP and they usually use the same patterns for IP's.
I was on a spam rampage and I can trace anyone back to thier orignal IP that the email was sent from. Even if its sent within IP hider types. And if this tells me thier ip location, so will the requesting machine.
all you really need is the ISP server name and a few other bits which are inside the request header. Everything is traceable. There maybe hurdle, but tons of sites in the UK tell you how to get past anyone of them.
IP or a mac address is your best bet. But, last time i looked at a header the mac address wasn't there. And due to security you wont be able to get it, unless you create an active x control to run on your page. Much like AJAX.
Nick
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
Shankar
We had the same sort of functionality in our application and we are storing ip, flag , domain name and checking with or conditions. If any conditions return true value we display message to user. But I am not sure how flexible you are for changing your application design,
Amit
|
|
|
|
|
Hi,
We are using MySql Connector 1.0.7, .Net Framework 1.1 and MySql 4.0.12. We are getting following error very frequently.
To resolve this error we have also changed our hosting server which is of .Net Framework 2. So error is occurring for both Framework 1.1 and 2.
But still we are stucked with it.
///////////////////////////////////////////////////////////////////
Server Error in '/' Application.
A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied
Stack Trace:
[SocketException (0x2749): A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied]
System.Net.Sockets.Socket.Shutdown(SocketShutdown how) +1005764
MySql.Data.Common.SocketStream.Read(Byte[] buffer, Int32 offset, Int32 count) +68
System.IO.BufferedStream.ReadByte() +103
MySql.Data.MySqlClient.PacketReader.ReadHeader() +16
MySql.Data.MySqlClient.PacketReader.OpenPacket() +119
MySql.Data.MySqlClient.NativeDriver.Open() +653
MySql.Data.MySqlClient.MySqlConnection.Open() +142
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +86
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
///////////////////////////////////////////////////////////////////
Is there anyone who can get me out of this problem ?
Thanks in advance.
|
|
|
|
|
Hi Friends,
I have a ASP.NET application that stores session information in Shared class, now everytime a new user comes the old users session information is written by the new user information. I understand thats how Shared variables work, but what app domains? can't we use app domains to isolate each user.
Any hints will be highly appreciated......
ThX in advance
Amit
|
|
|
|
|
AppDomains has no bearing on your problem what so ever.
The Session object has a collection that you can use to store user specific data. Example:
Session["userid"] = 42;<br />
<br />
int userId = (int)Session["userid"];
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
you can use either of the
Session Variables
or
Coockie
Hope this works
Nitin...
|
|
|
|
|
Perhaps you should reply to the original poster instead.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
I guess i was not able to make myself clear, here is what i meant
There is a class that has userName and Password properties
Public Class A
Property UserName as string()
Get End Get
Set End Set
End Property
Property Password as String()
Get End Get
Set End Set
End Property
End Class
This class in used in another class as variable
Public Class B
Public Shared objUser as ClassA
End Class
Now when user logs on login page these properties are set liek this
ClassB.objUser.UserName="XYZ"
ClassB.ObjUser.Password="XYZ"
and now when another user logs in the same variables got reset like this
ClassB.objUser.UserName="ABC"
ClassB.ObjUser.Password="ABC"
Thats what i want to avoid, i know this is flaw in design but the application is already been developed and deployed and therefore i want to avoid the rework.
Any Suggestions welcome
Thx
Amit
|
|
|
|
|
You have deployed a multi user application that only supports a single user? Nice...
You have to change the way you store the values to make it work. As you already have noticed, a static (shared in VB) variable only exists once throughout the application.
You could keep track of the separate values for each user on your own, but why not use the Session object when it is intended for this?
---
b { font-weight: normal; }
|
|
|
|
|
any body can tell is there any function by which i can measure the bandwidth
usage by user.
i found that there are some tools which provide this Facility.
but how can i achieve by myself.
plz guide me
any suggestion.
thanx
|
|
|
|
|
Hi every1
I want to know if i am not mentioned session timeout in my web.config file,then what will be effect on my application?
My second question is:I have mentioned session timeout as 20min in web.config file.I am accessing my application but after every 20min it gives an error "session expired".My system is not ideal.For my point view session is expired when system is ideal but my application is not ideal.What is the options for that?I am using InProc state.
If u have any solution,pls reply me.
Thanks
monika
|
|
|
|
|
monika_vasvani wrote: I want to know if i am not mentioned session timeout in my web.config file,then what will be effect on my application?
Then the timeout is used that is specified for the web application. This is usually 20 minutes.
monika_vasvani wrote: I have mentioned session timeout as 20min in web.config file.I am accessing my application but after every 20min it gives an error "session expired".My system is not ideal.For my point view session is expired when system is ideal but my application is not ideal.What is the options for that?I am using InProc state.
Your system is ideal? I think that you mean idle...
Make sure that you are using sliding expiration.
Also, the web server is only aware of you when you are requesting a page from the server. If you don't request any pages, you are idle as far as the server is concerned.
---
b { font-weight: normal; }
|
|
|
|
|
This case if differs between different .Net Versions.
In .Net 2.0, By Default the "timeout" attribute value is 30 minutes. ( 20 min in .Net 1.1)
And also the "SlidingExpiration" attribute's Default Value is "False". ("True" in Version 1.1).
Regards,
Jay
|
|
|
|
|
Hi
Thanx for yr Reply.But what is SlidingExpiration? and where it is declared?
If I set SlidingExpiration to false,then what happened?If I set SlidingExpiration to true,then what happened?where I set this property to true or false?Pls reply me immidiately.Becoz I am in deadline.
Thanks
monika
|
|
|
|
|
|
The authentication cookie is refreshed and time to expiration is resets on your subsequent request when SlidingExpiration is set to TRUE.
It is a attribute in 'forms' tag in your web.config file. (Forms authentication)
Regards,
Jay
|
|
|
|
|
Hi
Thanx I got yr ans.But I am little bit confused about this.I have entered lots of data in my application. After 30min, i have clicked on button for save this data in database but at that time I got an error "session expired".
My question is if my page is not go to server side for request means i am working on client side then SlidingExpiration is working perfectly?If i set it to true in form authentication.or any other other option?I want option which will be working perfectly for server and client side code.Pls reply me.
Thanks
monika
|
|
|
|
|
Have u gone through the link given by Apurva Kaushal?
After 30 min, the Session has expired. It works fine & Correct.
Dont confused about Client Side or Server side. If you are using 'Cookies', the Cookie will retain its session values only 30 min (Cookie is stored in Client system only). This 30 min given in 'SlidingExpiration' attribute.
Cookie is expired after 30 min., the time the last request was received.
U know web is stateless. The server understands the Request from single user (Browser) by Session ID only.After the Cookie expires, for example, if u submit the Web Page, then the server cant able to idetify you (Session ID expired).So it gives "session expired" warning. You need to login again.
Have got it !!
Regards,
Jay
|
|
|
|
|
i have a dateset with value of 0 and 1,
i want bind the dataset to gridview with checkboxfiled,
in dataset all value are strings so it give error
i use bool.Parse(bool.TrueString) comment for boolen value but it gives the error
how to bind dataset with gridview
mohamad rafi
|
|
|
|
|
If you are having problem in handling it directly then use onitemdatabound event for that purpose.
Or Here[^] you will get lots of stuff on gridview control.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi all!
How can I apply CSS to the browse button of FileUpload Control? Can I also add onmouseover and onmouseout properties to the button?
If not, is there a function or method that has the same functionality as the FileUpload? like I can just invoke it on button click? My codebehind language is VB.
Thanks alot.
|
|
|
|
|
i m creating dynamic listbox
{
ListBox lstbx = new ListBox();
protected void Button1_Click(object sender, EventArgs e)
{
adp = new SqlDataAdapter("select Source from feed group by(Source)", con);
dt = new DataTable();
adp.Fill(dt);
lstbx.ID = "lstbx";
lstbx.AutoPostBack = true;
lstbx.EnableViewState = true;
lstbx.DataTextField = "Source";
lstbx.DataValueField = "Source";
lstbx.DataSource = dt;
lstbx.DataBind();
form1.Controls.Add(lstbx);
}
its populate data in lsbox at button click
but wen i select any item in listbox ,listbox disaapear how to solve it
i want to use lisbox selectedindexchanged event for my project
give me soln as soon as possible
intresting in asp.net
|
|
|
|
|
Sounds like you are not recreating your control on the selectedIndexChanged post back event.
When you create it like this in a button click, it is not persisted in the page's control tree.
|
|
|
|
|
public partial class Default3 : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["constr"].ToString());
SqlDataAdapter adp;
DataTable dt;
ListBox lstbx;
ListBox lstbx1;
string temp;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Session["Test"] = false;
}
if ((bool)Session["Test"] == true)
{
lstSource_Created();
//lstName_Created();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
lstSource_Created();
Session["Test"] = true;
}
private void lstSource_Created()
{
adp = new SqlDataAdapter("select Source from feed group by(Source)", con);
dt = new DataTable();
adp.Fill(dt);
lstbx = new ListBox();
lstbx.ID = "lstbx";
lstbx.AutoPostBack = true;
lstbx.EnableViewState = true;
lstbx.DataTextField = "Source";
lstbx.DataValueField = "Source";
lstbx.DataSource = dt;
lstbx.DataBind();
//form1.Controls.Add(lstbx);
lstbx.SelectedIndexChanged += new EventHandler(lstbx_SelectedIndexChanged);
divTest.Controls.Add(lstbx);
}
void lstbx_SelectedIndexChanged(object sender, EventArgs e)
{
Response.Write(lstbx.SelectedItem.Text.ToString());
lstName_Created(lstbx.SelectedItem.Text.ToString());
//Session["Test"] = true;
}
private void lstName_Created(string strData)
{
adp = new SqlDataAdapter("select name from feed where source='" + strData.ToString()+"'", con);
dt = new DataTable();
adp.Fill(dt);
lstbx1 = new ListBox();
lstbx1.AutoPostBack = true;
lstbx1.DataTextField = "Name";
lstbx1.DataValueField = "Name";
lstbx1.DataSource = dt;
lstbx1.DataBind();
// form1.Controls.Add(lstbx1);
divTest.Controls.Add(lstbx1);
lstbx1.SelectedIndexChanged += new EventHandler(lstbx1_SelectedIndexChanged);
}
void lstbx1_SelectedIndexChanged(object sender, EventArgs e)
{
Response.Write("hi");
}
}
this code runs without atlas
but not in atlas
how to sove it
give me some solutions plz
thank you
intresting in asp.net
|
|
|
|
|
<%
mysql=("select MAX(cast(SUBSTRING(Appellant_Notice_Number,1,LEN(Appellant_Notice_Number)-5)as int))+1 As vals FROM RegisteredCase where Appellant_Notice_Number is not null")
set rs=con.execute(mysql)
yearvar=year(Date)
if(isNull(rs("vals"))) then
anum="1/"& yearvar
else
anum=rs.fields("vals")&"/"& yearvar
end if
%>
I get the following error in the above code. Plz help me solving this error.
(Note: Appellant_Notice_Number values are, for example 225/2005 or 1/2006 or 15/2005 etc)
Microsoft OLE DB Provider for SQL Server error '80040e14'
Invalid length parameter passed to the substring function.
/adminsite/Adminpages/noticeissue.asp, line 87
adsf e ed w we we w
|
|
|
|