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.
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.
Ok Thanks so much aritchie the solutions was add in Ext.Direct.Mvc\Properties\AssembyInfo.cs
[assembly: AllowPartiallyTrustedCallers]
regards
Frank
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
so any Idea if I have to setup something in the IIS?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>
regards
Frank
Last edited by franklt69; 18 May 2010 at 8:41 AM. Reason: foget
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
I found a solution in this article for IIS6 http://professionalaspnet.com/archiv...n-ASP.NET.aspx
regards
Frank
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:
regardsPHP Code:
<b> Exception Details: </b>System.Security.VerificationException: Operation could destabilize the runtime.<br><br>
<b>Source Error:</b> <br><br>
<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>
An unhandled exception was generated during the execution of the current web request. Information 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=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>
[VerificationException: Operation could destabilize the runtime.]
SetAction(Object , Object ) +32
Newtonsoft.Json.Serialization.DynamicValueProvider.SetValue(Object target, Object value) +81
[JsonSerializationException: Error setting value to 'Action' on 'Ext.Direct.Mvc.DirectRequest'.]
Newtonsoft.Json.Serialization.DynamicValueProvider.SetValue(Object target, Object value) +220
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonReader reader, Object target) +330
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, String id) +657
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateAndPopulateObject(JsonReader reader, JsonObjectContract contract, String id) +110
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, Object existingValue) +837
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValue(JsonReader reader, Type objectType, JsonContract contract, Object existingValue, JsonConverter memberConverter) +234
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType) +71
Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) +48
Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) +105
Newtonsoft.Json.JsonConvert.DeserializeObject(String value, JsonSerializerSettings settings) +66
Newtonsoft.Json.JsonConvert.DeserializeObject(String value) +42
Ext.Direct.Mvc.DirectProvider.Execute(RequestContext requestContext) in DirectProvider.cs:169
Ext.Direct.Mvc.DirectController.Router() in DirectController.cs:45
lambda_method(ExecutionScope , ControllerBase , Object[] ) +39
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +178
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +24
System.Web.Mvc.<>c__DisplayClassa.<InvokeActionMethodWithFilters>b__7() +53
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +258
System.Web.Mvc.<>c__DisplayClassc.<InvokeActionMethodWithFilters>b__9() +20
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`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& completedSynchronously) +75
Frank
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!![]()
I keep running in a System.NullReferenceException: DirectRequest is null exception. I post a form to the following controller:
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:[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 { ;} } }
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...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); } }); }
Any help will be greatly appreciated.
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.
We could also use a function to load a view script (or external js file on the fly)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' } ];
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.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)
Last edited by geewhizbang; 19 Jun 2010 at 1:01 PM. Reason: correct mistake
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