|
Hello to all,
Is there anyone out there can shed a light why the information is getting shared between two or more users when they are signed on simultaneously? The problem is this, I created a web application where a user can sign on. I used session variables not cookies. When another user signs on to this web application and somehow any of the user save information they typed, it appears that the information getting saved is crossed over to the other user. It looks like they are sharing the same session.
I am sorry that is the clearest way I could explain it.
Thanks!
|
|
|
|
|
That doesn't make sense with session, but it would with Application variables. I am guessing you have a state problem with your app. A user is saving some stuff and then whoever does the next save also gets that stuff.
Ben
|
|
|
|
|
CodyGen wrote: When another user signs on to this web application and somehow any of the user save information they typed, it appears that the information getting saved is crossed over to the other user.
How they are saving information ? is it in sessions ? Show your code
|
|
|
|
|
Thanks for all of your reply. This doesn't happen all the time. So I am also thinking about concurrency problem. Here is the code. I used MyGeneration Doodads.
<br />
<br />
private static string nameid ="";<br />
<br />
private string GenerateNewID(string _NameID)<br />
{<br />
<br />
Names name = new Name();<br />
name.Where.NameID.Value = _NameID;<br />
name.Where.NameID.Operator = WhereParameter.Operand.Equal;<br />
name.Query.AddResultColumn(Name.ColumnNames.NameID);<br />
if (name.Query.Load())<br />
{<br />
Int32[] intsuffix = new Int32[name.RowCount];<br />
for (int x = 0; x < vwhhm.RowCount; x++)<br />
{<br />
intsuffix[x] = Convert.ToInt32(Right(vwhhm.NameID.Trim(), 2));<br />
name.MoveNext();<br />
}<br />
Array.Sort(intsuffix);<br />
string strsuffix = (intsuffix[name.RowCount - 1] + 1).ToString();<br />
if(strsuffix.Trim().Length<2)<br />
{<br />
strsuffix = "0" +strsuffix; <br />
}<br />
<br />
return _NameID + strsuffix;<br />
}<br />
else<br />
{<br />
return _NameID + "01";<br />
}<br />
<br />
}<br />
<br />
private sub ProcNames()<br />
{<br />
nameid = Session["NAMEID"].ToString();<br />
if(UpdateNames(nameid, GenerateNewID(Session["NAMEID"].ToString()), txtFname.Text, txtLname.Text)) <br />
{<br />
Response.Write("Saved Successfully."); <br />
}<br />
<br />
}<br />
<br />
private Boolean UpdateNames(string _NameID, string NewID, string FirstName, string LastName)<br />
{<br />
TransactionMgr tx = TransactionMgr.ThreadTransactionMgr();<br />
<br />
try<br />
{<br />
NameLists namelist = new NameLists();<br />
nameList.AddNew();<br />
namelist.NameID = _NameID.ToUpper();<br />
namelist.NewID = NewID.ToUpper();<br />
namelist.FName = FirstName.ToUpper();<br />
namelist.LName = LastName.ToUpper();<br />
<br />
tx.BeginTransaction();<br />
namelist.Save();<br />
tx.CommitTransaction();<br />
return true;<br />
<br />
}<br />
catch(Exception ex)<br />
{<br />
tx.RollbackTransaction();<br />
TransactionMgr.ThreadTransactionMgrReset();<br />
return false;<br />
<br />
}<br />
<br />
}<br />
The flow is generate a new name by putting a number suffix at the end of the original name. If there existing name, it would increment the number. So "name" will be "name01","name02" etc... I also use "private static string <variablename>". Is that the best way to declare a variable or just have it as private but not static? I used private static since I need to keep the value after postback.
If the problem happens, the name you saved will be added under my NameID.
Thanks again.
|
|
|
|
|
Server Error in '/' Application.
--------------------------------------------------------------------------------
The MaximumValue 1000000 cannot be less than the MinimumValue 500 of RangeValidator2.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: The MaximumValue 1000000 cannot be less than the MinimumValue 500 of RangeValidator2.
My basic math skills tell me 1000000 is not less than 500.
"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."
"There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..."
|
|
|
|
|
Richard Jones wrote: The MaximumValue 1000000 cannot be less than the MinimumValue 500 of RangeValidator2.
the Type property of the range validator is string.
The type should be Integer.
Regards John
|
|
|
|
|
Thanks
"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."
"There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..."
|
|
|
|
|
Hi guys, i have a complex scenario for that i want your help, i am trying to create family tree it is similar to horizontal binary tree from 2 days but haven't got any success, if you have any idea or any resource then please help me out of this problem. Thanks in advance.
Aamir Dharani
|
|
|
|
|
How can i generate a hash Password and checks from database in Windows Application.
Like in Web Application we do
sHashPwd = FormsAuthentication.HashPasswordForStoringInConfigFile(txtPwd.Text & ds.Tables(0).Rows(0)("pwdSalt"), "MD5")
If sHashPwd.Trim.CompareTo(ds.Tables(0).Rows(0)("password").Trim()) <> 0 Then
lblMessage.Text = "Login failed please enter a valid password."
How can we do above procedure in Windows Application
Kartik
|
|
|
|
|
|
I don't need third Part Tool.I want code.
|
|
|
|
|
It is an open source library. You can actually check out the Hash implementation based on System.Security.Cryptography over there.
|
|
|
|
|
|
you have to write a password encryption and decryption routines.
the related methods and properties are in the namespace System.Security.Cryptography
Regards John
|
|
|
|
|
Hi,
This link is the best solution with you.
http://www.codeproject.com/useritems/Crypto.asp
Hope that help you
kiet vu
(-,-)am from VietNamese. Thank you for your voting
|
|
|
|
|
Is it possible to change the format of the today date in the footer of the CalendarExtender?
The CalendarExtender localizes the text correctly (i.e. Heute for german) but the date format is always MMM dd, yyyy. I want to change that to dd.MM.yyyy for german.
I tried to change "Heute: {0}" to "Heute: {0: dd.MM.yyyy}" in the ScriptResources.de.resx resource but nothing changed.
Any ideas?
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
CalendarExtender has a Format property.
Set it by "dd.MM.yyyy"
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
The Format property is used to format the date in the extended TextBox.
However, I need to format the date that is shown in the calendar as today (in the footer).
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
sorry for reposting this but i really need help on this one.
i'm trying to fire a SoapException (thus returning it to my client) when an exception occurs. i've followed the steps in the documentation on how to set up a proper soap message (especially on how to provide a Details XmlNode). but once i run my webservice through the browser and call a webmethod firing such exception, i only get the Message-part of the SoapException back (as a string). what i'd need to get is a properly formatted SoapException with all the details i initially provided.
does anyone know this problem? i guess i'm missing here something essential.
kind regards!
/matthias
I love deadlines. I like the whooshing sound they make as they fly by. [Douglas Adams]
|
|
|
|
|
i havent got much idea about this,,, but i took this code from a thread posetd by a guy
check it out
http://www.thescripts.com/forum/thread293794.html
Example:
MyCustomWebServiceException : soapException
{
private string _MyCustomProperty;
public string MyCustomProperty
{
get
{
return _MyCustomProperty;
}
}
public MyCustomWebServiceException(string message,
XmlQualifiedName code, string CustomParameter)
: base(string message, XmlQualifiedName code)
{
_MyCustomProperty = CustomParameter;
}
}
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
winnie
|
|
|
|
|
check these links
http://www.developer.com/net/csharp/print.php/10918_3088231_2
http://www.developer.com/net/csharp/article.php/10918_3088231_1
http://sivasakki.blogspot.com/2007/05/soapexception-for-webservices.html
winnie
|
|
|
|
|
|
hi guys
I created a simple ASP.NET application which has a database connectivity with (SQL SERVER 2005) ,
also created a setup and deployed it in my local machine.,. the files got installed in my WWWROOT FOLDER ..
the issue is ,, only the static pages are viewed , the data from database is not getting displayed...
any idea what could be the reason behind data not binding with the DB
note : when i run using the Visual studio 2005 ,, is it working perfect ,,
winnie
|
|
|
|
|
check whether any file path specified in the web.config file to access any xml file or any other files. If yes check whether the specified path is correct from the wwwroot folder...
Regards John
|
|
|
|
|
the file paths are correct,, only the database is not connecting when deployed in wwwroot..
as said earlier the static pages are getting displayed
winnie
|
|
|
|