DotNetNuke Hosting with ASPHostPortal.com

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

DotNetNuke Hosting - ASPHostPortal.com :: How To Improvement Performance in DNN

clock Desember 22, 2016 04:46 by author Armend

I have been seeing a big number of concerns not too long ago with regards to DotNetNuke functionality and items that will be done to help improve the overall performance in the internet site. Usually these questions surround the SiteLog and EventLog tables so I thought I'd post a number of simple queries which you can run to assist hold your database lean that will preserve your DotNetNuke website running at peak efficiency.

Website Log

I'll start off using the Internet site Log table, the website log functionality isn't a single that I truly utilize in my site, nonetheless for all those of you who use it in yours you are going to need to hold an eye on it, I have noticed that right after the log has grown to more than about 4-5 thousand records that you could begin to notice some efficiency decreases. Furthermore if you're like myself and have turned off the internet site log I found out that it will not necessarily clean itself up in case you turned it off, therefore in my case I had 1000 lingering records, which just unnecessarily improved the size of my database.

To check the amount of records within your Site Log use the following query

SELECT Count(*)
FROM SiteLog

To find the oldest record in the site log use the following

SELECT MIN([DateTime])
FROM SiteLog

Soon after you've viewed this details you can establish your necessary course of action. In my case since the internet site log is disabled on all portals I simply deleted all records in the table employing a basic delete statement. Within your case you could only want to purge certain records but that determination is outdoors the scope of this short article.

Event Log

The Occasion log shops portal certain event details like logins, invalid login attempts and actual errors. If you have a pretty active portal this table can grow very big really quickly. For my sites with their visitors of about 100-120 guests per day I have noticed an EventLog of over 2000 records within a two.five month period. Now unless you happen to be auditing logins or undertaking particular tracking you are able to normally rid yourself of those records without much impact. You'll be able to purge these portal by portal via the "Event Viewer" inside DotNetNuke, or it is possible to view and modify records by way of the database. Beneath I'll give you two valuable queries.

To determine the number of records, as well as the quantity of records per portal. Note, inside the benefits in the per portal query, you are going to discover a lot of entries listed having a NULL portal id, that is for DNN installation wide things, like scheduler and application events.

--Overall total
SELECT COUNT(*)
FROM EventLog

--Total by portal (null is not portal specific)
SELECT LogPortalId, COUNT(*)
FROM EventLog
GROUP BY logPortalId

To identify the oldest records you can use one of the following queries, again an overall minimum and a per portal minimum will be found

SELECT MIN(LogCreateDate)
FROM EventLog

SELECT LogPortalId, MIN(LogCreateDate)
FROM EventLog
GROUP BY logPortalId

Once again for deleting these records the decision truly depends upon your portals use on the Occasion Log and any require for user login auditing. In my case I once again don't require this details and at present I've resolved all of my routine errors that had been taking place, for that reason I removed all records in my listing across all sites. I try to complete this at the very least as soon as as month to ensure that the table size has been decreased.

Viewing DB Size

If you would like to view the size of one's database files you are able to make use of the query below to view the size of every single file for the present database.

SELECT *
from SYSFILES

Making use of these ideas you'll be able to start to acquire a better understanding of the database size and you can assist handle it and preserve your DotNetNuke website running at peak efficiency!

Best DotNetNuke Hosting Recommendation

ASPHostPortal.com
ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers DotNetNuke hosting starts from $5/month only. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable DotNetNuke Hosting, we should be your best choice.



ASPHostPortal.com Announces Umbraco 7.5.6 Hosting Solution

clock Desember 20, 2016 10:38 by author Dan

ASPHostPortal.com is trusted Windows ASP.NET hosting provider since 2008. They strongly believe in high quality standards and Hence, people will always find their services better than every other host in this industry. They understand the value of time and hence their ordering process is very simple. Now, they offer reliable Umbraco 7.5.6 hosting with good speed and uptime.

Umbraco is easy to learn and use, making it perfect for web designers, developers and content creators alike. People can be up and running in just a few minutes with their simple installer. Either apply one of the included starter kits or seamlessly integrate any designs.

