10
has anyone seen this issue? I'm an ASP.NET MVC newbie. I have an ASP.NET MVC 3 site that uses .aspx and .ascx views. Throughout the site, I use return View() or return View(viewName) in my controller methods, which directs to the appropriate aspx/ascx view. However, in my stock AccountController (modified to use DotNetOpenAuth), I take the same approach, but the MVC framework doesn't seek out aspx or ascx views. Instead, it's searching the path for .cshtml or .vbhtml views (Razor engine I'm assuming). Why woulnd't it just seek out aspx and ascx views like the rest of my site? Controller method follows:
public ActionResult Authenticate()
{
var response = openid.GetResponse();
var statusMessage = "";
if (response == null)
{
Identifier id;
//make sure your users openid_identifier is valid.
if (Identifier.TryParse(Request.Form["openid_identifier"], out id))
{
try
{
//request openid_identifier
return openid.CreateRequest(Request.Form["openid_identifier"])
.RedirectingResponse.AsActionResult();
}
catch (ProtocolException ex)
{
statusMessage = ex.Message;
return View("LogOn", statusMessage);
}
}
else
{
statusMessage = "Invalid identifier";
return View("LogOn", statusMessage);
}
}
else
{
//check the response status
switch (response.Status)
{
//success status
case AuthenticationStatus.Authenticated:
Session["FriendlyIdentifier"] = response.FriendlyIdentifierForDisplay;
FormsAuthentication.SetAuthCookie(response.ClaimedIdentifier, false);
//TODO: response.ClaimedIdentifier, to login or create new account
return RedirectToAction("Index", "Home");
case AuthenticationS