DotNetNuke Hosting with ASPHostPortal.com

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

DotNetNuke Hosting with ASPHostPortal :: How to optimise DotNetNuke site for speed by improving page load, caching and use of CDN

clock December 23, 2014 05:42 by author Mark

How to optimise DotNetNuke speed by improving page load, caching and use of CDN

This is a real example of what can be done to get your sites running faster before upgrading the hardware.
Starting point - this blog mattjura.com with following specification: Server: Microsoft Windows NT 6.1.7601 Service Pack 1, IIS/7.5, .Net 4.0 and SQL Server 2008 R2 Express edition, 2GB RAM, 1GHZ CPU – running multiple sites. DotNetNuke

Stats before optimisation

WebPageTest.org results: Load time: 5.546s, First byte 1.491s, Start render 3.675s, Requests 66,

YSlow results: Overall performance score 70 Grade C
The page has a total of 46 components and a total weight of 558.8K bytes
Primed cache: HTTP Requests - 4, Total Weight - 56.2K

Google Page Speed results:
Page Speed Score of 54 (out of 100)
Not a good set of results but here are the steps to get the site running faster.

Server configuration - actions to complete

Enable content compression in: IIS Manager >> Compression
Add HTTP response headers in: IIS Manager >> HTTP response headers
(Enable HTTP keep alive and Expire web content after 7 days or as required)
Enable output caching in: IIS Manager >> Output Caching for the following file extensions .css, .gif, .jpg, .js and .png files (User-mode caching, using file change notifications)
This may not always be possible on the shared servers but if you do not ask you do not get.

Results:
WebPageTest results: Load time 3.82, First byte 1.489, Start render 2.751 Keep alive A, Compress Transfer A
YSlow results: Overall performance score 80 Grade C
Google Page Speed results: overall PageSpeed Score of 63 (out of 100)

DNN upgrade and configuration

Upgrade the site 6.02.05 >> 7.00.05 >> 7.03.04 (latest version)
Change the following settings in host >> host settings:
Basic settings - turn off copyright credits
Performance settings - cache setting heavy
Authenticated cacheability - Public
Client resource management - Enable Composite Files
Client resource management - Minify CSS
Client resource management - Minify JS
Scheduler mode - Timer Method
Enable Event Log Buffer - on
Auto sync file system - off
In Admin >> Site Settings turn off Enable Skin Widgets if not used

Results:
WebPageTest results: Load time 3.78, First byte 0.995, Start render 2.340 Keep alive A, Compress Transfer A, Effective use of CDN - yes
YSlow results: Overall performance score 83 Grade B
The page has a total of 34 components and a total weight of 331.9K bytes
Primed cache: HTTP Requests - 4, Total Weight - 23.4K
Google Page Speed results: overall PageSpeed Score of 88 (out of 100)

OK - getting better but still room for improvement.

Use Content Delivery Network

A CDN service will take all of your images, java script, and CSS (Cascading Style Sheets) and host them on to their network to quickly load them on your visitors browsers. Another benefit is that a CDN usually has a huge network of servers that are closer to your potential visitor ensuring that your site will load quickly wherever in the world they are visiting.
It has its drawback as you have to change your DNS settings to one supplied by CloudFlare however the process is very simple and takes 5 minutes. If your site has google ads or third party content you should try the rocket optimiser - free on all plans. Please check your site works as normal with rocket optimizer as it is still in beta at the time of writing this post.

Results:
WebPageTest results: Load time 3.01, First byte 0.995, start render 2.120 Keep alive A, Compress Transfer A, Effective use of CDN - yes
YSlow results: Overall performance score 94 Grade A !
The page has a total of 28 components and a total weight of 225.4K bytes
Primed cache: HTTP Requests - 2, Total Weight - 16.7K
Google Page Speed results: overall PageSpeed Score of 88 (out of 100)

Images, CSS, HTML

First to optimise the images, css files, and the code, implement sprites, optimise fav icon, replace deprecated menu.

Results:
WebPageTest results: Load time 2.361, First byte 1.230, start render 1.594 Keep alive A, Compress Transfer A, Effective use of CDN - yes
YSlow results: Overall performance score 95 Grade A !
The page has a total of 20 components and a total weight of 217.4K bytes
Primed cache: HTTP Requests - 2, Total Weight - 16.4K
Google Page Speed results: overall PageSpeed Score of 88 (out of 100)