With simple and customisable editing and content creation tools, it's easy to manage and maintain any websites exactly how people want it. Umbraco doesn't dictate how people should work - that should be up to them, not their content management system. Editors have as little or as much freedom as they need. And if you don't like the changes you've made? Simply roll back to a previous version. It's that easy!

ASPHostPortal.com is set up with an aim to serve customers in an excellent manner by providing them quality service. They offer Umbraco 7.5.6 hosting with affordable price, a lot of features, 99.99% uptime guarantee, 24/7 support, and 30 days money back guarantee. Therefore, their focus is always aimed at making sure customers are constantly able to achieve optimal performance and usability with all of the services that they offer. To learn more about their Umbraco 7.5.6 Hosting, please visit http://asphostportal.com/Umbraco-7-Hosting

About ASPHostPortal.com:

ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET & Linux Hosting. ASPHostPortal.com has ability to support the latest Microsoft, ASP.NET, and Linux technology, such as: such as: WebMatrix, Web Deploy, Visual Studio, Latest ASP.NET Version, Latest ASP.NET MVC Version, Silverlight and Visual Studio Light Switch, Latest MySql version, Latest PHPMyAdmin, Support PHP, etc. Their service includes shared hosting, reseller hosting, and Sharepoint hosting, with speciality in ASP.NET, SQL Server, and Linux solutions. Protection, trustworthiness, and performance are at the core of hosting operations to make certain every website and software hosted is so secured and performs at the best possible level.



DotNetNuke Hosting - ASPHostPortal.com :: Tips To Integrate DNN with SharePoint 2013

clock Desember 15, 2016 05:25 by author Armend

DotNetNuke has already established itself as 1 from the most well-liked too as preferred net content management systems, primarily based on Microsoft. Net. DotNetNuke web sites are identified to provide outstanding user knowledge while also letting the brands enhance their identity. The current trend is the fact that of integrating this content material management system with that of Microsoft SharePoint, of which the newest version has not too long ago come out within the form of SharePoint 2013.


The integration is really valuable for the companies inside a number of methods. Right here is really a short overview of how the integration of DotNetNuke with SharePoint can be executed with accomplishment.

Powerful Document Management with SharePoint

SharePoint is undoubtedly probably the most preferred at the same time as even sought- after program for document management, helpful for businesses of varying size or nature. Now, this platform is constructed into cloud, which allows maximum storage and accessibility. Consequently, the experts in a group have an chance to share as well as collaborate on apparently massive amounts of data and documents. Moreover, the platform integrates efficiently with Outlook and this enables enhancement in the significance on the social tools. All this results in a very carefully organized atmosphere. The group members can also convert the raw data into critical interactive reports.

Integration of DotNetNuke with SharePoint

The top thing about integrating the web content management method together with the net application improvement platform is the fact that the two of them integrates quite seamlessly. An automatic integration implies that no additional efforts are essential when it comes to operating the method. The DNN Neighborhood can merge together with the platform inside a rather hassle- totally free manner by indicates of using the custom modules. The primary thought, here, is always to design and style a method that enables the platform to communicate from behind a firewall with all the folks facing the website. Now, all this implies that the documents could be pushed in to the portal around the DotNetNuke website with larger degree of safety and efficiency. Simultaneously, the filter rules can be made to track down the individual documents to discover as to exactly where they go.

DNN Enterprise and SharePoint Connector

In situations where the platform is utilized as the document management program, integration of the identical with DotNetNuke Enterprise Edition is really of real rewards. The custom integration saves a lot of income in the enterprise while investment that is produced is actually worthy.

The DNN Enterprise SharePoint connector comes up as a powerful and considerable function, supporting each 2007 and 2010 versions of the platform. The firewall problems can be avoided at the same time. Content, around the other hand, stays fresh and is published directly from the SharePoint Document Library. It is the DotNetNuke role- based security network that performs the crucial function of safeguarding the published documents.

Generating Use on the SharePoint Folder Provider

The SharePoint Folder is particularly beneficial in integration with DotNetNuke 6. It enables the DNN customers to store at the same time as synchronize the files contained inside the document libraries, located in 2010 version of this platform.

Here is an overview on the characteristics of this Folder as well as the way it aids:

