Posts

Showing posts from 2011

SQL Optimization Tips

• Use views and stored procedures instead of heavy-duty queries. This can reduce network traffic , because your client will send to server only stored procedure or view name (perhaps with some parameters) instead of large heavy-duty queries text. This can be used to facilitate permission management also, because you can restrict user access to table columns they should not see. • Try to use constraints instead of triggers, whenever possible. Constraints are much more efficient than triggers and can boost performance. So, you should use constraints instead of triggers, whenever possible. • Use table variables instead of temporary tables. Table variables require less locking and logging resources than temporary tables, so table variables should be used whenever possible. The table variables are available in SQL Server 2000 only. • Try to use UNION ALL statement instead of UNION, whenever possible. The UNION ALL statement is much faster than UNION, because UNION ALL statemen

Tips to improving ASP.Net application Performance

1. Disable Session State Disable Session State if you're not going to use it. By default it's on. You can actually turn this off for specific pages, instead of for every page: <%@ Page language="VB" Codebehind="WebForm1.aspx.vb" AutoEventWireup="false" Inherits="WebApplication1.WebForm1" EnableSessionState="false" %> You can also disable it across the application in the web.config by setting the   mode value to Off. 2. Output Buffering Take   advantage   of this great feature. Basically batch all of your work on the server, and then run a Response.Flush method to output the data. This avoids chatty back and forth with the server. <%response.buffer=true%> Then use: <%response.flush=true%> 3. Avoid Server-Side Validation Try to avoid server-side validation, use client-side instead. Server-Side will just consume valuable resources on your servers, and cause more chat back and forth. 4. Repe

Custom Error-Pages and 301 redirects

Let´s assume, you´ve just acquired an expired domain and you´ve recognized that there are plenty of back links pointing to a forum, a blog or something like that. Well, the first problem is, that (in most cases) you won´t be able to use that exactly software and you may not use the formerly used content. For SEO-purposes it will be good to 301-redirect the urls that have deep links, because otherwise google may penalize you because of lots of 404-errors. 2nd reason to do this is tousle the link power of all incoming links. The solution: You may use custom 404-pages in IIS. But this one is better, in web.config in system.web just add this section: <customErrors defaultRedirect="404.aspx"                   redirectMode="ResponseRewrite" mode="On">         <error statusCode="404" redirect="404.aspx"/> </customErrors> In my case I´ve added a "404.aspx" where I´m just redirecting via 301-redirect t

DotNetNuke Skin Objects Reference Code

Banner code and Example Include following code at the top of ascx page <%@ Register TagPrefix="dnn" TagName="BANNER" Src="~/Admin/Skins/Banner.ascx" %> SkinObject - dnn:BANNER           Code Snippet - < dnn:Banner runat="server" id="dnnBanner"> Description - Displays a random banner ad Breadcrumb code and Example Include following code at the top of ascx page <%@ Register TagPrefix="dnn" TagName="BREADCRUMB" Src="~/Admin/Skins/BreadCrumb.ascx" %> SkinObject - dnn:BREADCRUMB Code Snippet - < dnn:Breadcrumb runat="server" id="dnnBreadcrumb"> Description - Displays the path to the currently selected tab in the form of TabName1 > TabName2 > TabName3 Copyright code and Example Include following code at the top of ascx page <%@ Register TagPrefix="dnn" TagName="COPYRIGHT" Src="~/Admin/Skins/Copyright.ascx&quo

Improve DNN’s Page Priority

Improve Dotnetnuke Page Priority DotNetNuke provides a Google-ready XML sitemap to help you get your pages indexed and ranked in Google search results.  Unfortunately, the current implementation sets every page's "priority" ranking to the same fixed value.  Because of this, no page ever gets priority over any other.  Fortunately there's a simple improvement you can make (using Notepad) to give priority to certain pages without changing any core DNN functions... DNN SiteMap As many of you are already aware, DNN provides an XML sitemap feature to help you get your portal(s) indexed on search engines.  An XML sitemap is more search-engine friendly than the easy-to-read (human-friendly) sitemaps.  In fact, the XML sitemap specification is now supported by a number of search engines including Google, Yahoo, MSN, Ask and more.  You'll therefore want to include a link on your website to the XML "SiteMap" even if you already have a separate human-frien

jQuery Tips for DotNetNuke Developers

Image
Make sure you call jQuery.noConflict();. This is necessary to not cause other client scripts and libraries to run errors. This is due to the fact that other client scripts might be using the $ designator for a JavaScript class. [jQuery.noConflict(); documentation] If manually adding jQuery, try to load the jQuery library in the header before all others. Not doing this can lead to the jQuerylibrary not being loaded before another client script or library tries to use it. This is especially true of jQuery plugins. Always call the jQuery core methods using the jQuery() format. This is related to the previous issue. Check the jQuery plugin source code. Not all jQuery plugins use the long form of calling jQuery. This can result in errors if you have called jQuery.noConflict();. In DNN 5+, register jQuery. DNN 5+ allows module developers to register jQuery to be loaded only when modules need it. Just callDotNetNuke.Framework.jQuery.RequestRegistration(). This prevents jQuery f

sIFR

sIFR - How it Works sIFR works by swapping your text element with a Flash file. A piece of Javascript is used which scans the page for any text within a tag or class name. The text is then replaced with a flash file. The technique only uses one flash file for each font type. The text is placed within this flash font file and is then displayed on the page. If you only use one font for all of your headers, you will just use one flash file which will be duplicated across your page. The real beauty of this is that: You can select, copy, and paste the flash header text If a browser does not have Flash or Javascript installed, the original text font is displayed When printing the page, the original text font is displayed Compatible with screen readers Search engine friendly Browser compatible Small file size Cons: There is a brief pause before the flash headers are displayed The user does not need the font installed on their machine. Some designers use the techni

Setting up Dotnetnuke (DNN) to work with Active Directory

Image
Setting Up Active Directory Integration with DotNetNuke Seems like enough people ask, and the information is hidden enough around the DNN AD forum that this information could be posted in one place.  These are the steps I take to get my DNN AD integration to work every time.  I have never had it fail.  I hope you find it helpful.  Now if you are setting up your AD in Mixed-Mode most likley this little write up isn't for you. The setup process is a three step process.  The first step is done from within DNN.  The second step takes place in DNN’s web.config file.  The final step takes place in IIS. Within the DNN Website Login as Admin or Host to your DNN website. After login go to                                                                i.     the Admin tab                               ii.   and then select Authentication You will now see the Active Directory Setup Screen. Fill out the screen as follows.