Azure AppFabric : Two possible errors and troubleshooting

Azure AppFabric Access Control is an easy to implement feature. While I was trying to add it to one of my applications, I found two show stopping errors.

1. A potentially dangerous Request.Form value was detected from the client (wresult="<t:RequestSecurityTo...").

To solve you need to do two things

a. Add below to Web.Config under <System.web>


httpRuntime requestValidationMode="2.0" />

b. Add to <% @page of your .aspx page ValidateRequest="false"

2. Another could be due to issue of loading user profile.

Find out the Application Pool of your website in IIS.


From the IIS’s right side tree node open that App Pool. Go to Advanced settings of the app pool (here ASP.NET v4.0) and change the Load User Profile to True.