Telerik Forums
UI for ASP.NET AJAX Forum
10 answers
3.4K+ views
I've been getting the error below on my production server only ever since I upgraded to the RADControls for ASP.NET Q2 release, file version 2010,2,713,40.  By adding the try/catch below I was able to indetify what assembly was causing the error

 "Could not load file or assembly 'Telerik.Web.UI, Version=2010.1.519.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"

The problem is this assembly version does not exist on either my dev or production environment.  This happens everytime I make an update to my prod box and I can usually resolve it by resetting the app pool or resetting IIS but it doesn't always work the first time.  All of my projects are set up under the 4.0 framework and I've cleaned the solution several times but the issue persists.  Also, this error only occurs on pages that use the Entity Framwork to databind.  Any help would be greatly appreciated,

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

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.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
  
Source Error: 
  
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.  
  
Stack Trace: 
  
  
[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
   System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0
   System.Reflection.RuntimeModule.GetTypes() +4
   System.Reflection.Assembly.GetTypes() +78
   System.Data.Metadata.Edm.ObjectItemConventionAssemblyLoader.LoadTypesFromAssembly() +32
   System.Data.Metadata.Edm.ObjectItemAssemblyLoader.Load() +25
   System.Data.Metadata.Edm.AssemblyCache.LoadAssembly(Assembly assembly, Boolean loadReferencedAssemblies, ObjectItemLoadingSessionData loadingData) +160
   System.Data.Metadata.Edm.AssemblyCache.LoadAssembly(Assembly assembly, Boolean loadReferencedAssemblies, KnownAssembliesSet knownAssemblies, EdmItemCollection edmItemCollection, Action`1 logLoadMessage, Object& loaderCookie, Dictionary`2& typesInLoading, List`1& errors) +166
   System.Data.Metadata.Edm.ObjectItemCollection.LoadAssemblyFromCache(ObjectItemCollection objectItemCollection, Assembly assembly, Boolean loadReferencedAssemblies, EdmItemCollection edmItemCollection, Action`1 logLoadMessage) +316
   System.Data.Metadata.Edm.ObjectItemCollection.ExplicitLoadFromAssembly(Assembly assembly, EdmItemCollection edmItemCollection, Action`1 logLoadMessage) +53
   System.Data.Metadata.Edm.MetadataWorkspace.ExplicitLoadFromAssembly(Assembly assembly, ObjectItemCollection collection, Action`1 logLoadMessage) +93
   System.Data.Metadata.Edm.MetadataWorkspace.LoadFromAssembly(Assembly assembly, Action`1 logLoadMessage) +130
   System.Web.UI.WebControls.EntityDataSourceView.ConstructContext() +585
   System.Web.UI.WebControls.EntityDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +76
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +21
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +143
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
   System.Web.UI.WebControls.GridView.DataBind() +4
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +66
   System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +75
   System.Web.UI.Control.EnsureChildControls() +102
   System.Web.UI.Control.PreRenderRecursiveInternal() +42
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
  
  

try
       {       
           RadScheduler1.DataSource = TED.BLL.Appointment.Appointments(SafeValue.SafeInt(ddlView.SelectedValue),SafeValue.SafeInt(ddlCategory.SelectedValue),SafeValue.SafeInt(ddlClientName.SelectedValue),Users,RadScheduler1.VisibleRangeStart, RadScheduler1.VisibleRangeEnd);
           RadScheduler1.DataKeyField = "ID";
           RadScheduler1.DataStartField = "Start";
           RadScheduler1.DataEndField = "End";
           RadScheduler1.DataSubjectField = "Subject";
           RadScheduler1.DataDescriptionField = "Description";
           RadScheduler1.DataRecurrenceParentKeyField = "RecurrenceParentID";
           RadScheduler1.DataRecurrenceField = "RecurrenceRule";
           RadScheduler1.DataBind();
       }
       catch (Exception ex)
       {
           ReflectionTypeLoadException exception = ex as ReflectionTypeLoadException;
           if (exception == null)
           {
               using (TextWriter tw = new StreamWriter(Server.MapPath("~/Scheduler/EDSLog.txt")))
               {
                   tw.WriteLine("Not a ReflectionTypeLoadException ex.");
               }
           }
           else
           {
               foreach (Exception loaderException in exception.LoaderExceptions)
               {
                   using (TextWriter tw = new StreamWriter(Server.MapPath("~/Scheduler/EDSLog.txt")))
                   {
                       tw.WriteLine(loaderException.Message);
                       tw.WriteLine(loaderException.StackTrace);
                   }
               }
           }
       }
Prasad
Top achievements
Rank 1
 answered on 28 Mar 2016
2 answers
238 views

Hi all

 

I will try to explain you my problem (I'm french with bad engl

I have a datepicker wich, when date is selected, update other items (like button text...) So, I use OnSelectedDateChanged="RadDatePicker1_SelectedDateChanged"

 

In the js code I need to do 2 things : 

1 - Check the css class for make an alert or not. Because, I have day-render function wich change css class of cell if the date is on a list like that : 

 protected void RadCalendar1_DayRender(object sender, Telerik.Web.UI.Calendar.DayRenderEventArgs e)
        {
            for (int i = 0; i < ListeDate.Count; i++)
            {
                string DateACompare = String.Format("{0:dd/MM/yyyy}", ListeDate[i]);
                DateTime rdvDate = DateTime.ParseExact(DateACompare, "dd/MM/yyyy", null);
                if (e.Day.Date == rdvDate)
                {
                    //e.Cell.BackColor = Color.Red;
                    e.Cell.CssClass = "CasePrise";
                }
            }
        }

 

If css class is not "CasePrise" I want make and alert

 

2 - Refresh my page for update other control with the date selected

 

So I do that, in js :

function RadDatePicker1_OnDateSelected(sender,args)
{
   //Add JavaScript handler code here
   //alert(sender.get_selectedDate());
   __doPostBack('', '');
   if ($(sender).hasClass("CasePrise"))
            alert('Ok');
        else
            alert('Aucunes captures à la date selectionnée')

   
}
function __doPostBack(eventTarget, eventArgument) {
   if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
       theForm.__EVENTTARGET.value = eventTarget;
       theForm.__EVENTARGUMENT.value = eventArgument;
       theForm.submit();
   }
}

 

 

I have two problems : The first is that it don't check the cssclass

The second is that, when it do the postback, my day_render function don't work, so, the cell in my datepicker don't have different background color as it should

 

I hope my message will be understanding

 

Thanks for help

Eyup
Telerik team
 answered on 28 Mar 2016
1 answer
82 views

Hi

Does anyone one why this line is preventing the edit form from displaying when I click "add new record"? The edit form displays normally when I click edit on a row.

<asp:DropDownList ID="lst_ProjectCode" class="form-control" runat="server" Width="250" DataSourceID="SqlDataSource2" DataValueField="ProjectCode" SelectedValue='<%# Bind("ProjectCode")%>'></asp:DropDownList>

It is something to do with the SelectedValue='<%# Bind("ProjectCode")%>' as otherwise it the edit form comes up.

 

 

Kostadin
Telerik team
 answered on 28 Mar 2016
4 answers
176 views

Hi, everyone.

 

I want to use RadHtmlChart -> ' Scatter Chart ' to make "nine grid model" to show my record from DataSource and so... I have make it like '9grid_original.PNG' then I want to display background like '9grid_want.PNG'.

 

Have RadHtmlChart have any method or any styling features to display background like '9grid_want.PNG' (that pic edit with paint)

Or I shoud use Div and any CSS to make it than RadHtmlChart Function?

 

Thanks for every suggestion and Sorry about my weird English.

 

Marin Bratanov
Telerik team
 answered on 28 Mar 2016
1 answer
251 views
Hi,

I'm working with KendoUI on the front end, and following some of their "default" way of doing things (that means using their DataSource object), I request data from a MVC WebAPI controller with a GET.

The request looks like :

filter[logic]                    And
filter[filters][0][field]         Description    
filter[filters][0][operator]    StartWith
filter[filters][0][value]        $20
page                            1
pageSize                        10
skip                            0
take                            10



I had tried so many ways to read the filters but all in vain.

Can anyone help/advice me how to map these query-strings into an object?

Thanks a lot.
Alexander Valchev
Telerik team
 answered on 28 Mar 2016
1 answer
565 views

I am trying to build an offline app with telerik grids. I am using grid with inline editing 

.Editable(editable => editable.Mode(GridEditMode.InLine))

Now i want to check, before of after the save attempt was made (actually it would be a lot better before, but i couldnt manage that with inline editing, so I am waiting for the result from the controller), if there is an internet connection, and if not to save the data in the localstorage and change the color of the row to indicate that this entry has not been saved to the server. I have tried to use the onChange on the datasource and check if the "sync" button is pressed.

.DataSource(dataSource => dataSource
                         .Ajax()
                         .PageSize(10)
                         .Model(model => model.Id(p => p.Nr))
                         .Events(events => events.Change("onChange"))
                         .Create(update => update.Action("Service_Create", "Service"))
                         .Update(update => update.Action("Service_Update", "Service"))
                         .Read(read => read.Action("Service_Read", "Service").Data("ServiceSearchparameter"))
                    )

function onChange(e) {
        if (e.action == 'sync') {
 
            var tr = $(e.target).closest("tr"); //get the row
 
            tr.addClass("offlineElement");
 
                   
        }
   }

 

When I do it like that, nothing is happening, I checked the sourcecode and the class "offlineElement" is not being added to the tr

Is there something I am missing ?

 

P.S Sorry for posting here, since I am using the trial version, I am not allowed to post on ASP.NET MVC forum

Radoslav
Telerik team
 answered on 28 Mar 2016
1 answer
176 views

hello every body , 

i'm using telerik:RadSocialShare in webpage TitleToShare work fine with twitter and linked in , but with facebook it share webpage footer , 

please any advice , here telerik control 

 <telerik:RadSocialShare RenderMode="Lightweight" ID="RadSocialShare3" runat="server"
                                Width="240" >
                                <MainButtons>
                   <telerik:RadSocialButton CustomIconWidth="46" CustomIconHeight="46" CustomIconUrl="images/icons/ico-fb.png"
                                        SocialNetType="ShareOnFacebook"   TitleToShare="شارك معنا وساعدنا في فهم التحديات والفرص الأساسية التي تواجه توظيف الشباب في قطاع تكنولوجيا المعلومات والاتصالات. كيف ترى التحديات والفرص الحالية؟ وكيف تتخيل المستقبل في هذا القطاع؟ اجابتك سوف تساعدنا لاستكشاف مسارات المستقبل المحتملة للشباب في هذا القطاع. مشاركتكم  أساسية لمحاولة الوصول إلى المستقبل الذي نطمح اليه والتحضير للتحديات المصاحبة له."
                                        CssClass="sshCustomCircleFB"></telerik:RadSocialButton>
                                    <telerik:RadSocialButton CustomIconWidth="46" CustomIconHeight="46" CustomIconUrl="images/icons/ico-tw.png"
                                        SocialNetType="ShareOnTwitter" CssClass="sshCustomCircleTwitter"></telerik:RadSocialButton>
                                    <telerik:RadSocialButton CustomIconWidth="46" CustomIconHeight="46" CustomIconUrl="images/icons/ico-li.png"
                                        SocialNetType="LinkedIn" CssClass="sshCustomCircleLinkdedIn"></telerik:RadSocialButton>
                                </MainButtons>
                            </telerik:RadSocialShare>

 

Regards , 

Marin Bratanov
Telerik team
 answered on 28 Mar 2016
3 answers
632 views
I have a column in grid which is of " DateTime " data type. I have default filtering set ON for the grid and the code for the column goes like this :
                    <telerik:GridBoundColumn UniqueName="OrderDate" DataField="OrderDate" HeaderText="Ordered on"
                        CurrentFilterFunction="EqualTo" ShowFilterIcon="False" AutoPostBackOnFilter="True"
                        DataFormatString="{0:MM/dd/yy}" DataType="System.DateTime">
                        <ItemStyle HorizontalAlign="Right" />
                        <HeaderStyle HorizontalAlign="Right" Width="65px" />
                    </telerik:GridBoundColumn>

And the grid is showing all the columns perfectly as expected. For the above code the grid shows only the date in the column but not the time. But, I want to filter the column only by date and not by date time. As when I serach only by date, the filter results with no records for a particular date, as the time(for the provided date) does not match when I do not provide it(I think it takes the default time "00:00:00.000"). I am unable to achieve this. Please help me out.

Thanks.
Kostadin
Telerik team
 answered on 28 Mar 2016
1 answer
69 views

Hi

I have a radeditor in which text from word is copied has &nbsp; between tags which acts as spacing between two paraghraphs.

But when I use get_html via js, it scrubs this '&nbsp;' from the text, due to which the spacing between paraghraphs is cleared.

I am attaching word text for reference

 

 

 

 

Dear Tammy,

The internal audit department is currently involved in a quality assurance review (QAR) that will continue through September 12, 2014.The internal audit standards require an external review of the internal audit activity every five years. The QAR is designed to assess Internal Audit’s conformance with the standards of the auditing profession and its effectiveness in providing assurance & consulting services to the Company’s board of directors, senior leaders, and other interested parties.

We acknowledge the time constraints with your busy schedules, but would greatly appreciate your completion of this survey. The survey results will go directly to Protiviti and your response will be kept confidential.  Internal Audit will only be provided the summarized results.

If you have any questions regarding the process, please feel free to contact Sean Humphreys at Thank you in advance for participating in the QAR and helping continuously improve the effectiveness of the internal audit function.

 Thank You
Protiviti

 

 

 

Ianko
Telerik team
 answered on 28 Mar 2016
1 answer
123 views

At the current my website is using ajax:DragPanelExtender to show my grid data as a popup, and now I want to replace it with Telerik RadWindow to consistent with the UI of the website.

BUT, I still have not found a way to do it. Because ajax:DragPanelExtender is server-side while Radwindow is Client-side.
Is there any way that can solve my problem?

Please give me an advice.

Scenario: In my website, there is a button named "mybutton". When I hit it, ajaxToolkit:ModalPopupExtender will be shown my data under a popup.
Here is the code in my *.ascx file:

<asp:LinkButton ID="myHiddenControl" runat="server" Text=""></asp:LinkButton>
 
<ajaxToolkit:ModalPopupExtender runat="server"
    ID="myModalPopupExtender"
    TargetControlID="myHiddenControl"
    BehaviorID="programmaticModalPopup"
    PopupControlID="myPanel"
    BackgroundCssClass="modalBackground"
    DropShadow="True"
    RepositionMode="RepositionOnWindowScroll"
    DynamicServicePath=""
    Enabled="True">
</ajaxToolkit:ModalPopupExtender>
 
<asp:Panel runat="server"
    CssClass="modalPopup"
    ID="myPanel"
    Style="width: 440px; height: 500px; padding: 10px;" meta:resourcekey="Resource2">
 
    <div>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <table>
                    <!-- show my data in a table -->
                </table>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Panel>

And here is vb code

Protected Sub mybutton_Click(ByVal sender As Object, ByVal e As EventArgs) Handles mybutton.Click
    myModalPopupExtender.Show()
End Sub

Marin Bratanov
Telerik team
 answered on 28 Mar 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?