Showing posts with label stores. Show all posts
Showing posts with label stores. Show all posts

Monday, March 26, 2012

Serialization

Serialization stores state of the object i.e. member variable values to disk

i have read the articles on this but not clear with the concept anybody can clear what they are.

If you want examples where serialization is used you can for example take a look at the Profile feature of ASP.Net 2.0. When you add a property to the Profile in web.config, and for example specify your own type, Binary serialization will be used to save all the state of the current object into the data source. This will make sure you get all the objects state when you deserialize the data back again.

If you want to craete a deep clone of an object (copy the whole object), serialization can be used.


hiFredrik N thanks for the reply

i work in framework 1.1

and what do you mean by this

' to save all the state of the current object into the data source'

state of the object means ?


State in this context is the current "data" the object has at the current moment.


I hope the following articles gives u a lot of help

http://aspalliance.com/983

Thursday, March 22, 2012

Serious cache problem - Page_Load get never get called !

Hi,
I got a asp.net page that stores session variable.
This page gets input parameter by QueryString and this variable stored
into session variable.
Asp.net page works in normal navigation scenario.
Then I bookmarked this url to my favorites and call this url by
clicking favorites link.
When in this situation, at initial time Page_Load() of my asp.net gets
called but after first time, page never get called by clicking
favorites link.
I guess maybe IE caches the link and read it when user clicks from
favorite link.
I've tried below codes only to fail to call Page_Load(). All of them
failed.
Response.Expires = 0;
Response.Cache.SetNoStore();
Response.AppendHeader("Pragma", "no-cache");
Navigating my asp.net pages by favorites link is very possible user
scenario.
This is unavoidable.
How can I always ensure IE to read URL from Web Server not from cache
when user clicks favorites link?
Any suggestion will be appreciated. TIA. :)
Regards,
RyanAppending the header doesn't necessarily tell the browser not to cache the
page. For that, your best bet is to include the appropriate meta tag: <META
HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">. Using the meta tag may help catch
more browsers than just the response header alone.
You might also try using a Response.Flush() right after you send the pragma
header. I've seen that help in some instances.
Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
"Ryan Park" <bajy@.intizen.com> wrote in message
news:5016f0aa.0501030540.572182a1@.posting.google.com...
> Hi,
> I got a asp.net page that stores session variable.
> This page gets input parameter by QueryString and this variable stored
> into session variable.
> Asp.net page works in normal navigation scenario.
> Then I bookmarked this url to my favorites and call this url by
> clicking favorites link.
> When in this situation, at initial time Page_Load() of my asp.net gets
> called but after first time, page never get called by clicking
> favorites link.
> I guess maybe IE caches the link and read it when user clicks from
> favorite link.
> I've tried below codes only to fail to call Page_Load(). All of them
> failed.
> Response.Expires = 0;
> Response.Cache.SetNoStore();
> Response.AppendHeader("Pragma", "no-cache");
> Navigating my asp.net pages by favorites link is very possible user
> scenario.
> This is unavoidable.
> How can I always ensure IE to read URL from Web Server not from cache
> when user clicks favorites link?
> Any suggestion will be appreciated. TIA. :)
> Regards,
> Ryan
Mark Fitzpatrick wrote:
> Appending the header doesn't necessarily tell the browser not to
> cache the page.
That's correct -- the HTTP spec distinguishes between caches and histories.
For histories, Cache-Control and such do not apply.

> For that, your best bet is to include the appropriate
> meta tag: <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">. Using the
> meta tag may help catch more browsers than just the response header
> alone.
But only if the browser's HTTP implementation stinks. Out of curiosity: Can
you name any modern browser for which a META tag works, but a HTTP header
doesn't?
Cheers,
Joerg Jooss
www.joergjooss.de
news@.joergjooss.de

Serious cache problem - Page_Load get never get called !

Hi,

I got a asp.net page that stores session variable.

This page gets input parameter by QueryString and this variable stored
into session variable.

Asp.net page works in normal navigation scenario.

Then I bookmarked this url to my favorites and call this url by
clicking favorites link.

When in this situation, at initial time Page_Load() of my asp.net gets
called but after first time, page never get called by clicking
favorites link.

I guess maybe IE caches the link and read it when user clicks from
favorite link.

I've tried below codes only to fail to call Page_Load(). All of them
failed.

Response.Expires = 0;
Response.Cache.SetNoStore();
Response.AppendHeader("Pragma", "no-cache");

Navigating my asp.net pages by favorites link is very possible user
scenario.

This is unavoidable.

How can I always ensure IE to read URL from Web Server not from cache
when user clicks favorites link?

Any suggestion will be appreciated. TIA. :)

Regards,
RyanAppending the header doesn't necessarily tell the browser not to cache the
page. For that, your best bet is to include the appropriate meta tag: <META
HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">. Using the meta tag may help catch
more browsers than just the response header alone.

You might also try using a Response.Flush() right after you send the pragma
header. I've seen that help in some instances.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"Ryan Park" <bajy@.intizen.com> wrote in message
news:5016f0aa.0501030540.572182a1@.posting.google.c om...
> Hi,
> I got a asp.net page that stores session variable.
> This page gets input parameter by QueryString and this variable stored
> into session variable.
> Asp.net page works in normal navigation scenario.
> Then I bookmarked this url to my favorites and call this url by
> clicking favorites link.
> When in this situation, at initial time Page_Load() of my asp.net gets
> called but after first time, page never get called by clicking
> favorites link.
> I guess maybe IE caches the link and read it when user clicks from
> favorite link.
> I've tried below codes only to fail to call Page_Load(). All of them
> failed.
> Response.Expires = 0;
> Response.Cache.SetNoStore();
> Response.AppendHeader("Pragma", "no-cache");
> Navigating my asp.net pages by favorites link is very possible user
> scenario.
> This is unavoidable.
> How can I always ensure IE to read URL from Web Server not from cache
> when user clicks favorites link?
> Any suggestion will be appreciated. TIA. :)
> Regards,
> Ryan
Mark Fitzpatrick wrote:
> Appending the header doesn't necessarily tell the browser not to
> cache the page.

That's correct -- the HTTP spec distinguishes between caches and histories.
For histories, Cache-Control and such do not apply.

> For that, your best bet is to include the appropriate
> meta tag: <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">. Using the
> meta tag may help catch more browsers than just the response header
> alone.

But only if the browser's HTTP implementation stinks. Out of curiosity: Can
you name any modern browser for which a META tag works, but a HTTP header
doesn't?

Cheers,

--
Joerg Jooss
www.joergjooss.de
news@.joergjooss.de