I am been struggling for more than 5 hours now to deploy for webappliactions which is built with Telerik MVC Extensions and their empty project template. Then I have developed lots of stuff in the application. When I am about to publish it to a new site/server no page works which loads more than one element.
Also I could see that the modal window is not opening and it is being placed at the bottom of the page.
So there seem to be somehting wrong with the ScriptRegistrar parts.
10 Answers, 1 is accepted
There may be a problem with the HTTP handler (if you are using web asset combination). You can use Fiddler or FireBug to check your live web site for any failing HTTP requests.
Regards,Atanas Korchev
the Telerik team
It must be that and yes I am using that but how can I NOT use that and instead get some other solution to get the stuff going. The strange thing is that is seem to affect all pages that gets more than ONE record back in a IEnumerable ViewData Collection but the pages that shows a single record seem to work as they should. Or I might be confused because on all pages where we list a lot of data we use the datagrid and it crashes on the first line where you put in the Model.
So how can I make this work without web asset combination?
If web asset combination is not enabled then perhaps the JavaScript files required by the Telerik components are not deployed. Check if the Scripts folder contains the required JavaScript files.
I cannot provide more specific help unless I see a live URL. Is it available?
Atanas Korchev
the Telerik team
Server Error in '/' Application.--------------------------------------------------------------------------------The null value cannot be assigned to a member with type System.DateTime which is a non-nullable value type. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: The null value cannot be assigned to a member with type System.DateTime which is a non-nullable value type.Source Error: Line 2: Line 3: Line 4: <%= Html.Telerik().Grid(Model)Line 5: .Name("Grid")Line 6: Source File: c:\inetpub\wwwroot\Views\Shared\listclaims.ascx Line: 4 Stack Trace: [InvalidOperationException: The null value cannot be assigned to a member with type System.DateTime which is a non-nullable value type.] Read_ork(ObjectMaterializer`1 ) +19900 System.Data.Linq.SqlClient.ObjectReader`2.MoveNext() +42 Telerik.Web.Mvc.Extensions.EnumerableExtensions.Each(IEnumerable`1 instance, Action`1 action) +168 Telerik.Web.Mvc.UI.GridHtmlBuilder`1.CreateBody() +426 Telerik.Web.Mvc.UI.GridHtmlBuilder`1.BuildCore() +227 Telerik.Web.Mvc.UI.HtmlBuilderBase.Build() +39 Telerik.Web.Mvc.UI.Grid`1.WriteHtml(HtmlTextWriter writer) +738 Telerik.Web.Mvc.UI.ViewComponentBase.ToHtmlString() +106 Telerik.Web.Mvc.UI.ViewComponentBuilderBase`2.ToHtmlString() +16 System.Web.HttpWriter.Write(Object obj) +39 ASP.views_shared_listclaims_ascx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\inetpub\wwwroot\Views\Shared\listclaims.ascx:4 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +131 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246 System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer) +85 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5274 --------------------------------------------------------------------------------Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1You can check this forum thread.
Regards,Atanas Korchev
the Telerik team
Checked that thread and tried to remove or edit the DateTime EditorTemplate but it didn't help me. The thing is that I don't even use any datetime columns when binding the grid.
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<ipc.pilot.Models.ork>>" %> <% Html.Telerik().Grid(Model) .Name("Grid") .Columns(columns => { columns.Bound(o => o.ClaimNo).Format( Html.ActionLink("{0}", "Details", "RMA", new { Id = "{0}" }, null).ToString()).Width(60).Encoded(false).Title("Rek Nr").HtmlAttributes(new { ID = "ROWID" }); columns.Bound(o => o.OrderNr).Width(120).Title("Order Nr"); columns.Bound(o => o.ArtNr).Width(120).Title("Artikel Nr"); columns.Bound(o => o.Edit).Title("Meddelande"); }) .Scrollable(scrolling => scrolling.Height(400)) .Sortable() .Pageable(paging => paging.PageSize(20) .Style(GridPagerStyles.NextPreviousAndNumeric) .Position(GridPagerPosition.Bottom) ) .Filterable() .Footer(true) .Render();%>As you can see above I do not use any DateTime fields at all, BUT I might get them in my LINQ Query?
var claims = from tt in db.orks orderby tt.ClaimNo descending where tt.Edit.Length > 1 select tt;ViewData["claimslist"] = claims;Could it be that on the productionserver your assembly has to be loaded into the GAC for some reasons? Any IIS Issues which behaves like this? Thanks for first class support!
No, there is no requirement to load the assembly in GAC. Also we are not aware of any IIS specific requirements or configurations.
There must be some DateTime property considering the exception stacktrace:
[InvalidOperationException: The null value cannot be assigned to a member with type System.DateTime which is a non-nullable value type.] Read_ork(ObjectMaterializer`1 ) +19900 System.Data.Linq.SqlClient.ObjectReader`2.MoveNext() +42Does your model have a DateTime property? I think you are trying to read NULL into it which is not possible. Perhaps the data on the server is different than the data on the dev machine. Try to make the DateTime property nullable and see if this helps. Regards,
Atanas Korchev
the Telerik team
Does this lead you in some direction?
I believe it must be something with the scripts.
The server side exception is not related with the JavaScript files. Did you check for any failing HTTP requests? Use Fiddler or FireBug (the "Net" tab) and check for 404 or 500 HTTP status codes.
Regards,Atanas Korchev
the Telerik team