DotNetNuke Hosting with ASPHostPortal.com

BLOG about DotNetNuke CMS, latest technology and Special DotNetNuke Hosting Package with ASPHostPortal.com

DotNetNuke 7 Hosting - ASPHostPortal :: How to Enable/Disable Allowed File Type in DotNetNuke

clock November 18, 2015 20:25 by author Jervis

DotNetNuke (DNN) is a good content management system that greatly simplifies the day to day administration and content management of sites. One nice feature is the file management system which allows users to upload files from their local computers to the file system on the DNN Web server portal root. They can then use the DNN GUI to add widgets such as the Documents module that provides a fast and simple way to give site visitors access to these files.

The Problem

Sometimes, though, users will encounter a seemingly mysterious error message when they are trying to upload files to DotNetNuke such as the message in the image at the start of this article. This message will say that the file they just tried to upload is a restricted file type and that they need to contact a hosting provider.

You and your users will be happy to hear that this warning looks more ominous than it really is. If you are in charge of the DotNetNuke installation then you may have heard of disallowed file type errors before.

Tracking Down the Issue

When speaking with the user who does not explain the specifics of the error they encountered, there are two possibilities that will immediately spring to mind when hearing about an error with the DotNetNuke file uploader.

  1. The first is that the file size exceeded the permitted file size in DotNetNuke.
  2. The second is that the file type is not a permitted type.

You should make sure to check both of these points while talking with the user and make sure that when you enable the file type, that the file size will not exceed that allowed by your installation of DotNetNuke.

Luckily it’s quite easy to update the list of  permitted file types in DotNetNuke

Here are the steps to update the list of allowed file types based on a DNN 7 installation that I am working with. Depending on your version of DotNetNuke, the path and procedure to manage the list of file types may differ.

  • Log into DotNetNuke with your SuperUser level account.
  • Click on the Host option on the top left toolbar
  • Click on the Host Settings menu item under the Basic Features menu.
  • Scroll to the bottom of the Host Settings page that appears
  • You will see an Advanced Settings sub-section
  • Click on the plus (+) beside the Other Settings option to expand this
  • You will now see a number of options, one of which is titled Allowable File Extensions
  • In the text box of Allowable File Extensions you will see a comma-separated list of the allowed extensions.
  • At the end of the list add the file extension you would like to enable. Please note that you do not add the ‘.’ in front of the extension, but simply a comma and then the actual file extension (such as ,ai for Adobe Illustrator file types, or ,docx for MS Word documents)

Do Not Over-Allow File Types

The reason that DotNetNuke restricts file types so carefully and only allows system SuperUsers to manage the list of file types is that some file types are more prone to allowing system compromises than others.

While managing file types, it is important to realize that each new file type that you add can introduce security risks to your site. On a closed Intranet system this is not so much of an issue, but on an Web site that is exposed to the Internet you should carefully evaluate the allowed file types to make sure that you are not exposing your site and users to unnecessary risks.



DotNetNuke 7.0 Hosting - ASPHostPortal.com :: GZIP Compression to Improve Your DotNetNuke Performance

clock Februarie 11, 2014 07:47 by author Jervis

In this article, I want to describe about IIS SEO Toolkit and the YSlow plugin for FireFox. The SEO Toolkit is invaluable for finding things like broken links, bad markup, etc, while the YSlow plugin analyzes things from a pure performance perspective. I recommend both highly for fine tuning your DotNetNuke websites.

One of the things that YSlow recommends is to compress the files that are sent from the server to the user’s web browser. DotNetNuke provides the option to use GZip compression on the Host Settings page. Turning this feature on is one of the first things I do when I set up a new DotNetNuke installation.

YSlow has the following to say about compression:

“Compression reduces response times by reducing the size of the HTTP response. Gzip is the most popular and effective compression method currently available and generally reduces the response size by about 70%. Approximately 90% of today's Internet traffic travels through browsers that claim to support gzip.”

