|
hi..
thanks for the suggestion...
if you know any links for also pls suggest .
can anyone explain in detail ...
thnks in advance
-- modified at 9:46 Wednesday 21st February, 2007
Rama Charan Prasad
"Be happy and Keep smiling.Thats what u want be always.. "
|
|
|
|
|
I will try to explain you in more details.
Session Vs Cookies
1) Session objects are stored in server memory e.g IIS memory on the other hand cookies stored at client machine.
2) Now when it is stored at client machine then we can have some concerns like
security, cookieless browser, user delete the cookies etc...
3) Issues with Session is, if your server goes down then you loose the session value if you are using inproc session mgt.
4) Session can not be used in case of web farming (Load balancing)
SO now it is upto you as application arch, where you want to store....And if you need more information then google it...Session Vs Cookies....
Thanks
Amit
|
|
|
|
|
thanks for reply ...its very clear
its new thing i learnt that " session cannot be used in webfarming "<--can i know why? then only way to solve the issue then is to use cookies?
i want to make my question once again clear that i am asking when to use what ,
may be some realtime scenarios if possible or what tradeoff or tips we can use for making a balanced application .maybe like what data can be used for sessions data and what data can be used for storing in cookies?
anyone more who want to share your views more about when to use cookies and when to use sessions are please welcome to write it down here......
thnks for your effort and time in advance
Rama Charan Prasad
"Be happy and Keep smiling.Thats what u want be always.. "
|
|
|
|
|
"may i know the life cycle of web server control"
with regards
ravi kiran
|
|
|
|
|
|
|
hi all ,
i have need to get the pdf file from the byte[].
byte[] bytePdf = _objCashier.CreateRaiseCCLimitPDF("username");
now i have need to lounch the pdf file from the aspx page.
please help.
Thanks in advance
Srinandan
|
|
|
|
|
What do you mean with 'launch' the pdf file?? Do you want to open it?? And do you want to open it server side, or client side??
I reckon you store the byte[] in a file and link to that file using a hyperlink...
|
|
|
|
|
thanks.
lauch mean i have to provide the option to save or open the pfd file which will create from the byte[].
Srinandan
|
|
|
|
|
Response.Clear();
Response.ClearContent();
Response.ClearHeaders();
Response.Buffer = true;
Response.ContentType = "application/pdf";
Response.BinaryWrite(bytePdf);
Response.Flush();
Response.End();
-- modified at 6:00 Wednesday 21st February, 2007
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
sylvester_g_m@yahoo.com
|
|
|
|
|
thanks sylveseter,
here is the my code snippet:
protected void btnDownloadForm_Click(object sender, EventArgs e)
{
//DataTable _dtRaiseDepositLevel = new DataTable();
//_dtRaiseDepositLevel = _objXmlHelper.getResult(_objCashier.CreateRaiseCCLimitPDF());
byte[] bytePdf = _objCashier.CreateRaiseCCLimitPDF(MerchantUser.UserName, MerchantUser.Password, (string)Session["Username"]);
char[] charPdf = new char[bytePdf.Length];
Response.Clear();
Response.ClearContent();
Response.ClearHeaders();
Response.Buffer = true;
Response.ContentType = "application/pdf";
Response.BinaryWrite(bytePdf);
Response.Flush();
Response.End();
}
bebugging goes successfully but i am unable to find the pdf file.
pls tell me what wrong i am doing.
Regards
Srinandan
|
|
|
|
|
you want to show download dialog or show the pdf in the browser?
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
sylvester_g_m@yahoo.com
|
|
|
|
|
thanks
i want to show download dialog box. but above code not show the pdf file in browser or otion like download
srinandan
|
|
|
|
|
FileStream fs = new FileStream(Server.MapPath("Filename.pdf"),FileMode.Create);
BinaryWriter bw = new BinaryWriter(fs);
bw.Write(bytePDF);
fs.Close();
// Disable caching this page (C#)
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Buffer = true;
Response.ContentType = "application/binary";
Response.AppendHeader("Content-Disposition: attachment; " +
filename=Filename.pdf");
Response.WriteFile(Server.MapPath("Filename.pdf");
Response.End();
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
sylvester_g_m@yahoo.com
|
|
|
|
|
Thanks Sylvester
great.
Its working fine.
Regards
Srinandan
|
|
|
|
|
You are most welcome. Please score it.
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
sylvester_g_m@yahoo.com
|
|
|
|
|
|
Khan_Coder wrote: Hello Sandeep,
Did u work on my issue. Did u find out the source of error.
Why would he work on YOUR problem. Surely you should be working on your problem. The people here are only here to help when they can. Not to do other people's work for them.
|
|
|
|
|
Sorry Khan
I failed to find it out Actually i similar application its working fine
<l>Thanks and Regards
Sandeep
|
|
|
|
|
Khan
i think this is not way to reply anyone ......
i tried my best and i don't know what you have done other than that you have shown
<l>Thanks and Regards
Sandeep
|
|
|
|
|
hi khan
may be you can better use the option to "delete post" or "alter it" to delete such messages posted by error..
sorry for interfering ...i hope it helps u in future...
Rama Charan Prasad
"Be happy and Keep smiling.Thats what u want be always.. "
|
|
|
|
|
hi...
how can i redirect to desired page after forms authentication is successful from the login page instead of redirecting to "default.aspx" which my application is redirecting to?
thanks for help in advance.
Rama Charan Prasad
"Be happy and Keep smiling.Thats what u want always.. "
|
|
|
|
|
i am not very experienced in ASP.NET but what i would do is put the redirecting code in the pageload event of the default.aspx page. so, when a user is redirected from the login page to the default.aspx page, the code can determine where to redirect the user according to the information stored in the authentication cookie.
hope this helps.;)
|
|
|
|
|
thnks for your help and also for trying.
thts a good suggestion.but i have solved it by changing my default page which should load after login to "default.aspx" so its working .
BUT I dont want to do like that but i want to know how can i redirect to specified page .
thnks for help in advance
Rama Charan Prasad
"Be happy and Keep smiling.Thats what u want be always.. "
|
|
|
|
|
for example you have a page called "abc.aspx" which user should do login here...ok?
you need another page called "def.aspx" to appear after the user have login.
So you need to define a bool variable forexample " check " ...
then set the check ( boolean ) with ur login statement ( checking user name and password ) ...then if the "check" is true then u need to have a code there to redirect to "def.aspx"
|
|
|
|