The communication amongst the net application improvement platform and the DotNetNuke six becomes more rapidly and more direct by virtue from the folder. It paves the way for a number of providers to indicate to different document libraries from either the equivalent platform based internet sites or in the various ones.

The SharePoint Folder facilitates quite a few functionalities such as addition cum deleting of folders, uploading, downloading, renaming of files as well as synchronization of the files and folders. Above all, this Folder really acts as a powerful base for numerous DNN modules, which make use on the DotNetNuke file technique. Custom SharePoint development teams can help you build projects within allocated budgets and time schedules.

Best DotNetNuke Hosting Recommendation

ASPHostPortal.com is the leading provider of Windows hosting and affordable DotNetNuke Hosting. DotNetNuke Hosting from ASPHostPortal.com provides a safe, reliable and performance-driven foundation for your DotNetNuke website. DotNetNuke is the perfect Content Management System for managing and developing your website with one of ASPHostPortal’s Hosting plans. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, 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 guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability.



DotNetNuke Hosting - ASPHostPortal.com :: Easy steps to view error log exceptions in DotNetNuke

clock Desember 13, 2016 11:03 by author Dan

In this tutorial, you will learn how to view error log exceptions in DNN. You will also able to specify which log exceptions you want to record or ignore.

To view the error logs, you will need to have administrator portal access. Once you have login on the website, please go to the admin menu and you will see there is a menu called Event Viewer.

By default, all the error or event logs will be displayed on the site, you have an option to narrow the result list by specifying the log type by selecting one of the option in the dropdownlist.

How to turn off the event logs in DNN?

To turn off specific event logs in DNN is pretty simple, if you scroll further down, you will be able to see there is a button called Edit Log Settings.


To enable or disable the event log, click the pencil edit icon. This will load another window popup and there is a tickbox for you to untick it if you want to disable the event log.

Best DotNetNuke Hosting Recommendation

ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers DotNetNuke hosting starts from $5/month only. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable DotNetNuke Hosting, we should be your best choice.



ASPHostPortal.com Announces Visual Studio 2017 Hosting Solution

clock Desember 13, 2016 07:22 by author Dan

Established in 2008, ASPHostPortal.com is one of the leading ASP.NET hosting provider offering high quality Visual Studio 2017 Hosting service with premium support. We are using SSD's for storage, which provides much higher performance in terms of I/O and data transfer speed. Every server is equipped with at least 2x Intel Xeon Quad-Core processors and massive amounts of memory. Now, we offer reliable Visual Studio 2017 hosting with uptime guarantee.

Enhancements to code navigation, IntelliSense, refactoring, code fixes, and debugging, saves people time and effort on everyday tasks regardless of language or platform. For teams embracing develops, Visual Studio 2017 streamlines any inner loop and speeds up the code flow with the brand new real time features such as live unit testing and real-time architectural dependency validation.

Visual Studio 2017 is a renewed focus to enhance the efficiency of the fundamental tasks people encounter on a daily basis. From a brand-new lightweight and modular installation tailored to any needs, a faster IDE from startup to shut down, to a new way to view, edit, and debug any code without projects and solutions. Visual Studio 2017 helps people stay focused on the big picture.

ASPHostPortal.com is set up with an aim to serve customers in an excellent manner by providing them quality service. We offer Visual Studio 2017 hosting with affordable price, a lot of features, 99.99% uptime guarantee, 24/7 support, and 30 days money back guarantee. Therefore, our focus is always aimed at making sure customers are constantly able to achieve optimal performance and usability with all of the services that we offer. To learn more about their Visual Studio 2017 Hosting, please visit http://asphostportal.com/Visual-Studio-2017-Hosting

About ASPHostPortal.com:
ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET & Linux Hosting. ASPHostPortal.com has ability to support the latest Microsoft, ASP.NET, and Linux technology, such as: such as: WebMatrix, Web Deploy, Visual Studio, Latest ASP.NET Version, Latest ASP.NET MVC Version, Silverlight and Visual Studio Light Switch, Latest MySql version, Latest PHPMyAdmin, Support PHP, etc. Their service includes shared hosting, reseller hosting, and Sharepoint hosting, with speciality in ASP.NET, SQL Server, and Linux solutions. Protection, trustworthiness, and performance are at the core of hosting operations to make certain every website and software hosted is so secured and performs at the best possible level.



