1 Attachment(s)
IController Execute Method : Token is not unique error
Hi Friends,
Ext.net did with the user login page. However, the global.asax file in the user's authority to check and I'm referring to the login page.
However, I sent it directly to that page in addition to the errors found in the image is showing.
As response.redirectxxx codes do not work. Routing need to do it this way. Because the discontinuation of operations is important.
How do I solve the problem?
Attachment 10781
I use the routing code
Code:
IController userController = EngineContext.Current.Resolve<Mes.Web.UI.Controllers>;
var routeData = new RouteData();
routeData.Values.Add("controller", "User");
routeData.Values.Add("action", "Login");
userController.Execute(new RequestContext(new HttpContextWrapper(Context), routeData));
RAZOR
Code:
@X.ResourceManager()
@(X.Window()
.Layout(LayoutType.VBox)
.LayoutConfig
(
new VBoxLayoutConfig
{
Align = VBoxAlign.Center,
ConstrainAlign = false
}
)
.Title(T("account.login.title").ToHtmlString())
.Padding(5)
.BodyPadding(5)
.Width(400)
.Height(180)
.Modal(true)
.Closable(false)
.Draggable(false)
.Resizable(false)
.Items
(
X.FormPanel()
.Border(false)
.BodyBorder(0)
.BorderSpec("0 0 0 0")
.StyleSpec("border:none !important;")
.Frame(true)
.Margin(0)
.Padding(0)
.Width(400)
.Height(180)
.Items
(
X.ComboBoxFor(x => x.PlantId).Items(Model.Plants),
X.TextFieldFor(x => x.Username).Hidden(!Model.UsernamesEnabled),
X.TextFieldFor(x => x.Email).Hidden(Model.UsernamesEnabled),
X.TextFieldFor(x => x.Password).InputType(Ext.Net.InputType.Password),
X.CheckboxFor(x => x.RememberMe),
X.Button()
.Text(T("account.login.button.text").ToHtmlString())
.DirectEvents
(
de =>
{
de.Click.Action = Url.Action("Login");
de.Click.EventMask.ShowMask = true;
de.Click.EventMask.Msg = T("Common.Loading").ToHtmlString();
}
)
)
)
)