That’s great! Unfortunately, not every file on your DotNetNuke site is compressed when you enable that setting at the host level. In fact, in a test against a recent version of DotNetNuke in my local environment, YSlow reports 18 components that should be compressed. When you enable GZip compression in the DotNetNuke Host Settings, that number drops to…..17. This is due to the actual page itself being compressed (which is wonderful, don’t get me wrong). But what are the other 17 components? Static files. Namely JavaScript files (.js) and Cascading Style Sheets (.css).

Now, the fact that there so many external files its an altogether different issue that I will side-step for the purpose of this blog post. Of course I would love it if DNN had 1 dynamically created minified JS file and 1 dynamically created CSS file, period. However, that is currently not the case, and even if it was – wouldn’t you want to gzip those files as well?

Here is the compression report from a recent version of DotNetNuke that has GZip enabled:

You can see that DotNetNuke does pretty darn well with respect to the YSlow configuration, except where it comes to dealing with external files (this report was run with the “Small Site or Blog” ruleset, for those that are curious). So, how can I improve this section of the YSlow report? By letting IIS gzip the static files, of course!

The report above is from a local environment, but this is exactly how dnnGallery.net behaved prior to implementing some Gzip compression in IIS.

The steps that I used to get IIS to perform GZip compression on all of the static files in my website were as follows:

1. Enable static file compression in IIS
2. Install IIS Resources
3. Add the appropriate file extensions using the IIS Metabase Explorer
4. Restart IIS

Enabling static file compression in IIS

So, first I enabled IIS compression of static files. Note that this is a server-wide solution, and will apply to each of your web sites hosted in IIS. Here are the relevant steps from the MSDN documentation:

To enable server-wide HTTP compression

1. In IIS Manager, expand the local computer, right-click the Web Sites folder, and then click Properties.

2. Click the Service tab, and in the HTTP compression section, select the Compress application files check box to enable dynamic compression.

3. Select the Compress static files check box to compress static files.

4. In the Temporary directory box, type the path to a local directory or click Browse to locate a directory. Once a static file is compressed, it is cached in this temporary directory until it expires, or the content changes. The temporary directory must be on a local drive on an NTFS-formatted partition. The directory cannot be compressed, and should not be shared.

5. Under Maximum temporary directory size, click a folder size option. If you click the Limited to (in megabytes) option and enter a number in the text box next to it, IIS automatically cleans up the temporary directory according to a least recently used rule when the set limit is reached.

6. Click Apply, and then click OK.

After I performed this step, only one random .txt file was compressed, how useful! You can check which files are compressed by looking in the temporary folder that was specified in the above steps.

Add file extensions using the Metabase Explorer

After I installed the resource kit tools, I opened the new Metabase Explorer application from my start menu and performed the following steps:

1. Expanded [Machine Name] –> W3SVC –> Filters –> Compression and selected gzip
2. For the row named “HcFileExtensions” I added “js” and “css” to the “Data” list
3. For the row named “HcScriptFileExtensions” I added “axd” to the “Data” list

Run it and you’ll see the result



DotNetNuke Hosting - Tips and Trick to Optimize DotNetNuke

clock April 25, 2013 10:41 by author andy_yo

A typical DNN install requires considerable server resources, and creates significant traffic between the database & web server. These techniques aim to reduce both of these where-ever possible, along with some other optimizations. Some of these may not apply to you, and I advise you to exert discretion in deciding which of these work best for you.

 

About ASPHostPortal.com
ASPHostPortal.com is Microsoft No #1 Recommended Windows and ASP.NET Spotlight Hosting Partner in United States. Microsoft presents this award to ASPHostPortal.com for ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2012, ASP.NET 4.5, ASP.NET MVC 4.0, Silverlight 5 and Visual Studio Lightswitch. Click here for more information

