IController Execute Method : Token is not unique error

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    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?

    Click image for larger version. 

Name:	tokenError.jpg 
Views:	20 
Size:	95.4 KB 
ID:	10781

    I use the routing 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
     @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();
                                    }
                                )
                    )
            )
        )
    Last edited by bilgibilisim; May 12, 2014 at 12:37 PM. Reason: Added Razor Code

Similar Threads

  1. Replies: 0
    Last Post: Jan 24, 2014, 4:57 PM
  2. [CLOSED] Token is not unique error for nested grid
    By alscg in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 01, 2013, 4:53 AM
  3. [OPEN] [#330] A suggestion to eradicate "Token is not unique" errors
    By michaeld in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Aug 28, 2013, 6:01 AM
  4. [CLOSED] Token is not unique
    By SFritsche in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 04, 2013, 8:08 AM
  5. TokenNotUniqueException: Token is not unique
    By sfvaleriano in forum 2.x Help
    Replies: 8
    Last Post: Dec 28, 2012, 7:51 AM

Tags for this Thread

Posting Permissions