locked
mobile devices fail when login to asp.net site hosted in azure RRS feed

  • Question

  • User-692386797 posted

    VS2013 asp.net webform app generated and deployed using VS. 

    When I use the generated login form on a PC, the site works as expected and there are no errors as I use the site.  However, when I attempt to login on a mobile device (WP8 and iPhone), I get the following error:

    Server Error in '/' Application. 

    Validation of viewstate MAC failed.  If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm.  AutoGenerate cannot be used in a cluster

    This isn't on a VM but a site hosted on Azure so I'm not sure what the error is telling me and how I can even check the error.  Also, I'm not sure why it's happening on mobile devices and not the PC.

    Any help or pointers will be appreciated.

    Thanks.

    Monday, June 30, 2014 10:13 AM

All replies

  • User1918766559 posted

    Hello,

    Please try to check the fiddler trace to check correlate of  viewstates through MAC address. 

    Details : http://blogs.msdn.com/b/slumley/archive/2007/04/17/enhanced-web-test-support-in-fiddler.aspx

    Further , try to update the web.config with the following value.

    <machineKey decryptionKey="A4B12CCDD50E95F8GB9GFH6JKAT4Y0U0I2OF2DF2AAFE5AB46189C,IsolateApps" validation="AES" validationKey="480CDF2AS9S9AS5CFDGF0GHFH9JJH4KHKAKLJ2L9F3SAS82A6C16911A29EF48903783F94529C21570AACB72766FB38CD4CE7B85B0ACE3149DC5FC1CCF1AA1CECE3579659996593B06,IsolateApps"/>


    Let me know if it helps.

    Wednesday, July 2, 2014 3:44 AM
  • User-692386797 posted

    thanks for the response. 

    I tried this by got an error stating that there  were invalid hex characters in decryption key.  I found the following related links:

    http://sharemypoint.wordpress.com/2009/04/15/machinekey-in-webconfig/ 

    http://www.eggheadcafe.com/articles/GenerateMachineKey/GenerateMachineKey.aspx

    I used the second link to generate a new key and tried this:

    in web.config and system.web section

    <machineKey validationKey='89172DC6CCD9DBEF03F73910BA0DB34141512B98468D701842EDB6CE480126FE44AA427CF86A2394713795BACC48731EC0FB4EF7A687E44B1BC5A8E86D2A696E'   decryptionKey='CE62BC5E19F6869043F570B72895BC05D46F20886DB6FACB'   validation='SHA1'/>

    I still have the same issue.  the challenge with fiddler is that I'm only getting this error on phones.  the desktop experience works as expected so I'm not sure how to utilize fiddler to debug this.  I haven't tried hitting a local machine on a internal site with my phone yet over wifi so I'll try that next.

    Thanks!

    Wednesday, July 2, 2014 12:11 PM