DNN Optimization:

  1. Host Settings
    1. Set the "Performance Setting" to "Heavy Caching".
    2. Depending upon Hosting resources, set the "Compression Setting" to "Deflate Compression" or "GZip Compression".
    3. Depending upon Hosting resources, enable "Whitespace filter" (not of much use, if you have also enabled compression).
    4. Disable "Users Online" for Installations on which "Users Online" module is NOT used.
    5. Set the "Scheduler Mode" to "Timer Method". "Request Mode" causes the Scheduler to be invoked on every request to a page of your installation.
    6. On sites where Logging is NOT mission critical, enable "Event Log Buffer", so that log entries are buffered before being flushed.
    7. On sites where the Site files do NOT update frequently, disable "Auto-sync filesystem".
    8. Uncheck "Enable Ajax" on portals that are just informative, and do NOT involve management tasks.
  2. Admin Settings
    1. On DNN 5 portals, unselect "Enable Skin Widgets" if they are not being used to prevent redundant skin file downloads.
  3. Log Settings
    Disable all Logs NOT required on an installation. In particular,
    1. Disable "Application Start".
    2. Disable "Application End".
    3. You might also want to disable others like "Scheduler Started", "Scheduler Event Started" etc. depending upon if they are not much useful to you. However, "Sceduler event Failure" should not be disabled to enable debugging of any scheduler issues.
  4. Schedule Settings
    Disable or customize all Schdules NOT required on an installation. In particular,
    1. Configure "DotNetNuke.Services.Scheduling.PurgeScheduleHistory, DOTNETNUKE" to run every 5 days (or whatever fits best to your portal depending upon how much Schedule Log your portal generates).
    2. Configure "DotNetNuke.Services.Search.SearchEngineScheduler, DOTNETNUKE" to run every 5 days and retry after 1 day (again depending upon what fits best to your portal. There is no one size fits all approach here).
  5. Javascript & CSS Optimization
    1. Manually optimize all css & js files to remove redundant white-space (or use a free or paid DNN module e.g. Page Blaster to manage this task for you).
    2. Zero out portal.css (if you dont use it, or better still, delete it).
    3. Check ~/portals/_default/default.css for any styles not being used on your portal.
    4. Try to use any other menu except SolPart Menu.
    5. Try NOT to use table based skins (improves the perceived rendering of your page).
  6. Cookies: Set the appropriate value for Persistent & Session cookies in web.config.
  7. Compilation: If you are compiling DotNetNuke or any Extension from source, make sure that you compile the project in Release mode. Moreover, make sure you have debug="false" in web.config for your production sites.



DotNetNuke 7 Hosting - Features That Must Implement in DNN Module to Maximize SEO

clock Maart 21, 2013 11:35 by author andy_yo

SEO and DotNetNuke is a topic increasingly discussed with the growing awareness of site owners and webmasters of the need for building DNN websites that maximise the chances of being rated highly in search engine results pages. Following are the features that your DNN Module must have to maximize the SEO aspects.

 

About ASPHostPortal.com
ASPHostPortal.com is Microsoft No #1 Recommended Windows and ASP.NET Spotlight Hosting Partner in United States. Microsoft presents this award to ASPHostPortal.com for ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2012, ASP.NET 4.5, ASP.NET MVC 4.0, Silverlight 5 and Visual Studio Lightswitch. Click here for more information

1. Allow customisation of every aspect of the Url for the page

The Url is so important for the page. It tells the user what is on the page by looking at it, and it’s one of the most important things you can put keywords into for your page.   For the Url Master and Friendly Url Provider modules, the most common request I get is ‘can I get rid of the ‘articleId/entryId/propertyId/categoryId’ from the ‘News Articles/Blog/Property Agent/Catalook’ module? This is because people are stuck with Urls like /articleType/viewType/articleId/3/my-article-name.aspx’, and they just want ‘/articles/my-article-name.aspx’ – or, in my case, they just want ‘/blog/blog-entry-name.aspx’ or similar. The point is, developers, you have wean yourself off just throwing in a database-id into the query string and calling it finished. It’s a lot more work, sure, but it’s the most important thing you can do to a module.

2. Don’t allow duplicate Urls for the same content

Duplicate content is something we must all watch out for. You don’t want the same page being accessed by more than one Url. If you do have more than one Url, you should have 301 redirects back to your chosen ‘canonical’ Url.    This means making sure, that in your code, if you are generating links between pages of content, you don’t generate multiple versions of Urls back to the same address.

3. Allow customisation of the Page Title, Meta Description and Meta Keywords for the page

This is a very common problem. The base DNN page information allows the specification of the Page Title, Description and Keywords. Once you add a module displaying ‘dynamic’ content, driven by query string values, the content probably won’t match the ‘generic’ Title, description and Keywords.