How much has the speed of the site improved

WebPageTest results:
Load time improvement from 5.546 to 2.361 seconds
Start render improvement from 3.675 to 1.230 seconds
YSlow results:
Grade improvement from Grade C & score 70 to Grade A & score 95
Improvement from 46 components and a total weight of 558.8K bytes to 20 components and a total weight of 217.4K bytes
Google Page Speed
Improvement from PageSpeed 54 to PageSpeed 88

Note: "Without adding additional hardware I have managed to lower the load speed considerably. To improve it even more I could add more RAM and additional CPU on the server and move the database to its own full web edition SQL server, however with a current speed load below 3 seconds I could not justify the costs in this case. Please let me know if you have any other suggestions or what is your experience with the speed of your DNN sites".



ASPHostPortal.com Proudly Announces DotNetNuke 7.3.4 Hosting

clock December 22, 2014 11:07 by author Dan

ASPHostPortal.com, The Best, Cheap and Recommended ASP.NET Hosting proudly announces DotNetNuke 7.3.4 Hosting with a combination of affordable price, fast & stable network and high customer satisfaction rate. ASPHostPortal.com provides full trust web hosting services for DotNetNuke 7.3.4 site.

DNN (formerly DotNetNuke) provides a suite of solutions for creating rich, rewarding online experiences for customers, partners and employees. DNN products and technology are the foundation for 750,000+ websites worldwide. In addition to commercial CMS and social community solutions, DNN is the steward of the DotNetNuke Open Source Project.

DNN Platform 7.3.4 has been released. The 7.3.4 release is a stabilization release. DNN 7.3.4 is a smaller maintenance release than normal and is focused on addressing the most serious platform issues. This version release to solve some issue, such as : fixed issue where site settings were not updating correctly in multi-language installations, fixed issue where partial site templates were not working correctly with child sites, fixed issue where links created in Telerik RadEditor were not correct and many others.

ASPHostPortal.com, a windows-based hosting service provider offers the most reliable and stable DotNetNuke 7.3.4 web hosting infrastructure on the net with great features, fast and secure servers. Customer’s site will be hosted in USA, Amsterdams or Singapore based server. All of our windows hosting plan supports DotNetNuke 7.3.4 and you can install DotNetNuke 7.3.4 with just one click. We offer professional DotNetnuke 7.3.4 site start from $5/month. The following are the reasons why you should choose and keep trust with us :

Uptime & Support Guarantees
We are so confident in Windows hosting services, we not only provide you with a 30 days money back guarantee, but also give 99.9% uptime guarantee.

Best and Friendly Support
Our support team is extremely fast and can help you with setting up and using DotNetNuke 7.3.4 on your account. Our customer support will help you 24 hours a day, 7 days a week and 365 days a year.

Dedicated Application Pool
Your site will be hosted using isolated application pool in order to meet maximum security standard and reliability.

ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET Hosting. With the DotNetNuke 7.3.4 in their hosting deal will make ASPHostPortal continue to be the Best ASP.NET hosting providers. To learn more about DotNetNuke 7.3.4 Hosting, please visit http://asphostportal.com/DotNetNuke-734-Hosting

About ASPHostPortal.com :

ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET Hosting. ASPHostPortal.com has ability to support the latest Microsoft and ASP.NET technology, such as: such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch. ASPHostPortal include shared hosting, reseller hosting, and sharepoint hosting, with speciality in ASP.NET, SQL Server, and architecting highly scalable solutions. ASPHostPortal.com strives to supply probably the most technologically advanced hosting solutions available to all consumers the world over. Protection, trustworthiness, and performance are on the core of hosting operations to make certain each and every website and/or software hosted is so secured and performs at the best possible level.



DotNetNuke Hosting with ASPHostPortal :: How To Creating a webservice in DotNetNuke 7

clock December 19, 2014 06:57 by author Mark

I have recently been assigned to built a DotNetNuke web service to allow a windows application (or any type of web client for that matter) the ability to manage DotNetNuke user accounts (create, change roles, delete, retrieve email address, etc.).
Since I had a hard time finding a correct code sample or documentation that actually applies to DotNetNuke 7 and accessing it without being previously logged in to DotNetNuke, it was difficult to built anything. I finally found out how to do it correctly so I tough I would put my efforts to some use and write a blog post explaining how to do it step by step.

