Invalid ViewState Problems

Discussion in 'ASP .Net' started by =?Utf-8?B?R2lsZXMgUGFwd29ydGg=?=, Jun 11, 2007.

  1. I seem to be getting this error message all of a sudden on one of my web apps:

    [HttpException (0x80004005): Unable to validate data.]
    System.Web.Configuration.MachineKey.GetDecodedData(Byte[] buf, Byte[]
    modifier, Int32 start, Int32 length, Int32& dataLength) +195
    System.Web.UI.LosFormatter.Deserialize(String input) +60

    [HttpException (0x80004005): Authentication of viewstate failed. 1) If this
    is a cluster, edit <machineKey> configuration so all servers use the same
    validationKey and validation algorithm. AutoGenerate cannot be used in a
    cluster. 2) Viewstate can only be posted back to the same page. 3) The
    viewstate for this page might be corrupted.]
    System.Web.UI.LosFormatter.Deserialize(String input) +117
    System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +102

    [HttpException (0x80004005): Invalid_Viewstate


    And it goes on to explain about the page. On one development machine this
    works and then on mine this doesn't. Any ideas why this would suddenly start
    happening?
     
    =?Utf-8?B?R2lsZXMgUGFwd29ydGg=?=, Jun 11, 2007
    #1
    1. Advertising

  2. Hi Giles,
    There are 2 things you need to make sure of.
    1 . If these machines are part of a webfarm make sure all web.config
    validationKey,
    decryptionKey have the same value across all machines.
    2. All objects you place in viewstate are serializable.

    Thanks,
    Aris

    "Giles Papworth" wrote:

    > I seem to be getting this error message all of a sudden on one of my web apps:
    >
    > [HttpException (0x80004005): Unable to validate data.]
    > System.Web.Configuration.MachineKey.GetDecodedData(Byte[] buf, Byte[]
    > modifier, Int32 start, Int32 length, Int32& dataLength) +195
    > System.Web.UI.LosFormatter.Deserialize(String input) +60
    >
    > [HttpException (0x80004005): Authentication of viewstate failed. 1) If this
    > is a cluster, edit <machineKey> configuration so all servers use the same
    > validationKey and validation algorithm. AutoGenerate cannot be used in a
    > cluster. 2) Viewstate can only be posted back to the same page. 3) The
    > viewstate for this page might be corrupted.]
    > System.Web.UI.LosFormatter.Deserialize(String input) +117
    > System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +102
    >
    > [HttpException (0x80004005): Invalid_Viewstate
    >
    >
    > And it goes on to explain about the page. On one development machine this
    > works and then on mine this doesn't. Any ideas why this would suddenly start
    > happening?
     
    =?Utf-8?B?QXJpcyBIb3ViYXZsaXM=?=, Jun 11, 2007
    #2
    1. Advertising

  3. Hi Aris,

    These machines are definatly not part of a web farm and the objects are
    definatly serializable.
    I have changed my machine config to make sure that isn't causing the problem
    however if i do that, the viewstate problem goes away and another appears.
    Strangly enough it is only this one web app. All the others seem to work fine.

    "Aris Houbavlis" wrote:

    > Hi Giles,
    > There are 2 things you need to make sure of.
    > 1 . If these machines are part of a webfarm make sure all web.config
    > validationKey,
    > decryptionKey have the same value across all machines.
    > 2. All objects you place in viewstate are serializable.
    >
    > Thanks,
    > Aris
    >
    > "Giles Papworth" wrote:
    >
    > > I seem to be getting this error message all of a sudden on one of my web apps:
    > >
    > > [HttpException (0x80004005): Unable to validate data.]
    > > System.Web.Configuration.MachineKey.GetDecodedData(Byte[] buf, Byte[]
    > > modifier, Int32 start, Int32 length, Int32& dataLength) +195
    > > System.Web.UI.LosFormatter.Deserialize(String input) +60
    > >
    > > [HttpException (0x80004005): Authentication of viewstate failed. 1) If this
    > > is a cluster, edit <machineKey> configuration so all servers use the same
    > > validationKey and validation algorithm. AutoGenerate cannot be used in a
    > > cluster. 2) Viewstate can only be posted back to the same page. 3) The
    > > viewstate for this page might be corrupted.]
    > > System.Web.UI.LosFormatter.Deserialize(String input) +117
    > > System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +102
    > >
    > > [HttpException (0x80004005): Invalid_Viewstate
    > >
    > >
    > > And it goes on to explain about the page. On one development machine this
    > > works and then on mine this doesn't. Any ideas why this would suddenly start
    > > happening?
     
    =?Utf-8?B?R2lsZXMgUGFwd29ydGg=?=, Jun 11, 2007
    #3
  4. Also i have now changed my machine key and that seems to have resolved that
    problem but now the session seems to be ending everytime i have posted data
    to another page.

    "Aris Houbavlis" wrote:

    > Hi Giles,
    > There are 2 things you need to make sure of.
    > 1 . If these machines are part of a webfarm make sure all web.config
    > validationKey,
    > decryptionKey have the same value across all machines.
    > 2. All objects you place in viewstate are serializable.
    >
    > Thanks,
    > Aris
    >
    > "Giles Papworth" wrote:
    >
    > > I seem to be getting this error message all of a sudden on one of my web apps:
    > >
    > > [HttpException (0x80004005): Unable to validate data.]
    > > System.Web.Configuration.MachineKey.GetDecodedData(Byte[] buf, Byte[]
    > > modifier, Int32 start, Int32 length, Int32& dataLength) +195
    > > System.Web.UI.LosFormatter.Deserialize(String input) +60
    > >
    > > [HttpException (0x80004005): Authentication of viewstate failed. 1) If this
    > > is a cluster, edit <machineKey> configuration so all servers use the same
    > > validationKey and validation algorithm. AutoGenerate cannot be used in a
    > > cluster. 2) Viewstate can only be posted back to the same page. 3) The
    > > viewstate for this page might be corrupted.]
    > > System.Web.UI.LosFormatter.Deserialize(String input) +117
    > > System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +102
    > >
    > > [HttpException (0x80004005): Invalid_Viewstate
    > >
    > >
    > > And it goes on to explain about the page. On one development machine this
    > > works and then on mine this doesn't. Any ideas why this would suddenly start
    > > happening?
     
    =?Utf-8?B?R2lsZXMgUGFwd29ydGg=?=, Jun 12, 2007
    #4
  5. Hi Giles,
    Try adding this in your web.config
    <pages buffer="true" enableSessionState="true" enableViewState="true"
    enableViewStateMac="false" />

    Aris

    "Giles Papworth" wrote:

    > Also i have now changed my machine key and that seems to have resolved that
    > problem but now the session seems to be ending everytime i have posted data
    > to another page.
    >
    > "Aris Houbavlis" wrote:
    >
    > > Hi Giles,
    > > There are 2 things you need to make sure of.
    > > 1 . If these machines are part of a webfarm make sure all web.config
    > > validationKey,
    > > decryptionKey have the same value across all machines.
    > > 2. All objects you place in viewstate are serializable.
    > >
    > > Thanks,
    > > Aris
    > >
    > > "Giles Papworth" wrote:
    > >
    > > > I seem to be getting this error message all of a sudden on one of my web apps:
    > > >
    > > > [HttpException (0x80004005): Unable to validate data.]
    > > > System.Web.Configuration.MachineKey.GetDecodedData(Byte[] buf, Byte[]
    > > > modifier, Int32 start, Int32 length, Int32& dataLength) +195
    > > > System.Web.UI.LosFormatter.Deserialize(String input) +60
    > > >
    > > > [HttpException (0x80004005): Authentication of viewstate failed. 1) If this
    > > > is a cluster, edit <machineKey> configuration so all servers use the same
    > > > validationKey and validation algorithm. AutoGenerate cannot be used in a
    > > > cluster. 2) Viewstate can only be posted back to the same page. 3) The
    > > > viewstate for this page might be corrupted.]
    > > > System.Web.UI.LosFormatter.Deserialize(String input) +117
    > > > System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +102
    > > >
    > > > [HttpException (0x80004005): Invalid_Viewstate
    > > >
    > > >
    > > > And it goes on to explain about the page. On one development machine this
    > > > works and then on mine this doesn't. Any ideas why this would suddenly start
    > > > happening?
     
    =?Utf-8?B?QXJpcyBIb3ViYXZsaXM=?=, Jun 12, 2007
    #5
  6. What section in the web.config does that go in?

    "Aris Houbavlis" wrote:

    > Hi Giles,
    > Try adding this in your web.config
    > <pages buffer="true" enableSessionState="true" enableViewState="true"
    > enableViewStateMac="false" />
    >
    > Aris
    >
    > "Giles Papworth" wrote:
    >
    > > Also i have now changed my machine key and that seems to have resolved that
    > > problem but now the session seems to be ending everytime i have posted data
    > > to another page.
    > >
    > > "Aris Houbavlis" wrote:
    > >
    > > > Hi Giles,
    > > > There are 2 things you need to make sure of.
    > > > 1 . If these machines are part of a webfarm make sure all web.config
    > > > validationKey,
    > > > decryptionKey have the same value across all machines.
    > > > 2. All objects you place in viewstate are serializable.
    > > >
    > > > Thanks,
    > > > Aris
    > > >
    > > > "Giles Papworth" wrote:
    > > >
    > > > > I seem to be getting this error message all of a sudden on one of my web apps:
    > > > >
    > > > > [HttpException (0x80004005): Unable to validate data.]
    > > > > System.Web.Configuration.MachineKey.GetDecodedData(Byte[] buf, Byte[]
    > > > > modifier, Int32 start, Int32 length, Int32& dataLength) +195
    > > > > System.Web.UI.LosFormatter.Deserialize(String input) +60
    > > > >
    > > > > [HttpException (0x80004005): Authentication of viewstate failed. 1) If this
    > > > > is a cluster, edit <machineKey> configuration so all servers use the same
    > > > > validationKey and validation algorithm. AutoGenerate cannot be used in a
    > > > > cluster. 2) Viewstate can only be posted back to the same page. 3) The
    > > > > viewstate for this page might be corrupted.]
    > > > > System.Web.UI.LosFormatter.Deserialize(String input) +117
    > > > > System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +102
    > > > >
    > > > > [HttpException (0x80004005): Invalid_Viewstate
    > > > >
    > > > >
    > > > > And it goes on to explain about the page. On one development machine this
    > > > > works and then on mine this doesn't. Any ideas why this would suddenly start
    > > > > happening?
     
    =?Utf-8?B?R2lsZXMgUGFwd29ydGg=?=, Jun 12, 2007
    #6
  7. <configuration>
    <system.web>
    <pages buffer="true" ...
    ...
    ...
    ...
    ...
    </system.web>
    </configuration>


    "Giles Papworth" wrote:

    > What section in the web.config does that go in?
    >
    > "Aris Houbavlis" wrote:
    >
    > > Hi Giles,
    > > Try adding this in your web.config
    > > <pages buffer="true" enableSessionState="true" enableViewState="true"
    > > enableViewStateMac="false" />
    > >
    > > Aris
    > >
    > > "Giles Papworth" wrote:
    > >
    > > > Also i have now changed my machine key and that seems to have resolved that
    > > > problem but now the session seems to be ending everytime i have posted data
    > > > to another page.
    > > >
    > > > "Aris Houbavlis" wrote:
    > > >
    > > > > Hi Giles,
    > > > > There are 2 things you need to make sure of.
    > > > > 1 . If these machines are part of a webfarm make sure all web.config
    > > > > validationKey,
    > > > > decryptionKey have the same value across all machines.
    > > > > 2. All objects you place in viewstate are serializable.
    > > > >
    > > > > Thanks,
    > > > > Aris
    > > > >
    > > > > "Giles Papworth" wrote:
    > > > >
    > > > > > I seem to be getting this error message all of a sudden on one of my web apps:
    > > > > >
    > > > > > [HttpException (0x80004005): Unable to validate data.]
    > > > > > System.Web.Configuration.MachineKey.GetDecodedData(Byte[] buf, Byte[]
    > > > > > modifier, Int32 start, Int32 length, Int32& dataLength) +195
    > > > > > System.Web.UI.LosFormatter.Deserialize(String input) +60
    > > > > >
    > > > > > [HttpException (0x80004005): Authentication of viewstate failed. 1) If this
    > > > > > is a cluster, edit <machineKey> configuration so all servers use the same
    > > > > > validationKey and validation algorithm. AutoGenerate cannot be used in a
    > > > > > cluster. 2) Viewstate can only be posted back to the same page. 3) The
    > > > > > viewstate for this page might be corrupted.]
    > > > > > System.Web.UI.LosFormatter.Deserialize(String input) +117
    > > > > > System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +102
    > > > > >
    > > > > > [HttpException (0x80004005): Invalid_Viewstate
    > > > > >
    > > > > >
    > > > > > And it goes on to explain about the page. On one development machine this
    > > > > > works and then on mine this doesn't. Any ideas why this would suddenly start
    > > > > > happening?
     
    =?Utf-8?B?QXJpcyBIb3ViYXZsaXM=?=, Jun 12, 2007
    #7
  8. Thanks for that but it seems to have made no difference.

    "Aris Houbavlis" wrote:

    > <configuration>
    > <system.web>
    > <pages buffer="true" ...
    > ...
    > ...
    > ...
    > ...
    > </system.web>
    > </configuration>
    >
    >
    > "Giles Papworth" wrote:
    >
    > > What section in the web.config does that go in?
    > >
    > > "Aris Houbavlis" wrote:
    > >
    > > > Hi Giles,
    > > > Try adding this in your web.config
    > > > <pages buffer="true" enableSessionState="true" enableViewState="true"
    > > > enableViewStateMac="false" />
    > > >
    > > > Aris
    > > >
    > > > "Giles Papworth" wrote:
    > > >
    > > > > Also i have now changed my machine key and that seems to have resolved that
    > > > > problem but now the session seems to be ending everytime i have posted data
    > > > > to another page.
    > > > >
    > > > > "Aris Houbavlis" wrote:
    > > > >
    > > > > > Hi Giles,
    > > > > > There are 2 things you need to make sure of.
    > > > > > 1 . If these machines are part of a webfarm make sure all web.config
    > > > > > validationKey,
    > > > > > decryptionKey have the same value across all machines.
    > > > > > 2. All objects you place in viewstate are serializable.
    > > > > >
    > > > > > Thanks,
    > > > > > Aris
    > > > > >
    > > > > > "Giles Papworth" wrote:
    > > > > >
    > > > > > > I seem to be getting this error message all of a sudden on one of my web apps:
    > > > > > >
    > > > > > > [HttpException (0x80004005): Unable to validate data.]
    > > > > > > System.Web.Configuration.MachineKey.GetDecodedData(Byte[] buf, Byte[]
    > > > > > > modifier, Int32 start, Int32 length, Int32& dataLength) +195
    > > > > > > System.Web.UI.LosFormatter.Deserialize(String input) +60
    > > > > > >
    > > > > > > [HttpException (0x80004005): Authentication of viewstate failed. 1) If this
    > > > > > > is a cluster, edit <machineKey> configuration so all servers use the same
    > > > > > > validationKey and validation algorithm. AutoGenerate cannot be used in a
    > > > > > > cluster. 2) Viewstate can only be posted back to the same page. 3) The
    > > > > > > viewstate for this page might be corrupted.]
    > > > > > > System.Web.UI.LosFormatter.Deserialize(String input) +117
    > > > > > > System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +102
    > > > > > >
    > > > > > > [HttpException (0x80004005): Invalid_Viewstate
    > > > > > >
    > > > > > >
    > > > > > > And it goes on to explain about the page. On one development machine this
    > > > > > > works and then on mine this doesn't. Any ideas why this would suddenly start
    > > > > > > happening?
     
    =?Utf-8?B?R2lsZXMgUGFwd29ydGg=?=, Jun 12, 2007
    #8
  9. what state server setting do u have?
    InProc,
    SqlServer,
    StateServer,
    Off (Disables session state)

    <system.web>
    <sessionState mode="StateServer"
    stateConnectionString="tcpip=SampleStateServer:42424"
    cookieless="false"
    timeout="20"/>
    ....
    ....
    ....
    </system.web

    "Giles Papworth" wrote:

    > Thanks for that but it seems to have made no difference.
    >
    > "Aris Houbavlis" wrote:
    >
    > > <configuration>
    > > <system.web>
    > > <pages buffer="true" ...
    > > ...
    > > ...
    > > ...
    > > ...
    > > </system.web>
    > > </configuration>
    > >
    > >
    > > "Giles Papworth" wrote:
    > >
    > > > What section in the web.config does that go in?
    > > >
    > > > "Aris Houbavlis" wrote:
    > > >
    > > > > Hi Giles,
    > > > > Try adding this in your web.config
    > > > > <pages buffer="true" enableSessionState="true" enableViewState="true"
    > > > > enableViewStateMac="false" />
    > > > >
    > > > > Aris
    > > > >
    > > > > "Giles Papworth" wrote:
    > > > >
    > > > > > Also i have now changed my machine key and that seems to have resolved that
    > > > > > problem but now the session seems to be ending everytime i have posted data
    > > > > > to another page.
    > > > > >
    > > > > > "Aris Houbavlis" wrote:
    > > > > >
    > > > > > > Hi Giles,
    > > > > > > There are 2 things you need to make sure of.
    > > > > > > 1 . If these machines are part of a webfarm make sure all web.config
    > > > > > > validationKey,
    > > > > > > decryptionKey have the same value across all machines.
    > > > > > > 2. All objects you place in viewstate are serializable.
    > > > > > >
    > > > > > > Thanks,
    > > > > > > Aris
    > > > > > >
    > > > > > > "Giles Papworth" wrote:
    > > > > > >
    > > > > > > > I seem to be getting this error message all of a sudden on one of my web apps:
    > > > > > > >
    > > > > > > > [HttpException (0x80004005): Unable to validate data.]
    > > > > > > > System.Web.Configuration.MachineKey.GetDecodedData(Byte[] buf, Byte[]
    > > > > > > > modifier, Int32 start, Int32 length, Int32& dataLength) +195
    > > > > > > > System.Web.UI.LosFormatter.Deserialize(String input) +60
    > > > > > > >
    > > > > > > > [HttpException (0x80004005): Authentication of viewstate failed. 1) If this
    > > > > > > > is a cluster, edit <machineKey> configuration so all servers use the same
    > > > > > > > validationKey and validation algorithm. AutoGenerate cannot be used in a
    > > > > > > > cluster. 2) Viewstate can only be posted back to the same page. 3) The
    > > > > > > > viewstate for this page might be corrupted.]
    > > > > > > > System.Web.UI.LosFormatter.Deserialize(String input) +117
    > > > > > > > System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +102
    > > > > > > >
    > > > > > > > [HttpException (0x80004005): Invalid_Viewstate
    > > > > > > >
    > > > > > > >
    > > > > > > > And it goes on to explain about the page. On one development machine this
    > > > > > > > works and then on mine this doesn't. Any ideas why this would suddenly start
    > > > > > > > happening?
     
    =?Utf-8?B?QXJpcyBIb3ViYXZsaXM=?=, Jun 12, 2007
    #9
  10. <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424"
    sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
    cookieless="false" timeout="20"/>

    "Aris Houbavlis" wrote:

    > what state server setting do u have?
    > InProc,
    > SqlServer,
    > StateServer,
    > Off (Disables session state)
    >
    > <system.web>
    > <sessionState mode="StateServer"
    > stateConnectionString="tcpip=SampleStateServer:42424"
    > cookieless="false"
    > timeout="20"/>
    > ....
    > ....
    > ....
    > </system.web
    >
    > "Giles Papworth" wrote:
    >
    > > Thanks for that but it seems to have made no difference.
    > >
    > > "Aris Houbavlis" wrote:
    > >
    > > > <configuration>
    > > > <system.web>
    > > > <pages buffer="true" ...
    > > > ...
    > > > ...
    > > > ...
    > > > ...
    > > > </system.web>
    > > > </configuration>
    > > >
    > > >
    > > > "Giles Papworth" wrote:
    > > >
    > > > > What section in the web.config does that go in?
    > > > >
    > > > > "Aris Houbavlis" wrote:
    > > > >
    > > > > > Hi Giles,
    > > > > > Try adding this in your web.config
    > > > > > <pages buffer="true" enableSessionState="true" enableViewState="true"
    > > > > > enableViewStateMac="false" />
    > > > > >
    > > > > > Aris
    > > > > >
    > > > > > "Giles Papworth" wrote:
    > > > > >
    > > > > > > Also i have now changed my machine key and that seems to have resolved that
    > > > > > > problem but now the session seems to be ending everytime i have posted data
    > > > > > > to another page.
    > > > > > >
    > > > > > > "Aris Houbavlis" wrote:
    > > > > > >
    > > > > > > > Hi Giles,
    > > > > > > > There are 2 things you need to make sure of.
    > > > > > > > 1 . If these machines are part of a webfarm make sure all web.config
    > > > > > > > validationKey,
    > > > > > > > decryptionKey have the same value across all machines.
    > > > > > > > 2. All objects you place in viewstate are serializable.
    > > > > > > >
    > > > > > > > Thanks,
    > > > > > > > Aris
    > > > > > > >
    > > > > > > > "Giles Papworth" wrote:
    > > > > > > >
    > > > > > > > > I seem to be getting this error message all of a sudden on one of my web apps:
    > > > > > > > >
    > > > > > > > > [HttpException (0x80004005): Unable to validate data.]
    > > > > > > > > System.Web.Configuration.MachineKey.GetDecodedData(Byte[] buf, Byte[]
    > > > > > > > > modifier, Int32 start, Int32 length, Int32& dataLength) +195
    > > > > > > > > System.Web.UI.LosFormatter.Deserialize(String input) +60
    > > > > > > > >
    > > > > > > > > [HttpException (0x80004005): Authentication of viewstate failed. 1) If this
    > > > > > > > > is a cluster, edit <machineKey> configuration so all servers use the same
    > > > > > > > > validationKey and validation algorithm. AutoGenerate cannot be used in a
    > > > > > > > > cluster. 2) Viewstate can only be posted back to the same page. 3) The
    > > > > > > > > viewstate for this page might be corrupted.]
    > > > > > > > > System.Web.UI.LosFormatter.Deserialize(String input) +117
    > > > > > > > > System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +102
    > > > > > > > >
    > > > > > > > > [HttpException (0x80004005): Invalid_Viewstate
    > > > > > > > >
    > > > > > > > >
    > > > > > > > > And it goes on to explain about the page. On one development machine this
    > > > > > > > > works and then on mine this doesn't. Any ideas why this would suddenly start
    > > > > > > > > happening?
     
    =?Utf-8?B?R2lsZXMgUGFwd29ydGg=?=, Jun 12, 2007
    #10
  11. Hi Giles,
    Any info in the event viewer?
    Could be that the IIS is recycling, for some odd reason.
    I would try to set session to STATESERVER.
    Look here for ref:
    http://msdn2.microsoft.com/en-us/library/h6bb9cz9(vs.80).aspx
    See if it resolves the Session problem u are experiencing.

    Aris

    "Giles Papworth" wrote:

    > <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424"
    > sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
    > cookieless="false" timeout="20"/>
    >
    > "Aris Houbavlis" wrote:
    >
    > > what state server setting do u have?
    > > InProc,
    > > SqlServer,
    > > StateServer,
    > > Off (Disables session state)
    > >
    > > <system.web>
    > > <sessionState mode="StateServer"
    > > stateConnectionString="tcpip=SampleStateServer:42424"
    > > cookieless="false"
    > > timeout="20"/>
    > > ....
    > > ....
    > > ....
    > > </system.web
    > >
    > > "Giles Papworth" wrote:
    > >
    > > > Thanks for that but it seems to have made no difference.
    > > >
    > > > "Aris Houbavlis" wrote:
    > > >
    > > > > <configuration>
    > > > > <system.web>
    > > > > <pages buffer="true" ...
    > > > > ...
    > > > > ...
    > > > > ...
    > > > > ...
    > > > > </system.web>
    > > > > </configuration>
    > > > >
    > > > >
    > > > > "Giles Papworth" wrote:
    > > > >
    > > > > > What section in the web.config does that go in?
    > > > > >
    > > > > > "Aris Houbavlis" wrote:
    > > > > >
    > > > > > > Hi Giles,
    > > > > > > Try adding this in your web.config
    > > > > > > <pages buffer="true" enableSessionState="true" enableViewState="true"
    > > > > > > enableViewStateMac="false" />
    > > > > > >
    > > > > > > Aris
    > > > > > >
    > > > > > > "Giles Papworth" wrote:
    > > > > > >
    > > > > > > > Also i have now changed my machine key and that seems to have resolved that
    > > > > > > > problem but now the session seems to be ending everytime i have posted data
    > > > > > > > to another page.
    > > > > > > >
    > > > > > > > "Aris Houbavlis" wrote:
    > > > > > > >
    > > > > > > > > Hi Giles,
    > > > > > > > > There are 2 things you need to make sure of.
    > > > > > > > > 1 . If these machines are part of a webfarm make sure all web.config
    > > > > > > > > validationKey,
    > > > > > > > > decryptionKey have the same value across all machines.
    > > > > > > > > 2. All objects you place in viewstate are serializable.
    > > > > > > > >
    > > > > > > > > Thanks,
    > > > > > > > > Aris
    > > > > > > > >
    > > > > > > > > "Giles Papworth" wrote:
    > > > > > > > >
    > > > > > > > > > I seem to be getting this error message all of a sudden on one of my web apps:
    > > > > > > > > >
    > > > > > > > > > [HttpException (0x80004005): Unable to validate data.]
    > > > > > > > > > System.Web.Configuration.MachineKey.GetDecodedData(Byte[] buf, Byte[]
    > > > > > > > > > modifier, Int32 start, Int32 length, Int32& dataLength) +195
    > > > > > > > > > System.Web.UI.LosFormatter.Deserialize(String input) +60
    > > > > > > > > >
    > > > > > > > > > [HttpException (0x80004005): Authentication of viewstate failed. 1) If this
    > > > > > > > > > is a cluster, edit <machineKey> configuration so all servers use the same
    > > > > > > > > > validationKey and validation algorithm. AutoGenerate cannot be used in a
    > > > > > > > > > cluster. 2) Viewstate can only be posted back to the same page. 3) The
    > > > > > > > > > viewstate for this page might be corrupted.]
    > > > > > > > > > System.Web.UI.LosFormatter.Deserialize(String input) +117
    > > > > > > > > > System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +102
    > > > > > > > > >
    > > > > > > > > > [HttpException (0x80004005): Invalid_Viewstate
    > > > > > > > > >
    > > > > > > > > >
    > > > > > > > > > And it goes on to explain about the page. On one development machine this
    > > > > > > > > > works and then on mine this doesn't. Any ideas why this would suddenly start
    > > > > > > > > > happening?
     
    =?Utf-8?B?QXJpcyBIb3ViYXZsaXM=?=, Jun 12, 2007
    #11
  12. I will add that in and see if it does the job.

    "Aris Houbavlis" wrote:

    > Hi Giles,
    > Any info in the event viewer?
    > Could be that the IIS is recycling, for some odd reason.
    > I would try to set session to STATESERVER.
    > Look here for ref:
    > http://msdn2.microsoft.com/en-us/library/h6bb9cz9(vs.80).aspx
    > See if it resolves the Session problem u are experiencing.
    >
    > Aris
    >
    > "Giles Papworth" wrote:
    >
    > > <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424"
    > > sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
    > > cookieless="false" timeout="20"/>
    > >
    > > "Aris Houbavlis" wrote:
    > >
    > > > what state server setting do u have?
    > > > InProc,
    > > > SqlServer,
    > > > StateServer,
    > > > Off (Disables session state)
    > > >
    > > > <system.web>
    > > > <sessionState mode="StateServer"
    > > > stateConnectionString="tcpip=SampleStateServer:42424"
    > > > cookieless="false"
    > > > timeout="20"/>
    > > > ....
    > > > ....
    > > > ....
    > > > </system.web
    > > >
    > > > "Giles Papworth" wrote:
    > > >
    > > > > Thanks for that but it seems to have made no difference.
    > > > >
    > > > > "Aris Houbavlis" wrote:
    > > > >
    > > > > > <configuration>
    > > > > > <system.web>
    > > > > > <pages buffer="true" ...
    > > > > > ...
    > > > > > ...
    > > > > > ...
    > > > > > ...
    > > > > > </system.web>
    > > > > > </configuration>
    > > > > >
    > > > > >
    > > > > > "Giles Papworth" wrote:
    > > > > >
    > > > > > > What section in the web.config does that go in?
    > > > > > >
    > > > > > > "Aris Houbavlis" wrote:
    > > > > > >
    > > > > > > > Hi Giles,
    > > > > > > > Try adding this in your web.config
    > > > > > > > <pages buffer="true" enableSessionState="true" enableViewState="true"
    > > > > > > > enableViewStateMac="false" />
    > > > > > > >
    > > > > > > > Aris
    > > > > > > >
    > > > > > > > "Giles Papworth" wrote:
    > > > > > > >
    > > > > > > > > Also i have now changed my machine key and that seems to have resolved that
    > > > > > > > > problem but now the session seems to be ending everytime i have posted data
    > > > > > > > > to another page.
    > > > > > > > >
    > > > > > > > > "Aris Houbavlis" wrote:
    > > > > > > > >
    > > > > > > > > > Hi Giles,
    > > > > > > > > > There are 2 things you need to make sure of.
    > > > > > > > > > 1 . If these machines are part of a webfarm make sure all web.config
    > > > > > > > > > validationKey,
    > > > > > > > > > decryptionKey have the same value across all machines.
    > > > > > > > > > 2. All objects you place in viewstate are serializable.
    > > > > > > > > >
    > > > > > > > > > Thanks,
    > > > > > > > > > Aris
    > > > > > > > > >
    > > > > > > > > > "Giles Papworth" wrote:
    > > > > > > > > >
    > > > > > > > > > > I seem to be getting this error message all of a sudden on one of my web apps:
    > > > > > > > > > >
    > > > > > > > > > > [HttpException (0x80004005): Unable to validate data.]
    > > > > > > > > > > System.Web.Configuration.MachineKey.GetDecodedData(Byte[] buf, Byte[]
    > > > > > > > > > > modifier, Int32 start, Int32 length, Int32& dataLength) +195
    > > > > > > > > > > System.Web.UI.LosFormatter.Deserialize(String input) +60
    > > > > > > > > > >
    > > > > > > > > > > [HttpException (0x80004005): Authentication of viewstate failed. 1) If this
    > > > > > > > > > > is a cluster, edit <machineKey> configuration so all servers use the same
    > > > > > > > > > > validationKey and validation algorithm. AutoGenerate cannot be used in a
    > > > > > > > > > > cluster. 2) Viewstate can only be posted back to the same page. 3) The
    > > > > > > > > > > viewstate for this page might be corrupted.]
    > > > > > > > > > > System.Web.UI.LosFormatter.Deserialize(String input) +117
    > > > > > > > > > > System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +102
    > > > > > > > > > >
    > > > > > > > > > > [HttpException (0x80004005): Invalid_Viewstate
    > > > > > > > > > >
    > > > > > > > > > >
    > > > > > > > > > > And it goes on to explain about the page. On one development machine this
    > > > > > > > > > > works and then on mine this doesn't. Any ideas why this would suddenly start
    > > > > > > > > > > happening?
     
    =?Utf-8?B?R2lsZXMgUGFwd29ydGg=?=, Jun 12, 2007
    #12
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steph
    Replies:
    2
    Views:
    1,669
    heislord5
    May 11, 2011
  2. ujjc001
    Replies:
    0
    Views:
    1,373
    ujjc001
    Jul 27, 2005
  3. Patrick.O.Ige
    Replies:
    1
    Views:
    1,967
    Patrick.O.Ige
    Jul 2, 2006
  4. Java Guy
    Replies:
    1
    Views:
    687
    Manish Pandit
    Oct 15, 2006
  5. kevin
    Replies:
    0
    Views:
    976
    kevin
    Jan 16, 2008
Loading...

Share This Page