The Title and Description are important, because of the Search Engine Result Pages, or ‘SERPs’. Everyone is familiar with the ‘clickable’ header on the SERP, and the short two or three line description.   In many cases, the Html Page title is the header, and the Html Meta Description tag is the two or three line description. It’s here where you need to convert people looking at a page full of results to actually click on your page – particularly if you aren’t ranked number 1 for the result.    By allowing crafting of individual Descriptions and Page titles separate to any other page content, you allow site authors to fine-tune their SERP results without affecting what the actual page looks like.

Many modules available just throw an automatically generated value into the Page description, and title, or, worse, don’t even change it from what the base page value is.

4. Don’t use AJAX for content display

I love using AJAX pages – where they are suitable.  If you’re displaying static content to a user (and 90% of all websites do exactly this) then don’t use AJAX. There’s no point. People expect to see a page refresh when they click on a link. Leave AJAX for more complicated editing tasks where it is really useful. AJAX has the ability to hide lots of good content behind postbacks and javascript, where search engine spiders won’t find it.

5. Allow customisation of the anchor text for all links

This is something that most modules actually do a reasonable job of, but it’s worth repeating – if you are generating links to different parts of your content, allow the author to customise the text of that link. Perhaps there is a particular keyword they’d like to link with, which is different to the ‘title’ or ‘name’ or whatever. Let them customise the link text.

6. Use simple layouts and CSS design

Early DNN was table heavy – and I’m not part of the crusading crowd that wants to run the sword through any website that dares to put a table in for display purposes. Sometimes a table is necessary, sometimes not.   But don’t force tables on your websites. Just keep it simple with div and span elements, and let CSS do the heavy lifting of organising the content. That way, skilled authors will be able to modify the CSS and change the layout quite easily. They’ll be thankful, but, most importantly, the Html will be cleaner and more likely to be indexed effectively by search engine spiders.

7. Use H1, H2 and H3 tags for headings, instead of the ‘Head’ class

Most people who have studied SEO techniques know that you need to use emphasis on the keywords of your content, so that the search engines know what the page is about. The search engines know that ‘h1’ and ‘bold’ and ‘em’ mean that the particular words inside are important to the overall meaning of the page.

So use the H1, H2, H3 tags where suitable. There is an in-built DNN CSS class called ‘Head’, and you should avoid it. That’s what ‘H1’ is for. 



DotNetNuke 7 Hosting - Why Choosing DotNetNuke 7

clock Februarie 27, 2013 06:23 by author andy_yo

There are many changes with DNN 7 that are aimed at making content and site maintenance easier.  Here are our top 4 reasons why an upgrade to DNN 7 is going to save you time and generally make your life easier.

 

About ASPHostPortal.com
ASPHostPortal.com is Microsoft No #1 Recommended Windows and ASP.NET Spotlight Hosting Partner in United States. Microsoft presents this award to ASPHostPortal.com for ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2012, ASP.NET 4.5, ASP.NET MVC 4.0, Silverlight 5 and Visual Studio Lightswitch. Click here for more information

1. Auto-save

We’ve all been there, you work hard at something, get it just how you want it then you hit the wrong key (or the browser crashes) and there goes all your work down the drain. Not anymore, with DNN 7 auto-save ensures your work is saved as you go, avoiding any mishaps and lost work. Sure to be the saviour of web content editors across the globe.

2. Bookmarked settings

DNN 7 has a completely different control panel from previous editions with a very visually appealing tab interface for both admin and hosts.  The new interface completely changes the way we use DotNetNuke and one of the best new additions is the ability to bookmark favourite settings. Keeping all your favourite settings in one easy to reach spot and at the click of a button is a massive time saver.

3. Drag and drop

Gone are the days of trying to format your pages behind the scenes. You want to add new modules, move an image or move a text box; you pick it up and put it where you want. The ease and simplicity of the new DNN 7 drag and drop feature gives you a whole lot of flexibility and control over your website, without pulling your hair out. 

4. Version Comparison