DotNetNuke Hosting - ASPHostPortal.com :: Tips To Remove .aspx from DNN

clock Desember 8, 2016 05:05 by author Armend

In this post I will expains how to remove .aspx from DotNetNuke URL, Lets check it out. DotNetNuke ships with a URL supplier that throughout the years has experienced a few overhauls by they way it can deal with URLs

 

Unique Method – Default.aspx?TabId=52

Second Version –/Home/TabId/52/Default.aspx

Human Friendly (Current Default) –/Home.aspx

The new human cordial is extraordinary yet obliges that the client attach the .aspx to the end of the page names.

Contextual analysis

Lets say you have a business card or advancement and you need to promote a particular page on your site that individuals could really sort in

"www.domain.com/promo"

Regularly what you would do is FTP into your DotNetNuke root index, make an organizer called promo and afterward make a default.htm page to divert to www.domain.com/promo.aspx

Reworking the URL

With IIS7 and Url Rewriting you can now add a few lines to your web.config record and handle urls without the .ASPX augmentation. The following is a sample of such a modify principle and you will put this within your hub.

<rewrite>
    <rules>
        <rule name="sanitize aspx">
          <match url="(^.*)" />
          <conditions logicalGrouping="MatchAll">
            <add negate="true" input="{REQUEST_FILENAME}" matchType="IsFile" />
            <add negate="true" input="{REQUEST_FILENAME}" matchType="IsDirectory" />
            <add input="{URL}" pattern="(.*).(.*)" negate="true" />
          </conditions>
          <action url="{R:1}.aspx" type="Rewrite" />
        </rule>
    </rules>
</rewrite>


This code lives up to expectations by first verifying that a document or index with the/promo does not as of now exist. On the off chance that it does then the physical record will overshadow the change guideline. Second it will then take the area url and add the .aspx to the end on the off chance that it doesn't exist. So when you write in/promo in the background it is serving up the page/promo.aspx. This is carried out without diverting or changing the url.

Presently all your URLs in DotNetNuke can be straightforward and considerably all the more beautiful.

Here is an option form in the event that you need to do 301 sidetracks to the page name versus revamping the url.

<rewrite>
    <rules>
        <rule name="sanitize aspx" stopProcessing="true">
          <match url="(^.*)" />
          <conditions logicalGrouping="MatchAll">
            <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="Redirect" url="{R:1}.aspx" redirectType="Permanent" />
        </rule>
    </rules>
</rewrite>

Best DotNetNuke Hosting Recommendation

ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers DotNetNuke hosting starts from $5/month only. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable DotNetNuke Hosting, we should be your best choice.



ASPHostPortal.com Announces Drupal 8.2.3 Hosting Solution

clock Desember 6, 2016 12:16 by author Dan

ASPHostPortal.com has served people since 2008 and we know how to deliver powerful, fast and reliable Drupal 8.2.3 hosting with the superior customer support. We strive to make sure that people, the customer, have the finest web-hosting experience as possible. Our commitment to excellence in customer support and system performance is truly what sets us apart from the competition. Now, we offer reliable Drupal 8.2.3 hosting with money back guarantee.

Drupal 8 is the latest, greatest release of the world's most widely used enterprise web CMS. It's fast. Flexible.  Drupal 8 taps into the concentrated innovation from its open source community. People can drive value and streamline your work with new capabilities for successful digital experiences.

Drupal 8 has something for everyone who supports online content and digital experience at any organization: business decision makers, site administrators, digital marketers, content managers, web developers, technical architects, and IT pros. Drupal 8's core platform has more than 200 new features built in. But it's more than a collection of features; Drupal 8 is a platform you can use to achieve digital success.

ASPHostPortal.com is set up with an aim to serve customers in an excellent manner by providing us quality service. We offer Drupal 8.2.3 hosting with affordable price, a lot of features, 99.99% uptime guarantee, 24/7 support, and 30 days money back guarantee. Therefore, our focus is always aimed at making sure customers are constantly able to achieve optimal performance and usability with all of the services that we offer. To learn more about our Drupal 8.2.3 Hosting, please visit http://asphostportal.com/Drupal-8-2-3-Hosting.aspx

