nitin.randive
April 17th, 2008, 05:15 AM
Hi !
I am new to asp.net.
I m doing a project where in a mobile user is hitting my page for login authentication where in I accept the username & password, authenticate it , and send a response to him back.
When I use GET method it works fine but theres a problem in POST method
public void subResponse(string contents)
{
txtArr = System.Text.Encoding.Default.GetBytes(contents);
try
{
Response.Clear();
Response.OutputStream.Write(txtArr, 0, txtArr.Length);
objToErrorFile.writeResponse(contents, Server.MapPath(ConfigurationSettings.AppSettings["ErrorInfoDirectory"]));
Response.BinaryWrite(txtArr);
Response.End();
}
catch (Exception ex)
{
objToErrorFile.LogToErrorFile(ex.Message, ex.StackTrace, "Class: serverform Function/Sub: subResponse", Server.MapPath(ConfigurationSettings.AppSettings["ErrorInfoDirectory"]));
}
}
I used the above code
But the response he gets is as below :-
(J2ME response)
Running with storage root DefaultColorPhone
Running with locale: English_United States.1252
Running in the identified_third_party security domain
RMS Value : 0
http://58.68.117.35:81/myEstoreIt/loginauth.aspx
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head><title>
Untitled Page
</title></head>
<body>
<form name="form1" method="post" action="loginauth.aspx" id="form1">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJNzgzNDMwNTMzZGSobwWSO4/egAdSFWX+8ZI1qYf/Iw==" />
<div>
</div>
</form>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head><title>
Untitled Page
</title></head>
<body>
<form name="form1" method="post" action="loginauth.aspx" id="form1">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJNzgzNDMwNTMzZGSobwWSO4/egAdSFWX+8ZI1qYf/Iw==" />
<div>
</div>
</form>
</body>
</html>
Please help me in solving this problem
What type of response is this ?
Thanks in adv
I am new to asp.net.
I m doing a project where in a mobile user is hitting my page for login authentication where in I accept the username & password, authenticate it , and send a response to him back.
When I use GET method it works fine but theres a problem in POST method
public void subResponse(string contents)
{
txtArr = System.Text.Encoding.Default.GetBytes(contents);
try
{
Response.Clear();
Response.OutputStream.Write(txtArr, 0, txtArr.Length);
objToErrorFile.writeResponse(contents, Server.MapPath(ConfigurationSettings.AppSettings["ErrorInfoDirectory"]));
Response.BinaryWrite(txtArr);
Response.End();
}
catch (Exception ex)
{
objToErrorFile.LogToErrorFile(ex.Message, ex.StackTrace, "Class: serverform Function/Sub: subResponse", Server.MapPath(ConfigurationSettings.AppSettings["ErrorInfoDirectory"]));
}
}
I used the above code
But the response he gets is as below :-
(J2ME response)
Running with storage root DefaultColorPhone
Running with locale: English_United States.1252
Running in the identified_third_party security domain
RMS Value : 0
http://58.68.117.35:81/myEstoreIt/loginauth.aspx
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head><title>
Untitled Page
</title></head>
<body>
<form name="form1" method="post" action="loginauth.aspx" id="form1">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJNzgzNDMwNTMzZGSobwWSO4/egAdSFWX+8ZI1qYf/Iw==" />
<div>
</div>
</form>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head><title>
Untitled Page
</title></head>
<body>
<form name="form1" method="post" action="loginauth.aspx" id="form1">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJNzgzNDMwNTMzZGSobwWSO4/egAdSFWX+8ZI1qYf/Iw==" />
<div>
</div>
</form>
</body>
</html>
Please help me in solving this problem
What type of response is this ?
Thanks in adv