ASP.NET Exception Details: System.InvalidCastException: Unable to cast object of type 'ProfileCommon' to type 'ProfileCommon'.

SOLVED. It is a very strange issue. I have read many forums described this case. And the only way I found is:
1. Change web config line
profile defaultProvider="ProfileProvider" enabled="true"
to be
profile defaultProvider="ProfileProvider" enabled="false"

2. Save and refresh the web page.

3. Change web config line
profile defaultProvider="ProfileProvider" enabled="false"
to be
profile defaultProvider="ProfileProvider" enabled="true"

3. Save and refresh.

Strange but works.

2 comments:

  1. Not working for me. Sorry

    ReplyDelete
  2. this only temporarily fixes the issue. once the site is restarted issue occurs again. this is not a permanent fix.

    ReplyDelete