Ever edited something then thought hang on, I’m not sure that’s better, what did it look like before? With DNN 7 you can easily compare versions in either the rich text or html editors. Just tick the compare box and the text or code differences are highlighted for you. You can then choose which option you want to go with from the version history and save second guessing yourself.

In short, DNN 7 is an intuitive user friendly CMS that makes editing and maintaining your website content quicker and easier than ever before. These new improvements are sure to increase your productivity in 2013.



DotNetNuke 7 Hosting - Optimize Your DotNetNuke Sites

clock Februarie 8, 2013 08:02 by author andy_yo

A typical DNN install requires considerable server resources, and creates significant traffic between the database & web server. These techniques aim to reduce both of these where-ever possible, along with some other optimizations. Some of these may not apply to you, and We advise you to exert discretion in deciding which of these work best for you.

About ASPHostPortal.com
ASPHostPortal.com is Microsoft No #1 Recommended Windows and ASP.NET Spotlight Hosting Partner in United States. Microsoft presents this award to ASPHostPortal.com for ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2012, ASP.NET 4.5, ASP.NET MVC 4.0, Silverlight 5 and Visual Studio Lightswitch. Click here for more information

DNN Optimization:

  1. Host Settings
    1. Set the "Performance Setting" to "Heavy Caching".
    2. Depending upon Hosting resources, set the "Compression Setting" to "Deflate Compression" or "GZip Compression".
    3. Depending upon Hosting resources, enable "Whitespace filter" (not of much use, if you have also enabled compression).
    4. Disable "Users Online" for Installations on which "Users Online" module is NOT used.
    5. Set the "Scheduler Mode" to "Timer Method". "Request Mode" causes the Scheduler to be invoked on every request to a page of your installation.
    6. On sites where Logging is NOT mission critical, enable "Event Log Buffer", so that log entries are buffered before being flushed.
    7. On sites where the Site files do NOT update frequently, disable "Auto-sync filesystem".
    8. Uncheck "Enable Ajax" on portals that are just informative, and do NOT involve management tasks.
  2. Admin Settings
    1. On DNN 5 portals, unselect "Enable Skin Widgets" if they are not being used to prevent redundant skin file downloads.
  3. Log Settings
    Disable all Logs NOT required on an installation. In particular,
    1. Disable "Application Start".
    2. Disable "Application End".
    3. You might also want to disable others like "Scheduler Started", "Scheduler Event Started" etc. depending upon if they are not much useful to you. However, "Sceduler event Failure" should not be disabled to enable debugging of any scheduler issues.
  4. Schedule Settings
    Disable or customize all Schdules NOT required on an installation. In particular,
    1. Configure "DotNetNuke.Services.Scheduling.PurgeScheduleHistory, DOTNETNUKE" to run every 5 days (or whatever fits best to your portal depending upon how much Schedule Log your portal generates).
    2. Configure "DotNetNuke.Services.Search.SearchEngineScheduler, DOTNETNUKE" to run every 5 days and retry after 1 day (again depending upon what fits best to your portal. There is no one size fits all approach here).
  5. Javascript & CSS Optimization
    1. Manually optimize all css & js files to remove redundant white-space (or use a free or paid DNN module e.g. Page Blaster to manage this task for you).
    2. Zero out portal.css (if you dont use it, or better still, delete it).
    3. Check ~/portals/_default/default.css for any styles not being used on your portal.
    4. Try to use any other menu except SolPart Menu.
    5. Try NOT to use table based skins (improves the perceived rendering of your page).

  6. Cookies: Set the appropriate value for Persistent & Session cookies in web.config.

  7. Compilation: If you are compiling DotNetNuke or any Extension from source, make sure that you compile the project in Release mode. Moreover, make sure you have debug="false" in web.config for your production sites.


DNN 7 Hosting - ASPHostPortal :: Using DNN Data Caching In Custom Modules

clock Desember 18, 2012 06:25 by author Jervis

One of the biggest concerns for developers these days is how to increase the performance of delivered applications. User expectations have changed over the past few years and the expectations are very, very high in regards to page load times and how quickly information should be returned to the users. Thankfully, as part of DotNetNuke there are a number of different features that can help applications work quickly. Some of these features are known by everyone, things such as the DotNetNuke performance settings under "Host Settings", Cache Time settings on a module by module basis, and if on Professional Edition the built in page Output Cache Provider. However, one often overlooked API that is helpful for developers is the DataCache API. In this post I'll do a deep dive into why this API is so helpful and some scenarios where leveraging this API it can reduce page load times and system resources needed for each page request.

