1. #211
    Ext User
    Join Date
    May 2010
    Posts
    1
    Vote Rating
    0
    sspark is on a distinguished road

      0  

    Default


    How about same name of Contrller in Different Area ?

    I tried to access http://<host>/Direct/Api, then I got error which is "Action Options has already been configured".
    Because, I have same name of Controllers in different Areas.

  2. #212
    Sencha User
    Join Date
    Mar 2007
    Posts
    761
    Vote Rating
    1
    franklt69 is on a distinguished road

      0  

    Default


    Ok Thanks so much aritchie the solutions was add in Ext.Direct.Mvc\Properties\AssembyInfo.cs

    [assembly: AllowPartiallyTrustedCallers]

    regards
    Frank

  3. #213
    Sencha User
    Join Date
    Mar 2007
    Posts
    761
    Vote Rating
    1
    franklt69 is on a distinguished road

      0  

    Default


    Other issue deploying an app

    I have the application running ok locally then I upload the app to a new server with IIS6 and I getting this error


    in Js:
    provider is undefined

    // if provider has not already been instantiated
    37534 if(!provider.events){
    37535 provider = new Ext.Direct.PROVIDERS[provider.type](provider);
    37536 }


    Get http://app.demo.com/Direct/Api 404 Not Found with firebug

    HTML Code:
    <h1>The page cannot be found</h1>
    The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
    <hr>
    <p>Please try the following:</p>
    <ul>
    <li>Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly.</li>
    <li>If you reached this page by clicking a link, contact
     the Web site administrator to alert them that the link is incorrectly formatted.
    </li>
    <li>Click the <a href="javascript:history.back(1)">Back</a> button to try another link.</li>
    </ul>
    <h2>HTTP Error 404 - File or directory not found.<br>Internet Information Services (IIS)</h2>
    so any Idea if I have to setup something in the IIS?

    regards
    Frank
    Last edited by franklt69; 18 May 2010 at 8:41 AM. Reason: foget

  4. #214
    Sencha User
    Join Date
    Mar 2007
    Posts
    761
    Vote Rating
    1
    franklt69 is on a distinguished road

      0  

    Default


    I am researching about this error
    Get http://app.demo.com/Direct/Api 404 Not Found with firebug because
    it is weird, demo work ok using local server http://localhost:53794/Default.aspx in the same computer I change the application to run on IIS and I get http://app.demo.com/Direct/Api 404 Not Found, someone is testing the version 2.0 with IIS6 ? I was testing old version Ext.Direct.Mvc-0.6.2 and work ok with IIS6

    regards
    Frank

  5. #215
    Sencha User
    Join Date
    Mar 2007
    Posts
    761
    Vote Rating
    1
    franklt69 is on a distinguished road

      0  

    Default


    I found a solution in this article for IIS6 http://professionalaspnet.com/archiv...n-ASP.NET.aspx

    regards
    Frank

  6. #216
    Sencha User
    Join Date
    Mar 2007
    Posts
    761
    Vote Rating
    1
    franklt69 is on a distinguished road

      0  

    Default


    some have idea about this issue using the demo application version 2.0 in rackspace cloud I get this error when I call any method in the server:

    PHP Code:
    <bException Details: </b>System.Security.VerificationExceptionOperation could destabilize the runtime.<br><br>

                <
    b>Source Error:</b> <br><br>

                <
    table width=100bgcolor="#ffffcc">
                   <
    tr>
                      <
    td>
                          <
    code>

    An unhandled exception was generated during the execution of the current web requestInformation regarding the origin and location of the exception can be identified using the exception stack trace below.</code>

                      </
    td>
                   </
    tr>
                </
    table>

                <
    br>

                <
    b>Stack Trace:</b> <br><br>

                <
    table width=100bgcolor="#ffffcc">
                   <
    tr>
                      <
    td>
                          <
    code><pre>

    [
    VerificationExceptionOperation could destabilize the runtime.]
       
    SetAction(Object Object ) +32
       Newtonsoft
    .Json.Serialization.DynamicValueProvider.SetValue(Object targetObject value) +81

    [JsonSerializationExceptionError setting value to 'Action' on 'Ext.Direct.Mvc.DirectRequest'.]
       
    Newtonsoft.Json.Serialization.DynamicValueProvider.SetValue(Object targetObject value) +220
       Newtonsoft
    .Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty propertyJsonReader readerObject target) +330
       Newtonsoft
    .Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObjectJsonReader readerJsonObjectContract contractString id) +657
       Newtonsoft
    .Json.Serialization.JsonSerializerInternalReader.CreateAndPopulateObject(JsonReader readerJsonObjectContract contractString id) +110
       Newtonsoft
    .Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader readerType objectTypeJsonContract contractObject existingValue) +837
       Newtonsoft
    .Json.Serialization.JsonSerializerInternalReader.CreateValue(JsonReader readerType objectTypeJsonContract contractObject existingValueJsonConverter memberConverter) +234
       Newtonsoft
    .Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader readerType objectType) +71
       Newtonsoft
    .Json.JsonSerializer.DeserializeInternal(JsonReader readerType objectType) +48
       Newtonsoft
    .Json.JsonConvert.DeserializeObject(String valueType typeJsonSerializerSettings settings) +105
       Newtonsoft
    .Json.JsonConvert.DeserializeObject(String valueJsonSerializerSettings settings) +66

       Newtonsoft
    .Json.JsonConvert.DeserializeObject(String value) +42
       Ext
    .Direct.Mvc.DirectProvider.Execute(RequestContext requestContextin DirectProvider.cs:169
       Ext
    .Direct.Mvc.DirectController.Router() in DirectController.cs:45
       lambda_method
    (ExecutionScope ControllerBase Object[] ) +39
       System
    .Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controllerObject[] parameters) +17
       System
    .Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContextIDictionary`2 parameters) +178
       System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary
    `2 parameters) +24
       System
    .Web.Mvc.&lt;&gt;c__DisplayClassa.&lt;InvokeActionMethodWithFilters&gt;b__7() +53
       System
    .Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filterActionExecutingContext preContextFunc`1 continuation) +258
       System.Web.Mvc.&lt;&gt;c__DisplayClassc.&lt;InvokeActionMethodWithFilters&gt;b__9() +20
       System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList
    `1 filtersActionDescriptor actionDescriptorIDictionary`2 parameters) +193
       System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +382
       System.Web.Mvc.Controller.ExecuteCore() +123
       System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +23
       System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +7
       System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext) +144
       System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext) +54
       System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext) +7
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +75 
    regards
    Frank

  7. #217
    Sencha Premium Member Tarabass's Avatar
    Join Date
    Jun 2010
    Location
    The Netherlands
    Posts
    12
    Vote Rating
    0
    Tarabass is on a distinguished road

      0  

    Default


    Great job! Many thanks for that. Just the push in the back I needed, since i'm new to mvc .net and extjs. Will study on it!

  8. #218
    Ext Premium Member halcwb's Avatar
    Join Date
    Mar 2010
    Location
    Rotterdam
    Posts
    379
    Vote Rating
    39
    halcwb has a spectacular aura about halcwb has a spectacular aura about

      0  

    Default Direct Request is null error

    Direct Request is null error


    I keep running in a System.NullReferenceException: DirectRequest is null exception. I post a form to the following controller:

    Code:
    [FormHandler]
            [ValidateInput(false)]
            public ActionResult GenFormLogin(string user, string password)
            {
                bool login = (Informedica.GenForm.Library.Security.
                               GenFormPrincipal.Login(user, password));
    
                //return this.Direct(new LoginResponse(login, "failure"));
                return this.Direct(RoleNameList.GetNameValueList());
            }
    
            [Serializable]
            private class LoginResponse
            {
                private bool _Success;
                private string _Title;
    
                public LoginResponse(bool success, string title)
                {
                    _Success = success;
                    _Title = title;
                }
    
                public bool Success
                {
                    get { return _Success; }
                    set { ;}
                }
    
                public string Title
                {
                    get { return _Title; }
                    set { ;}
                }
            }
    When I debug my code, the program passes the controller code without problems. But in my webbrowser I get the null reference exception. The javascript code I use to submit the form is:

    Code:
                    handler : function() {
                        loginForm.getForm().submit({
                                    success : function(f, a) {
                                        debugger;
                                        Ext.Msg.alert('Success', 'It worked');
                                    },
                                    failure : function(f, a) {
                                        debugger;
                                        Ext.Msg.alert('Warning', a.failureType);
                                    }
                                });
                    }
    But I do not think the problem is not on the client side but in my this.Direct return object. I also tried passing a null, boolean, string, anonymous class like : new { succes = true, title: "failure} etc...

    Any help will be greatly appreciated.

  9. #219
    Ext JS Premium Member
    Join Date
    Jul 2009
    Location
    Seattle, Washington USA
    Posts
    200
    Vote Rating
    0
    geewhizbang is on a distinguished road

      0  

    Default


    In the project I just completed, we dynamically load views on each tab so that all of the code doesn't have to be loaded at once. It also allows you to dynamically populate the code with some data, which can help maintain security.
    Code:
    //in the code that initializes ExtJS you set:
    Ext.UpdateManager.defaults.loadScripts = true;
    
    //item that auto executes a view (the only property that is required is the autoLoad,
    //but I show some other properties to give some context.
    
    var Items = 
    [
       {
            region: 'center',
            layout: 'anchor',
            id: 'YourId',
            autoLoad: 'yourViewFolder/yourView'
        }
    ];
    We could also use a function to load a view script (or external js file on the fly)
    Code:
    YourApp.RunScript = function(url, fn)
    {
    	if (Ext.isDefined(fn))
    	{
    		fn();
    	}
    	else
    	{
                          if (! Ext.isDefined(YourApp.ScriptContainer))
                          {
                               YourApp.ScriptContainer = new Ext.Window
                               ({ x:-100, y: -100, hidden: true, autoDestroy: false, hideMode: 'offsets' });
                          }
    		YourApp.ScriptContainer.add(new Ext.Panel({ autoLoad: url, hidden:true } ));
    		YourApp.ScriptContainer.doLayout();
    	}
    };
    YourApp.RunScript('/yourFolder/yourView', yourFunctionInFile)
    With this arrangement we had only one view page running at the time, but it could load child views of code in new tabs. This way we didn't have to load all of the code at once, but we could dynamically load new code any time we wanted to. The loaded code could use any common objects we wanted. The other nice thing about this code is that it could be called more than once. If the code was already loaded, it runs fn(), but if not it autoloads the code and runs the code.
    Last edited by geewhizbang; 19 Jun 2010 at 1:01 PM. Reason: correct mistake

  10. #220
    Ext JS Premium Member
    Join Date
    Jul 2009
    Location
    Seattle, Washington USA
    Posts
    200
    Vote Rating
    0
    geewhizbang is on a distinguished road

      0  

    Default Creating a minimal ExtJS to run direct requests

    Creating a minimal ExtJS to run direct requests


    I'm building an app that doesn't need much in the way of controls, but the directRequest handlers and data stores would be nice.

    What is the minimum Javascript code that needs to be included to handle DirectRequests and have data store objects. Or is this too complicated to even be considered as an option?

    Update: So far, trying to load the least amount of code hasn't worked. Going thru the API help documents, I've loaded about a dozen js files and I still have issues. This is approaching perhaps one third of the entire ext-all, so perhaps this isn't worth doing.

    Code:
    pkgs/ext-foundation.js
    pkgs/Ext.js
    pkgs/data-foundation.js
    pkgs/data-grouping.js
    pkgs/data-json.js
    pkgs/data-list-views.js
    pkgs/data-xml.js
    pkgs/jsonProvider.js
    pkgs/remotingProvider.js
    pkgs/pollingProvider.js
    ext/pkgs/direct.js
    ext/pkgs/Component.js
    ext/pkgs/container.js
    ext/pkgs/boxComponent.js
    ext/pkgs/viewport.js
    ext/pkgs/pkg-buttons.js
    Last edited by geewhizbang; 23 Jun 2010 at 7:43 AM. Reason: Additional Info