FreeTextBox issue IE11 - Object reference not set to an instance of an object using asp.net, c#, visual studio 2010

Hi, I have freetextbox. On IE11 its giving the error.

 <FTB:FreeTextBox ID="txtDetails" runat="server"
									 AutoGenerateToolbarsFromString="false" 
									 DesignModeCss="ftb/ftb.css"  
                                      BackColor="#cccccc" 
									 EditorBorderColorDark="#cccccc"
                                      EditorBorderColorLight="#cccccc"
                                     ClientSideTextChanged="TextCount" 
                                     EnableHtmlMode="false"
									 JavaScriptLocation="ExternalFile"
									 RemoveScriptNameFromBookmarks="true"
									 RemoveServerNameFromUrls="true"
									 RenderMode="Rich"
									 StripAllScripting="true"
									 SupportFolder="ftb"
									 Focus="false"
									 TabIndex="9" 
									 ToolbarBackColor="#dddece"
									 ToolbarBackgroundImage="false"
									 ToolbarImagesLocation="ExternalFile"
									 ToolbarStyleConfiguration="NotSet"
									 Height="100px" Width="100%"   ><Toolbars>
									<FTB:Toolbar runat="server" ButtonStyle-UseDownBackgroundImage="false">
										<FTB:Bold runat="server" />
										<FTB:Italic runat="server" />
										<FTB:Underline runat="server" />
                                        <FTB:FontSizesMenu runat="server"></FTB:FontSizesMenu><FTB:FontBackColorsMenu runat="server" />
                                    </FTB:Toolbar>
                                   
									<FTB:Toolbar runat="server" ButtonStyle-UseDownBackgroundImage="false">
										<FTB:Cut runat="server" />
										<FTB:Copy runat="server" />
										<FTB:Paste runat="server" />
									</FTB:Toolbar>
									<FTB:Toolbar>
										<FTB:NetSpell runat="server"></FTB:NetSpell>
                                        
									</FTB:Toolbar>
                                    
									</Toolbars>
								</FTB:FreeTextBox>

Open in new window


I am getting the error on IE11

I have integrated freetext box with website.

It's working well for all browser except recently release IE 11.

It throws error "Object reference not set to an instance of an object."

Following is the error stack trace:

 at FreeTextBoxControls.FreeTextBox.RenderTabs(HtmlTextWriter writer) at
 FreeTextBoxControls.FreeTextBox.RenderRichEditor(HtmlTextWriter writer) at
 FreeTextBoxControls.FreeTextBox.Render(HtmlTextWriter writer) at
 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at
 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at
 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at
 ASP.myaspxpage.__Render__control4(HtmlTextWriter __w, Control parameterContainer) in
 pathtomyaspxpage:line 505 at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,
 ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at
 System.Web.UI.Control.Render(HtmlTextWriter writer) at
 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at
 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at
 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at
 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at
 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at
 System.Web.UI.UpdatePanel.RenderChildren(HtmlTextWriter writer) at
 System.Web.UI.UpdatePanel.Render(HtmlTextWriter writer) at
 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at
 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at
 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at
 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at
 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at
 System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at
 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at
 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at
 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at
 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at
 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at
 System.Web.UI.Control.Render(HtmlTextWriter writer) at
 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at
 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at
 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at
 mymasterpage.__Renderform1(HtmlTextWriter __w, Control parameterContainer) in
 pathtomymasterpage:line 87 at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriterwriter,
 ICollection children) at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter
 writer) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at
 System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) at
 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at
 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at
 System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) at
 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at
 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at
 System.Web.UI.Control.Render(HtmlTextWriter writer) at
 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at
 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at
 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at
 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at
 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at
 System.Web.UI.Page.Render(HtmlTextWriter writer) at
 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at
 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at
 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at
 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean
 includeStagesAfterAsyncPoint)
Saroj13Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Randy DownsOWNERCommented:
Maybe this FTB alternative will help.

FTB is not longer under development and the removal of the MSIE token from IE 11's user agent broke FTB's functionality.
...
created a rewrite rule to detect IE 11 and rewrite the user agent. Don't forget to add the server variable "HTTP_USER_AGENT".
 

<rewrite>
<rules>
<rule name="Change IE 11 User Agent to IE 10" enabled="true">
  <match url="(.*)" />
  <action type="None" />
  <conditions>
    <add input="{HTTP_USER_AGENT}" pattern=".trident\/[789]" />
  </conditions>
  <serverVariables>
    <set name="HTTP_USER_AGENT" value="Mozilla/5.0 (compatible; MSIE 11.0; Windows NT 6.2; Trident/7.0)" />
  </serverVariables>
 </rule>
 </rules>
</rewrite>

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Saroj13Author Commented:
Hi,

I have added this in web.config and i am testing it on IE11 browser. IIS is not installed over there. How to add server variable?

 <system.webServer>
      <rewrite>
        <rules>
          <rule name="Change IE 11 User Agent to IE 10" enabled="true">
            <match url="(.*)" />
            <action type="None" />
            <conditions>
              <add input="{HTTP_USER_AGENT}" pattern=".trident\/[789]" />
            </conditions>
            <serverVariables>
              <set name="HTTP_USER_AGENT" value="Mozilla/5.0 (compatible; MSIE 11.0; Windows NT 6.2; Trident/7.0)" />
            </serverVariables>
          </rule>
        </rules>
      </rewrite>

    </system.webServer>

Thanks
Randy DownsOWNERCommented:
maybe we can adapt the .htaccess here. Be sure to copy your .htaccess before making changes.

if ( strpos($_server['http_user_agent'], 'rv:11.0') !== false && strpos($_server['http_user_agent'], 'trident/7.0;')!== false){ echo "user is on ie11 touch / non-touch";}

Open in new window

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.