I have a simple action that takes a single paramter as a string, it returns a users profile page which is working fine.
However a user has told me today that nobody can see he's profile unless logged in, it simply redirects to the login page.
I have checked the IIS7 log file, and I can see that it is returning a 302 status and then loads the login page.
Here is the page that doesn't work:
Here is an example that works fine:
There are no authorize attributes on the action / controller, I do have Helicon Ape installed managing some custom redirects for me, but I have disabled this and still get the same result.
I'm pretty puzzled here at what could cause this only on a certain profile, any ideas?
EDIT:
There is definetly no Authorize attributes at any level, default or custom. My web.config is pretty standard, and I am using MVC2:
<authentication mode="Forms">
<forms cookieless="UseCookies" enableCrossAppRedirects="true" loginUrl="~/Login" name=".ASPXAUTH" slidingExpiration="true" timeout="100000" requireSSL="false" />
</authentication>
Here is my controllers action (only attribute at controller level is [HandleError]):
[Transaction]
[PassParametersDuringRedirect]
[ModelStateToTempData]
[HttpGet]
public ActionResult Index(string artist)
{
Account account = accountTasks.GetProfileByUsername(artist);
if (account == null)
return RedirectToAction<HomeController>(x => x.Index(), null);
var viewModel = Mapper.Map<Account, ProfilePageViewModel>(account);
return View(viewModel);
}
Paul