This is a migrated thread and some comments may be shown as answers.

tree conflict with rewrite url

1 Answer 17 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Neda
Top achievements
Rank 1
Neda asked on 28 Sep 2013, 09:39 AM
Hello


Recently i have added rewrite url rule to my IIS and also it has been added to web.config , but after using this my  radtreeview  shows the following error

"The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)." and i want to say that i have changed all my css and java files path like this  :

    <link href="<%= ResolveUrl("~/Style/style.css") %>" rel="stylesheet" type="text/css" />
    <script pin src="<%= ResolveUrl("~/Js/Jquery/jquery.min.js") %>" type="text/javascript"></script>


Best regards
-------------------------------------------THis my web.config File--------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<configSections>
<sectionGroup name="Miron.web">
<section name="CompressorSettings" type="Miron.Web.MbCompression.SettingsConfigSection" />
</sectionGroup>
</configSections>
<appSettings>
<add key="DBNAME" value="Data Source=;Initial Catalog=;User ID=;Password=" />
<add key="ExternalDBNAME" value="Data Source=192.168.1.1;Initial Catalog=Externalelib;User ID=sa;Password=1234" />
<add key="SiteUrl" value="iranhelpdesk.ir" />
<add key="SiteTitle" value="مرکز پشتیبانی انفورماتیک ایران" />
<add key="email" value="info@iranhelpdesk.ir" />
<add key="Hejri" value="-1" />
<add key="SSlEmail" value="false" />
</appSettings>

<system.net>
<mailSettings>
<smtp>
<network host="mail.iranhelpdesk.ir" port="25" userName="site@iranhelpdesk.ir" password="@iran#it_123" />
</smtp>
</mailSettings>
</system.net>
<system.web>
<httpRuntime maxRequestLength="409600" executionTimeout="300" requestValidationMode="2.0" />

<machineKey validation="SHA1" validationKey="AutoGenerate,IsolateApps" />
<customErrors mode="Off" defaultRedirect="Error.aspx?ErrorType=customErrors" />
<compilation debug="false" targetFramework="4.0">
<assemblies>
<add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
</compilation>
<httpHandlers>
<add verb="*" path="jslib.axd" type="Miron.Web.MbCompression.JavaScriptCompressionHandler" validate="true" />
<add verb="*" path="css.axd" type="Miron.Web.MbCompression.CssCompressionHandler" validate="false" />
<add verb="GET" path="CaptchaImage.aspx" type="WebControlCaptcha.CaptchaImageHandler, WebControlCaptcha" />
<add verb="*" type="ComponentArt.Web.UI.UploadProgressHandler,ComponentArt.Web.UI" path="ComponentArtUploadProgress.axd" />
<add verb="*" path="*js.axd" type="JavaScriptHandler" />
<add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
<add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
<add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
<add verb="*" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" />
</httpHandlers>
<httpModules>
<add type="ComponentArt.Web.UI.UploadModule,ComponentArt.Web.UI" name="ComponentArtUploadModule" />
<!--<add type="CompressWebResource" name="CompressWebResource"/>-->
</httpModules>
<authentication mode="Windows" />
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
</pages></system.web>
<Miron.web>
<CompressorSettings reflectionAlloweded="false" optimizeHtml="true" daysInCahe="30" compressCSS="true" compressJavaScript="true" compressPage="false" compressWebResource="false" compressThirdParityScripts="false">
<excludeTypes>
<add key="image/gif" />
<add key="image/jpeg" />
</excludeTypes>
<excludePaths>
<!--<add key="~/DontCompressMe.aspx" />-->
</excludePaths>
</CompressorSettings>
</Miron.web>
<system.webServer>
<handlers>
<add name="JsHandler" verb="*" path="jslib.axd" type="Miron.Web.MbCompression.JavaScriptCompressionHandler, MbCompression" preCondition="integratedMode" />
<add name="CssHandler" verb="*" path="css.axd" type="Miron.Web.MbCompression.CssCompressionHandler, MbCompression" preCondition="integratedMode" />
<add name="Telerik_Web_UI_DialogHandler_aspx" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" />
<add name="Telerik_Web_UI_SpellCheckHandler_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" />
<add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />
<add name="Telerik.RadUploadProgressHandler.ashx_*" path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI" preCondition="integratedMode" />
</handlers>
<validation validateIntegratedModeConfiguration="false" />
        <rewrite>
            <rules>
                <rule name="URL">
                    <match url="page/([0-9]+)" />
                    <action type="Rewrite" url="/?pageid={R:1}" />
                </rule>
            </rules>
        </rewrite>

</system.webServer>
</configuration>

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 02 Oct 2013, 11:41 AM
Hello,

I would suggest reviewing the following help article in order to avoid that problem. Please try to wrap all your JavaScript file content with telerik:RadScriptBlock. 


Regards,
Boyan Dimitrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
TreeView
Asked by
Neda
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or