The basics

That said, let's begin by the basics and just make a publicly accessible web service that allows anyone to ping the web service and get a pong back. For that we will use the new DotNetNuke 7 Services Framework which makes it quite simple if you know how to use it.
In order to make a web service that will work withing DotNetNuke 7, you will need to fire up Visual Studio and create a Class Library project (c# or VB but all examples here will be in c#).
That done, we will then reference some required DotNetNuke 7 required libraries (using the Add Reference dialog box), here's the list:

  • DotNetNuke.dll
  • DotNetNuke.Web.dll
  • System.Net.Http.dll
  • System.Net.Http.Formatting.dll
  • System.Web.Http.dll

Then we also need to reference the System.Web class from the .NET tab of the same dialog box.
Finally, we neet to set the output path of the project to the DotNetNuke bin directory and we are ready to code.
Here is the code, the explanations follow:

  • We simply start with some using statements for our requirements as shown above
  • We create a namespace for our service and whatever name we use here will be part of the url. I used MyService just for this example but use any name that makes sense for your service.
  • Now we create a public class for our controller. You can create multiple controllers if you need to and the controller is just a group of related actions that make sense to group together. In my real project I have a PingController for testing purposes, a UsersController for any actions that relate to user accounts etc. Just use a name that makes sense since it will also show up in the url. Two things to be careful here:
  • The name of your controller must end with the word Controller but only what comes before it will show in the url, so for PingController, only Ping will show in the url path.
  • It must inherit DnnApiController so it will use the DotNetNuke Services Framework.
  • Then we create the actual action, in our case, PublicPing. It is just a simple method which return an HttpResponseMessage and can have a few attributes. By default the new services framework will respond only to host users and you need to explicitly allow other access rights if needed, in this case the [AllowAnonymous] makes this method (or action if you prefer) available to anyone without credentials. The second attribute, [HttpGet] will make this action respond to HTTP GET verb, which is usually used when requesting some date from the web server.
  • Finally in that action, you insert whatever code you action needs to do, in this case just return the string "Pong!", just remember that you need to return an HttpResponseMessage and not a string or int or other object.

Ok so our controller and action is done, now we just need to map that to an actual URL and that what the last part of the previous code does. In essence this code tells DotNetNuke to map a certain url pattern to the methods defined in your class. You can use that code as is just replacing MyService by whatever your service name is.

Testing:

That's all there is to it, your service is ready!  To test it, first compile it, then just navigate to http://yourdomain/DesktopModules/MyService/API/Ping/PublicPing and you should see "Pong!" in your browser as a response.

Passing parameters

Ok, so the basic code above is working but it doesn't do anything useful. Lets add something more useful by creating an action that will give us the email address for a specific user id.
Again, here's the code and the explanations will follow (place the code inside the same namespace as the previous one)

  • First we build a UsersController class that will hold all actions related to user accounts, it is not absolutely necessary, you can have many actions in the same controller, however since this action is not at all related to our PingController, let'a make a new one more descriptive.
  • We then make a GetEmail action (method) that will accept a userid parameter. The [RequireHost] parameter here will make it accessible only to host users, we'll see later other authentication options.
  • The code in the method itself is pretty much self explanatory. The only interesting thing to note here is that because our class inherits DnnApiController, we already have a PortalSettings object available. That's the big advantage of making use of the DotNetNuke Services Framework. You will have a ModuleInfo object to represent your module (if there is one with the same name as your service, which is not necessary such in this case), a PortalSettings object that represents the portal at the domain name used to access the service (portal alias) and finally a UserInfo object representing the user that accessed the web service.

Testing:

If we now navigate to http://yourdomain/MyService/API/Users/GetEmail?userid=2 you should receive the email address back from the server unless of course that userid does not exist, make sure to test with a userid that actually exists for that portal. If you where not previously connected with a host account, then you will be asked for credentials.

Limiting access to certain roles

Ok, that works but you need to give host credentials to any person needing to use your webservice. To avoid that you can replace [RequireHost] by [DnnAuthorize(StaticRoles="Administrators")] which will limit access to administrators. Better but you still need to give them an admin account. So the easy way to give only limited access would be to create a new role in DotNetNuke just for your web service and replace Administrators by that specific role name in the authentication parameter.

Using HttpPost : (answer to a comment down bellow)

To answer Massod comment bellow, it is almost the same thing but you need to create an object to contain the posted data.
Let's make a simple ping that uses POST, first we need to create an object that will contain the posted data such as:

Then we create the service method something like this:

Note that normally, a post would only return ok and no message, I am just doing this so we can test here.

Now since this is a POST verb, we can't test it by only using url parameters, we need to make an html file with a form to test it out. It would be someting like this:

The important thing to not here is that you can't just create your POST method taking a string even if this is only what you need, you do need to create an object that will take your parameters.
Also don't forget that this is only for testing, you usually don't want to make this publicly available, you would normally use another parameter than [AllowAnonymous] such as  [DnnModuleAuthorize(AccessLevel = SecurityAccessLevel.View)] and [ValidateAntiForgeryToken] unless you really want that to be public.
Let me know if you have any more questions.



DotNetNuke Hosting with ASPHostPortal.com :: Integration of WSDL to DNN Modules

clock December 19, 2014 05:55 by author Ben

I had been functioning with DNN for a long time, Believed this weblog could help other DNN develops. There are two approaches to Contain WSDL files into a DNN module. Service Reference and Web Reference.
Right here I will discussing about Web References.

So to Contain them into DNN initial Correct Click On References within your Project Solution
References -> Add Service Reference -> Advanced(Left bottom Corner) -> Add Web Reference.

Paste your WSDL link towards the URL

Once you hit Add Reference button, Visual Studio will update the Web.config at the Module level.
But need to delete the Module Level Config files.
But Dont forget to take a backup of it, If anything goes wrong

And Set few parameters at Site level web.config file



Remember If you Creating DNN module package and your module uses any kind of SOAP services.
You ought to add parameters to Target Site’s Config file otherwise the site may not work.

Happy Coding



DotNetNuke Hosting with ASPHostPortal.com :: Security Actions to Safeguard Your DotNetNuke CMS

clock December 18, 2014 05:46 by author Ben

DNN Security Out Of the Box
DNN (DotNetNuke) is currently the premier CMS of the US Government as a result of it's robust security and integration with current safety functions. Nevertheless even DNN is not totally excellent out of the box, and there are numerous additional safety attributes that can be put in location depending on your particular DNN eCommerce requirements. These security suggestions variety from easy to complex and cover many various aspects of possible security risks. No guide can accurately assess your particular safety requirements. In the event you would prefer to adequately secure your DNN web site, contact Clarity these days.

Improve Password Complexity and Use Specifications

Increasing password complexity is among the easiest and most successful methods to significantly boost security. Probably the most common and successful requirements are length and complexity. eight or much more characters along with a minimum of a single capital letter, one lowercase letter and 1 number is a good begin. You are able to contemplate requiring a non-alphanumeric character as well as putting restrictions on how lengthy a password may be used. Even with powerful password needs, you might be only preventing against brute force attacks.

Modify 'Host' and 'Admin' Passwords and Limit Their Use

Altering the Host and Admin password to incredibly complicated passwords is the single most successful step for safety, as each accounts are recognized to exist and are the most vulnerable to brute force attacks as a result of that. Make sure that any password you set for these accounts exceeds the password recommendations listed above. You should also think about limiting access to these accounts, as they may be essentially the most powerful accounts and would leave your site essentially the most vulnerable if they have been compromised.

Hash Password Storage

By default DotNetNuke utilizes encryption of user passwords. This provides a good degree of protection, and enables you to retrieve your password as encryption is a reversible operation. Nonetheless, should you usually do not want to help password retrieval, or want to make certain maximum protection, you may select to utilize Hashing as an alternative. Hashing is really a non-reversible operation, so even if your database is accessed or stolen, a hacker can't reverse engineer your password.

 



ASPHostPortal.com Proudly Launches nopCommerce 3.50 Hosting

clock December 16, 2014 11:10 by author Dan

ASPHostPortal.com, The Best, Cheap and Recommended ASP.NET Hosting proudly Launch nopCommerce 3.50 Hosting at affordable price, instant activation, and fast & stable network. ASPHostPortal.com provides full trust web hosting services for your nopCommerce 3.50 site. Full service and fully accountable, we expertly manage your hosting.

nopCommerce is an open source ecommerce software that contains both a catalog frontend and an administration tool backend. nopCommerce is a fully customizable shopping cart. It's stable and highly usable. From downloads to documentation, nopCommerce.com offers a comprehensive base of information, resources, and support to the nopCommerce community. Now, nopCommerce has released the new version (nopCommerce 3.50).

nopCommerce 3.50 is much faster and easier to use, there is a slew of design as well as performance changes. nopCommerce 3.50 now support rental products, new tax rules for Europe Union from 2015, better warehouse and inventory control. In this version, nopCommerce allow a store owner to define custom address attributes and see all existing extensions and themes in admin area. And now specification attributes support several types like option, custom text, HTML text and hyperlink.

Why to Host Your nopCommerce 3.50 Site with ASPHostPortal.com

Uptime & Support Guarantees
We are so confident in Windows hosting services, we will not only provide you with a 30 days money back guarantee, but also give you a 99.9% uptime guarantee.

Dedicated Application Pool
With us, your site will be hosted using isolated application pool in order to meet maximum security standard and reliability.

Security
We employ best in breed firewalls and perimeter network protection.

ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET Hosting. With the nopCommerce 3.50 in their hosting deal will make ASPHostPortal continue to be the Best ASP.NET hosting providers. To learn more about nopCommerce 3.50 Hosting, please visit http://asphostportal.com/ nopCommerce-3-50-Hosting

About ASPHostPortal.com :
ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET Hosting. ASPHostPortal.com has ability to support the latest Microsoft and ASP.NET technology, such as: such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch. ASPHostPortal include shared hosting, reseller hosting, and sharepoint hosting, with speciality in ASP.NET, SQL Server, and architecting highly scalable solutions. ASPHostPortal.com strives to supply probably the most technologically advanced hosting solutions available to all consumers the world over. Protection, trustworthiness, and performance are on the core of hosting operations to make certain each and every website and/or software hosted is so secured and performs at the best possible level.



ASPHostPortal.com Proudly Launches ASP.NET 5 Hosting

clock December 10, 2014 05:36 by author Dan

ASPHostPortal.com, The Best, Cheap and Recommended ASP.NET Hosting proudly announced the availability of ASP.NET 5 Hosting in their hosting deals. ASPHostPortal offer ASP.NET 5 Hosting at affordable price, easy and instant setup, and best customer support.

Finally, the long awaited release of ASP.NET 5, ASPHostPortal are happy to announce the availability of the .NET Framework 5 for all our hosting packages. It is a highly compatible, in-place update to the .NET Framework 4, 4.5 and 4.5.2. ASP.NET 5 has been re-imagined from the ground up to provide a faster development experience, best in class performance, full side-by-side support.

ASP.NET 5 is clean and free of bugs and is a composable .NET stack for building modern web applications for both cloud and on-premises servers. ASP.NET 5, with the help of Visual Studio 2015, lets you create modern web applications. Modern web applications not only target all devices, including PCs, Macs, Tablets and smartphones, but also work with any browser or operating system.

ASP.NET 5 gives you greater flexibility by being able to run on three runtimes:

Full .NET CLR

The full .NET CLR is the default runtime for projects in Visual Studio. It provides the entire API set and is your best option for backwards compatibility.

Core CLR (cloud-optimized runtime)

The Core CLR is a lean and completely modular runtime for ASP.NET 5 projects. This CLR has been re-designed into components so you have the flexibility to include only those features that you need in your app. You add the components as NuGet packages. When you are finished, your app is dependent only on required features. By re-factoring the runtime into separate components, we can deliver improvements to the components more quickly because each component is updated on its own schedule. The Core CLR is about 11 megabytes instead of around 200 megabytes for the full .NET CLR. The Core CLR can be deployed with your app and different versions of the Core CLR can run side-by-side (both of these advantages are described in greater detail below).

Cross-Platform CLR

Microsoft will release a cross-platform runtime for Linux and Mac OS X. When released, this runtime will enable you to develop and run .NET apps on Mac and Linux devices. They will work closely with the Mono community on this effort. Until its release, you can use the Mono CLR for cross-platform development.

ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET Hosting. With the ASP.NET 5 in their hosting deal will make ASPHostPortal continue to be the Best ASP.NET hosting providers. To learn more about ASP.NET 5 Hosting, please visit http://asphostportal.com/ASPNET-5-Hosting.

About ASPHostPortal.com :

ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET Hosting. ASPHostPortal.com has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2012, .NET 4.5.2/ASP.NET 4.5.1, ASP.NET MVC 6.0/5.2, Silverlight 5 and Visual Studio Lightswitch. ASPHostPortal include shared hosting, reseller hosting, and sharepoint hosting, with speciality in ASP.NET, SQL Server, and architecting highly scalable solutions. ASPHostPortal.com strive to supply probably the most technologically advanced hosting solutions available to all consumers the world over. Protection, trustworthiness, and performance are on the core of hosting operations to make certain each and every website and/or software hosted is very secured and performs at the best possible level.



DotNetNuke 7.3 Hosting with ASPHostPortal.com :: Set Cache in DNN application/ site

clock December 9, 2014 07:44 by author Ben

How to set Cache in DNN application/ site

Today I will show you how to set cache in DNN application/site. It is very important to set cache timing for your applications. In DNN application/ site you can set cache in host setting page. To do that you need to login with the application/ site with host login and go to “Host Settings” page. Hit the “Advance Settings” tree and then click on “Performance Settings” link. Then you can find a dropdown where all the cache types are listed, name as below,

  • No Caching: 0
  • Light Caching: 1
  • Moderate Caching: 3
  • Heavy Caching: 6

I will mention later on about the number associated with the cache name, its importance  and where you need to choose a cache type, later in this tip.
This is the screenshot of the “Performance Settings” panel.

Below is the code I have picked from hostsetting.aspx file (admin\host\hostsettings.ascx).. To set the cache time of your site you need to set the value with the cache name which will render in the host settings page under performance settings panel.

<asp:dropdownlist runat="server" Width="150">
<asp:listitem resourcekey="NoCaching" value="0">No Caching</asp:listitem>
<asp:listitem resourcekey="LightCaching" value="1">Light Caching</asp:listitem>
<asp:listitem resourcekey="ModerateCaching" value="3">Moderate aching</asp:listitem>
<asp:listitem resourcekey="HeavyCaching" value="6">Heavy Caching</asp:listitem>
</asp:dropdownlist>

The value in dropdown ranges from 0 to 6. The code above takes the value set in the dropdown and multiplies it by 20 to determine the cache duration



DotNetNuke 7.3 Hosting - ASPHostPortal.com :: How to Navigate to Another Page from DotNetNuke Custom Module

clock December 8, 2014 07:43 by author Dan

Today, we will explain about Navigating to Another Page from DotNetNuke Custom Module. In a few circumstances, there is a prerequisite to add usefulness that permits clients to explore from one page then onto the next in Dotnetnuke Custom Module. For instance, in the event that you have a custom module called "Register" and the client has successfully registered, you may need to explore the client to an alternate page to view client login detail where an alternate custom module as of now been included request to view login client detail.

In Dotnetnuke module we require the Tab Id of the page so as to explore to an alternate page.So to attain this we can include a dropdown field in Edit page of our custom module(register) to demonstrate all the accessible Tab/ Page names of DNN site where client can choose the Page name to redirect which  inside keeps the Tab Id as quality. Then, we can utilize that Tab Id value as a part of request to explore to other page.

[Code in C#]

EditRegister.ascx

//Adding a Dropdown field in EditRegister.ascx page to allow admin or host to select the redirect page name
<asp:DropDownList ID="ddlTabNames" runat="server"></asp:DropDownList>

EditRegister.ascx.cs

//Adding available page names to the dropdown using object of TabController
if (Page.IsPostBack == false)
{
       DotNetNuke.Entities.Tabs.TabController objTabController = new DotNetNuke.Entities.Tabs.TabController();
 
        ArrayList arrlTabs = null;
        arrlTabs = objTabController.GetTabs(this.PortalId);

        string strKey = string.Empty;
        string strValue = string.Empty;

        ddlTabNames.Items.Clear();
 
       //Get the tabname and tabid of each tabs or page using object of TabInfo and added to dropdownlist field
        foreach (Entities.Tabs.TabInfo objTab in arrlTabs)
        {
            strKey = objTab.TabName;
            strValue = objTab.TabID.ToString();

            ddlTabNames.Items.Add(new ListItem(strKey, strValue));
        }
}

       //Using ModuleControler object we need to save selected Page TabId in module specific variable
        ModuleController objController = new ModuleController();
        objController.UpdateModuleSetting(this.ModuleId, "TabID", ddlTabNames.SelectedValue);

ViewRegister.ascx.cs

       Now From custom module view page we can redirect to another Page or Tab of DNN website using following code

       //Get the selected TabId
       int iProfileTabId = Convert.ToInt32(Settings["TabID"]);

       //Redirect to selected Page
        this.Response.Redirect(Globals.NavigateURL(iProfileTabId), true);



DotNetNuke 7.3 Hosting - ASPHostPortal.com :: How To Fixing PortalSettings issue on multilingual Websites in DNN 7.3.2

clock December 5, 2014 08:33 by author Ben

How To Fixing PortalSettings issue on multilingual Websites in DNN 7.3.2

Today I will share about How to fixing issue on multilingual website in DNN 7.3.2.
DNN 7.3.2 enhanced the stored procedure for saving Site Settings to add multilanguage support, unfortunately it missed to include proper handling of language specific settings within the business layer and some other aspects. As effect, DNN 7.3.2 fails to load site settings for multilingual sites and renders an error message.
I created a full solution to add localization support for website settings, which is scheduled to be included with DNN 7.4.0, meanwhile you may run the script below from Host > SQL, in order to fix this issue.

"NOTE: DO NOT APPLY TO DNN 7.4.0 OR LATER"

This fix is also included in TurboDNN 0.9.3 ff. - the solution to improve database performance of DNN, which might be downloaded for free from here. (Please take the time to read instructions enclosed.)

-- ensure, last modified is not Null (should not exist)
UPDATE {databaseOwner}[{objectQualifier}PortalSettings]
 SET   LastModifiedOnDate = '2000-01-01'
 WHERE LastModifiedOnDate is Null
GO
IF OBJECT_ID(N'{databaseOwner}[{objectQualifier}GetPortalSetting]', N'P') IS NOT NULL
    DROP PROCEDURE {databaseOwner}[{objectQualifier}GetPortalSetting]
GO
CREATE PROCEDURE {databaseOwner}[{objectQualifier}GetPortalSetting]
    @PortalID    Int,     -- Not Null
    @SettingName nVarChar(50), -- Not Null
    @CultureCode nVarChar(50) -- not Null
AS
BEGIN
 SELECT TOP (1)
 SettingName,
 CASE WHEN Lower(SettingValue) Like 'fileid=%'
 THEN {databaseOwner}[{objectQualifier}FilePath](SettingValue)
 ELSE SettingValue
 END   AS SettingValue,
 CreatedByUserID,
 CreatedOnDate,
 LastModifiedByUserID,
 LastModifiedOnDate,
 CultureCode
 FROM  {databaseOwner}[{objectQualifier}PortalSettings]
 WHERE PortalID    = @PortalID
   AND SettingName = @SettingName
 ORDER BY LastModifiedOnDate DESC
END
GO
IF OBJECT_ID(N'{databaseOwner}[{objectQualifier}GetPortalSettings]', N'P') IS NOT NULL
    DROP PROCEDURE {databaseOwner}[{objectQualifier}GetPortalSettings]
GO
CREATE PROCEDURE {databaseOwner}[{objectQualifier}GetPortalSettings]
    @PortalId    Int,            -- not Null!
    @CultureCode nVarChar(20)    -- not Null!
AS
BEGIN
 SELECT
 SettingName,
 CASE WHEN Lower(SettingValue) Like 'fileid=%'
 THEN {databaseOwner}[{objectQualifier}FilePath](SettingValue)
 ELSE SettingValue
 END   AS SettingValue,
 CreatedByUserID,
 CreatedOnDate,
 LastModifiedByUserID,
 LastModifiedOnDate,
 CultureCode
 FROM  {databaseOwner}[{objectQualifier}PortalSettings] P
 JOIN  (SELECT PortalID, SettingName SN, Max(LastModifiedOnDate) MD
        FROM {databaseOwner}[{objectQualifier}PortalSettings]
 WHERE PortalID = @PortalId
 GROUP BY PortalID, SettingName) S
   ON P.PortalID = S.PortalID AND P.SettingName = S.SN AND P.LastModifiedOnDate = S.MD;
END
GO

UPDATE: this fix has been included with DNN 7.3.4, you shouldn't need it, if you upgraded to 7.3.4 and don't apply it to DNN 7.4.0 or later.



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