About ASPHostPortal.com:
ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET & Linux Hosting. ASPHostPortal.com has ability to support the latest Microsoft, ASP.NET, and Linux technology, such as: such as: WebMatrix, Web Deploy, Visual Studio, Latest ASP.NET Version, Latest ASP.NET MVC Version, Silverlight and Visual Studio Light Switch, Latest MySql version, Latest PHPMyAdmin, Support PHP, etc. Their service includes shared hosting, reseller hosting, and Sharepoint hosting, with speciality in ASP.NET, SQL Server, and Linux solutions. Protection, trustworthiness, and performance are at the core of hosting operations to make certain every website and software hosted is so secured and performs at the best possible level.



DotNetNuke Hosting - ASPHostPortal.com :: How To Build Webservice in DNN

clock Desember 1, 2016 07:32 by author Armend

I have recently been assigned to built a DotNetNuke web service to permit a windows application (or any sort of net client for instance) the flexibility to control DotNetNuke person accounts (create, change roles, delete, retrieve e mail address, and so forth.).


Since I had a tough time locating an accurate code sample or documentation that really applies to DotNetNuke  and accessing it without having being earlier logged in to DotNetNuke, it absolutely was difficult to constructed anything at all. I ultimately found out how to do it properly so I hard I would put my attempts to some use and write a blog publish explaining how you can get it done step by stage.


That said, let's begin by the fundamentals and just create a publicly available web services that permits anybody to ping the net service and acquire a pong again. For that we are going to use the new DotNetNuke 7 Providers Framework which makes it fairly simple should you know how to utilize it.

