Telerik RADEditor Failing to render with IIS Url Rewrite - iis-7

am using IIS Url Rewrite to create friendly url, i have noticed after enabling it the radeditor fail to render as in the image :http://i.stack.imgur.com/TZo2O.png
The rule am using look like this in web.config :
<rewrite>
<rules>
<rule name="RewriteUserFriendlyURL1" stopProcessing="true">
<match url="^([^/]+)/?$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="Default.aspx?name={R:1}" />
</rule>
</rules>
</rewrite>
I have changed DialogHandler from aspx to axd and also changed the path for it to look like below and also cant render properly
<add path="~/Telerik.Web.UI.DialogHandler.axd" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />

I examined the provided screenshot and noticed that the problem is that RadEditor does not load its CSS classes for its toolbar.
Try to register the skin by enabling the CDN stylesheet or manually as shown in this article: Registering an external skin of RadEditor.

Related

Asp.net Dynamic page Creation issues

I created a aspx blog website which creates page dynamically.
and uses unique id generated at the time of page creation as it's name.
eg:
http://www.websitename.com/2016/f1.aspx
http://www.websitename.com/2016/f2.aspx
http://www.websitename.com/2016/f3.aspx
If i use this naming convention, do i have to worry about SEO problems?
whether the the search engines index my website and the blogs?
I need to change the dynamically created page name to the page title. How can i do it?
and also i need to remove the .aspx from the blog page.
eg :
/f1.aspx => /HelloWorld
/f2.aspx => /ThisCode
Try this... although i didn't tried it myself yet... but i am pretty sure ..it should work... Add these lines in your webconfig to remove .aspx extension from the end...
<configuration>
<system.webserver>
<rewrite>
<rules>
<rule name="RemoveASPX" enabled="true" stopProcessing="true">
<match url="(.*)\.aspx" />
<action type="Redirect" url="{R:1}" />
</rule>
<rule name="AddASPX" enabled="true">
<match url=".*" negate="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{URL}" pattern="(.*)\.(.*)" negate="true" />
</conditions>
<action type="Rewrite" url="{R:0}.aspx" />
</rule>
</rules>
</rewrite>
</system.webserver>
Try these links.... these might come handy
how to change title of aspx page dynamically on page load
Page.Title vs Title tag in asp.net
how can i create a dynamic page in asp.net (C#)?

How do I negate login.aspx in the web.config with Wordpress

We have recently created a Wordpress site which will be hosted on a Windows 2012 Server. The server is currently serving compiled code of which one of the URL's it uses is login.aspx.
When we add the Wordpress site and enable permalinks, we get the default Wordpress page instead of login.aspx.
We have unsurprisingly narrowed it down to the web.config rewrite rule.
<rewrite>
<rules>
<rule name="wordpress" patternSyntax="Wildcard">
<match url="*"/>
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
</conditions>
<action type="Rewrite" url="index.php"/>
</rule>
</rules>
</rewrite>
I'm sure we have to negate the login.aspx page some how but I'm not sure how to do it. This has to work as a single site for now.
All I needed to do was add in the following:
<add input="{URL}" negate="true" pattern="*.aspx" />

How to Hide any page extension like (.aspx and .asp and .php and .html) in asp.net IIS7

I have a requirement to hide any type of page extension in my site which have hosted 100 more page asp,html and aspx pages.
I want to hide all type page extension . I use following code which only works for .aspx. not work on .html & .asp page extension
<rule name="RemoveASPX" enabled="true" stopProcessing="true">
<match url="(.*)\.aspx" />
<action type="Redirect" url="{R:1}" />
</rule>
<rule name="AddASPX" enabled="true">
<match url=".*" negate="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{URL}" pattern="(.*)\.(.*)" negate="true" />
</conditions>
<action type="Rewrite" url="{R:0}.aspx" />
</rule>
<match url="(.*)\.(aspx|php|html)" />
<action type="Rewrite" url="{R:0}.{R:1}" />
You can change regex of the match element so it matches on the other extensions.
You can (and should) use the routing mechanism provided by Asp.NET, in your specific case the MapPageRoute method as described here: http://msdn.microsoft.com/en-us/library/vstudio/dd329551%28v=vs.100%29.aspx
What you see about aspx pages can be applied to other kind of pages too, like plain html or old asp.

Changing the URL Extension

I had developed a Web application in Asp.net. When am using the Application over IIS, the file extension as.aspx is visible. Is it possible to hide it (or) rename it....Thankx in advance.
For .NET framework 4.0+, try the following rule in web.config (inside <system.webServer>):
The first will redirect URLs using the old format, to remove the .aspx extensions. You should of course update your links as well - eventually you won't need this.
The second rule rewrites URLs internally to add .aspx behind the scenes.
<rewrite>
<rules>
<rule name="RedirectOldFormat" enabled="true" stopProcessing="true">
<match url="(.*)\.aspx" />
<action type="Redirect" url="{R:1}" />
</rule>
<rule name="InternallyAddAspx" enabled="true">
<match url=".*" negate="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{URL}" pattern="(.*)\.(.*)" negate="true" />
</conditions>
<action type="Rewrite" url="{R:0}.aspx" />
</rule>
</rules>
</rewrite>
For .NET Framework 3.5 or earlier, you can accomplish this using routing. Try the following solution:
http://www.codedigest.com/Articles/ASPNET/294_Search_Engine_Friendly_URLs_Using_Routing_in_ASPNet_35.aspx

Adding ignore case in URL rewriting in ASP.Net

I am using following web.config entry for url rewriting to remove .aspx extension.
<rewrite url="~/(.+)" to="~/$1.aspx" />
The problem I am getting here is if I have any image on page, it assigns .aspx extension to image.
Also if I tried to access my site like http://exmaple.com, it get redirected to http://exmaple.com/default.aspx.aspx.
I want to know if there is any way to add ignore case in web.config.
Your rewrite should look something like this, to remove .aspx
<rewrite>
<rules>
<rule name="RewriteASPX">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="{R:1}.aspx" />
</rule>
</rules>
</rewrite>

Resources