What is the DataCache

Before I get into the specifics of how to use the DataCache API I want to give a bit of detail on what exactly DataCache is. If you are an experienced ASP.NET developer you should be familiar with the ASP.NET Application object, a cache repository for storing information at the application level. Items stored in application are stored using code like the following. Application["MyKey"] = MyObject; This shouldn't be anything new to you, but within DotNetNuke, just like "SessionState" it is a recommended practice to not utilize this object due to the fact that Application is not aware of the DotNetNuke caching API's or Web Farm configurations. Enter the DataCache API.

DotNetNuke's DataCache object comes in to fill the gap, used at the base level in a very similar fasion it allows you to store any object that you desire using the DotNetNuke cache provider. If the site is configured to use File caching your content is stored in a file, if Memory it wil be stored in memory. With this you can rest assured that your cached objects will work just like the rest of the DotNetNuke infrastructure.

What do I Cache?

So great, we know we can cache objects, but what do we cache? This is the age old question and something that I cannot give a 100% answer here that will be a solution for everyone reading this. The key here is that we can store ANY objects necessary. A few examples of diffent cache strategies can be illustrated by discussing what I do with two of our most popular open source modules. You can cache individual objects, and implement this caching seamlessly in your controller class. We are doing this for the our custom settings for the "Expandable Text/HTML" module. The advantage here is that if you are calling ExpandableTextController.GetSettings(12) with cache checking code inside the "GetSettings" method we can be sure that we only hit the database if the object isn't in cache already. This helps reduce database hits for commonly used objects.

In addition to doing this you can also cache generated content. Lets assume that we have a module that grabs a number of objects from the database and then does a bunch of processing and eventually loads the content to an ASP.NET Literal control on the UI. Sure, we could cache the database objects to prevent the database call, but we could also think about storing the fully generated content. Doing this, even with a 15 minute cache time can reduce CPU usage, Memory usage, and page load times for your custom modules.

Using the DataCache Object

When it comes to using the data cache object there are a number of situations where a similar pattern can be used to help gain access to the Cache and store items. To help take away some of the duplicate code that can occur I often include a "CacheHelper" object that helps greatly. Looking at the code snippet below you can see what we use on all projects.


1: public static bool CacheExists(string key)
2: {
3: return DataCache.GetCache(key) != null;
4: }
5: 
6: public static void SetCache<T>(T toSet, string key)
7: {
8: DataCache.SetCache(key, toSet);
9: }
10: 
11: public static T GetItemFromCache<T>(string key
12: {
13: return (T) DataCache.GetCache(key);
14: }

This makes the process this much easier for you as a developer you don't need to perform casting along the way and you can use very simple patterns to get objects from cache. For example I can do something like this: var myObject = CacheHelper.CacheExists("MyItem") ? CacheHelper.GetCache("MyItem") : new MyType();. As you can see one line process to get my object, or a new object if the item isn't contained within the cache. You can easily expand on this to help with your specific application.

Conclusion

Application performance is something that as web developers we need to be working on every day. Using DotNetNuke's built in cache system gives us a helpful tool to improve performance, and also ensures that applications we develop can easily scale to Web Farm environments. Please feel free to share comments/questions below.



About ASPHostPortal.com

We’re a company that works differently to most. Value is what we output and help our customers achieve, not how much money we put in the bank. It’s not because we are altruistic. It’s based on an even simpler principle. "Do good things, and good things will come to you".

Success for us is something that is continually experienced, not something that is reached. For us it is all about the experience – more than the journey. Life is a continual experience. We see the Internet as being an incredible amplifier to the experience of life for all of us. It can help humanity come together to explode in knowledge exploration and discussion. It is continual enlightenment of new ideas, experiences, and passions


Author Link


Corporate Address (Location)

ASPHostPortal
170 W 56th Street, Suite 121
New York, NY 10019
United States

Tag cloud

Sign in