In order to create a net support that will work within DotNetNuke 7, you will need to fireplace up Visual Studio and create a class Library project (c# or VB but all illustrations listed here will be in c#).

That done, we will then reference some needed DotNetNuke 7 required libraries (making use of 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:

using System.Net;
using System.Net.Http;
using System.Web.Http;
using DotNetNuke.Web.Api;
 
namespace MyService
{
    public class PingController : DnnApiController
    {
        [AllowAnonymous]
        [HttpGet]
        public HttpResponseMessage PublicPing()
        {
            return Request.CreateResponse(HttpStatusCode.OK, "Pong!");
        }
    }
    public class RouteMapper : IServiceRouteMapper
    {
        public void RegisterRoutes(IMapRoute mapRouteManager)
        {
            mapRouteManager.MapHttpRoute("MyService", "default", "{controller}/{action}", new[]{"MyService"});
        }
    }
}

  1. We merely start with some using statements for our needs as demonstrated previously mentioned
  2. We develop a namespace for our service and no matter what name we use listed here will be part of the url. I utilized MyService just for this instance but use any name which makes perception for your services.
  3. Now we create a public class for our controller. You'll be able to create numerous controllers if you want to and the controller is just a bunch of related actions that make feeling to group with each other. In my genuine project I have a PingController for testing functions, a UsersController for almost any steps that relate to user accounts and so forth. Just utilize a identify that makes feeling because it will even present up in the url. Two things for being careful right here:

    • The identify of one's controller should end using the term Controller but only what will come just before it will show inside the url, so for PingController, only Ping will show in the url route.
    • It should inherit DnnApiController so it'll use the DotNetNuke Providers Framework.
  4. Then we create the actual motion, inside our case, PublicPing. It's just a straightforward technique which return an HttpResponseMessage and may have a handful of characteristics. By default the brand new providers framework will respond only to host consumers and you also must explicitly enable other access rights if necessary, in this case the [AllowAnonymous] helps make this technique (or action if you prefer) obtainable to anyone with out credentials. The next attribute, [HttpGet] can make this action reply to HTTP GET verb, which can be usually used when requesting some date in the web server.
  5. 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 should return an HttpResponseMessage rather than a string or int or other item.

Ok so our controller and motion is done, now we just need to map that to an actual URL and that exactly what the final portion of the earlier code does. In essence this code tells DotNetNuke to map a specific url pattern for the techniques outlined in your course. You can use that code as is simply replacing MyService by no matter what your support title is.

Testing:

That is all there is certainly to it, your services is prepared! To test it, first compile it, then just navigate to http://yourdomain/DesktopModules/MyService/API/Ping/PublicPing and you should see "Pong!" inside your browser like 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):

public class UsersController : DnnApiController
    {
        [RequireHost]
        [HttpGet]
        public HttpResponseMessage GetEmail(int userid)
        {
            DotNetNuke.Entities.Users.UserInfo ui;
            ui = DotNetNuke.Entities.Users.UserController.GetUserById(PortalSettings.PortalId, userid);
            return Request.CreateResponse(HttpStatusCode.OK, ui.Email);
        }
    }

Initial we build a UsersController course which will hold all actions related to person accounts, it isn't completely required, you'll be able to have numerous steps within the same controller, nonetheless because this motion is not in any respect connected to our PingController, let'a create a new one more descriptive.

We then create a GetEmail motion (method) which will accept a userid parameter. The [RequireHost] parameter listed here will make it accessible only to host customers, we are going to see afterwards other authentication options.

The code inside the approach alone is fairly significantly self explanatory. The only interesting factor to notice listed here is the fact that because our course inherits DnnApiController, we already have a PortalSettings item obtainable. That is the big benefit of producing use of the DotNetNuke Solutions Framework. You'll have a ModuleInfo object to represent your module (if there is 1 using the identical identify as your support, which can be not essential such on this scenario), a PortalSettings object that signifies the portal at the domain title utilized to accessibility the support (portal alias) and at last a UserInfo item symbolizing the person that accessed the web services.

Testing:

If we now navigate to http://yourdomain/MyService/API/Users/GetEmail?userid=2 you need to receive the email tackle back again from the server unless of course obviously that userid does not exist, ensure that you check having a userid that truly exists for that portal. Should you exactly where not formerly linked having a host account, you then will probably be requested for qualifications.

Limiting access to particular roles

Alright, that actually works however, you need to give host qualifications to anyone needing to make use of your webservice. To avoid which you can change [RequireHost] by [DnnAuthorize(StaticRoles="Administrators")] which can limit access to administrators. Much better however, you nevertheless must provide them with an admin account. So the easy method to give only constrained entry would be to create a brand new role in DotNetNuke only for your internet services and substitute Administrators by that specific function title within the authentication parameter.

Utilizing HttpPost : (reply to a comment down bellow)

To answer Massod comment bellow, it's nearly exactly the same thing however, you have to develop an object to contain the posted information.
Let's make a easy ping that makes use of Submit, very first we need to create an object which will contain the posted info this sort of as:

public class FormMessage
    {
        public string Message { get; set; }
    }

Then we create the service method something like this:

public class PingController : DnnApiController
   {
       [AllowAnonymous]
       [HttpPost]
       public HttpResponseMessage PostPing(FormMessage formMessage)
       {
           return Request.CreateResponse(HttpStatusCode.OK, "Pong from POST: message was '" + formMessage.Message + "'.");
       }
   }

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:

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Untitled Pagetitle>
head>
<body>
    <form action="http://dnndev/DesktopModules/MyService/API/Ping/PostPing" method="POST">
        <label for="message">Message: label><input type="text" name="Message"/>
        <input type="submit" value="Submit"/>
    form>
body>
html>

The crucial thing to not right here is you can not just develop your Publish technique taking a string even when this can be only what you require, you do must create an object which will get your parameters.

Also never overlook that this is only for tests, you usually do not need to make this publicly accessible, you'd probably usually use yet another parameter than [AllowAnonymous] such as [DnnModuleAuthorize(AccessLevel = SecurityAccessLevel.View)] and [ValidateAntiForgeryToken] unless you truly want that for being public.

Best Recommended DotNetNuke Hosting

ASPHostPortal.com is the leading provider of Windows hosting and affordable DotNetNuke Hosting. DotNetNuke Hosting from ASPHostPortal.com provides a safe, reliable and performance-driven foundation for your DotNetNuke website. DotNetNuke is the perfect Content Management System for managing and developing your website with one of ASPHostPortal’s Hosting plans. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, 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 guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability.



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