Forum


HomeHomePremiumPremiumDevelopmentDevelopmentError calling web serviceError calling web service
Previous
 
Next
New Post
10/10/2017 7:21 AM
 

Hi,

I've just moved a DNN 8 site from my local machine to a hosts server.

There are a few issues, one is that the jQuery/Ajax call to a web service fails.

In case it helps, I've included a snippet of code below and commented the error option which is executed.

The error message isn't very useful: '[object Object] error Not Found'. I assume this means the web service is not 'seen' by the client.

This code has been working both locally and on a hosted server for several years. I can only imagine there's an issue on the server which I don't have full access to.

Anyone got any ideas as to what I could check? Is there some option in the DNN settings that needs to be set for example? I don't remember one to be honest.

Best Regards,

Steve

        

        $.ajax({

            type: "POST",

            url: loc,

            beforeSend: dnItemSf.setModuleHeaders,

            data: ContentMainSettingsContainerStringified,

            contentType: "application/json; charset=utf-8",

            dataType: "json",

            success: function (ContentMainSettingsContainer) {

                if (ContentMainSettingsContainer) {

                    //Update the form

                    var IsRefresh = true;

                    UpdateContentMainSettingsForm(Container, ContentMainSettingsContainer, IsRefresh);

                }

                else {

                    alert("File:ContentMainSettingsUserControl.js\nfunction: RefreshContentSettingsMain\nAn error occured - unsuccessful web service call");

                }

            },

            error: function (XMLHttpRequest, textStatus, errorThrown) {

                 //** THIS IS THE LINE THAT PICKS UP THE ERROR

                alert("File:ContentMainSettingsUserControl.js\nFunction: RefreshContentSettingsMain\nMessage:" + XMLHttpRequest + " " + textStatus + " " + errorThrown);

            }

        });


 
New Post
10/10/2017 11:07 AM
 
Hi,

One little discovery I made is that in the console in Chrome the following error is given:

ERROR 1
=======
777?popUp=true:10805 Uncaught TypeError: $(...).dnnPanels is not a function
    at dnnEditBasicSettings (777?popUp=true:10805)
    at HTMLDocument.<anonymous> (777?popUp=true:10811)
    at fire (jquery.js?cdv=40:1037)
    at Object.fireWith [as resolveWith] (jquery.js?cdv=40:1148)
    at Function.ready (jquery.js?cdv=40:433)
    at HTMLDocument.completed (jquery.js?cdv=40:103)
dnnEditBasicSettings @ 777?popUp=true:10805
(anonymous) @ 777?popUp=true:10811
fire @ jquery.js?cdv=40:1037
fireWith @ jquery.js?cdv=40:1148
ready @ jquery.js?cdv=40:433
completed @ jquery.js?cdv=40:103


ERROR 2
=======
jquery.js?cdv=40:8526 POST http://flexicontent.co.uk.dnn4less.net/DesktopModules/FlexiContent/API/Content/GetContentSettings 404 (Not Found)

No idea what ERROR1 means. I have tried using the following URL in the browser which does indeed give a 404 error:
http://flexicontent.co.uk.dnn4less.net/DesktopModules/FlexiContent/API/Content/GetContentSettings


But the equivalent string in another similar site displays the following:

<Error>
<Message>
The requested resource does not support http method 'GET'.
</Message>
</Error>

So if the url to the web service gives a 404 error, could it be a permissioning issue? If so, does anyone know how to provide the correct permissions, I will have to instruct the hosting provider to do that though.

 

Best Regards,


Steve

 

 
New Post
10/10/2017 3:11 PM
 

Steve,

Are there any errors in the logs in /Portals/_default/Logs when you hit the page that causes the error?

 
New Post
10/10/2017 10:00 PM
 

 

Hi Steve

 

I would think there is something  wrong with the URL you are using to get the 404 not found response.

 

Richard

 
New Post
10/11/2017 4:20 AM
 

Hi Scott,

Thank you for your reply.

I've checked the log files. No errors are written when I open my app, nor are any entries written when I try to access the url for the web service directly from the browser.

But there is an error listed caused by accessing any page, please see a sample listing below.

I've also included a list of 'OTHER ERRORS', please see below. But these haven't occured since yesterday, not long after the site was installed and I'm unable to reproduce them now.

The DNN version is 08.00.04 (226) by the way.  Also I noticed the hosted site is using .Net Framework 4.5, but that my local machine the site is using 4.6.
I can't imagine this would cause an issue though, since both are supported according to:
https://github.com/dnnsoftware/Docs/blob/master/main/DNN8-Requirements.rst

Best Regards,

Steve

******************************
Error when accessing any page
*****************************

2017-10-11 08:35:10,407 [dnn4less01][Thread:135][FATAL] DotNetNuke.Web.Common.Internal.DotNetNukeHttpApplication - System.Web.HttpException (0x80004005): The file '/DnnImageHandler.ashx' does not exist.
   at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate)
   at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
   at System.Web.UI.SimpleHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path)
   at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

*************************************************************************
OTHER ERRORS
This error is in the log file but I have been unable to reproduce them, 
so not sure when they occur. These haven't occured since yesterday.
*************************************************************************

2017-10-11 08:19:28,465 [dnn4less01][Thread:1][ERROR] DotNetNuke.ComponentModel.ProviderInstaller - System.Configuration.ConfigurationErrorsException: Could not load provider WatchersNET.CKEditor.CKHtmlEditorProvider, WatchersNET.CKEditor
2017-10-11 08:19:28,465 [dnn4less01][Thread:1][ERROR] DotNetNuke.ComponentModel.ProviderInstaller - System.Configuration.ConfigurationErrorsException: Could not load provider DotNetNuke.NavigationControl.DNNMenuNavigationProvider, DotNetNuke.DNNMenuNavigationProvider
2017-10-11 08:19:28,465 [dnn4less01][Thread:1][ERROR] DotNetNuke.ComponentModel.ProviderInstaller - System.Configuration.ConfigurationErrorsException: Could not load provider DotNetNuke.NavigationControl.SolpartMenuNavigationProvider, DotNetNuke.SolpartMenuNavigationProvider
2017-10-11 08:19:28,480 [dnn4less01][Thread:1][ERROR] DotNetNuke.ComponentModel.ProviderInstaller - System.Configuration.ConfigurationErrorsException: Could not load provider DotNetNuke.NavigationControl.DNNDropDownNavigationProvider, DotNetNuke.DNNDropDownNavigationProvider
2017-10-11 08:19:28,480 [dnn4less01][Thread:1][ERROR] DotNetNuke.ComponentModel.ProviderInstaller - System.Configuration.ConfigurationErrorsException: Could not load provider DotNetNuke.NavigationControl.DNNTreeNavigationProvider, DotNetNuke.DNNTreeNavigationProvider
2017-10-11 08:19:28,480 [dnn4less01][Thread:1][ERROR] DotNetNuke.ComponentModel.ProviderInstaller - System.Configuration.ConfigurationErrorsException: Could not load provider DotNetNuke.NavigationControl.ASP2MenuNavigationProvider, DotNetNuke.ASP2MenuNavigationProvider
2017-10-11 08:19:29,715 [dnn4less01][Thread:9][ERROR] DotNetNuke.Common.Internal.ServicesRoutingManager - Unable to register service routes
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
   at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter..ctor()
   at System.Net.Http.Formatting.JsonMediaTypeFormatter..ctor()
   at System.Net.Http.Formatting.MediaTypeFormatterCollection.CreateDefaultFormatters()
   at System.Web.Http.HttpConfiguration.DefaultFormatters(HttpConfiguration config)
   at System.Web.Http.HttpConfiguration..ctor(HttpRouteCollection routes)
   at System.Web.Http.GlobalConfiguration.<CreateConfiguration>b__0()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at System.Lazy`1.get_Value()
   at System.Web.Http.GlobalConfiguration.get_Configuration()
   at DotNetNuke.Web.Api.Internal.ServicesRoutingManager.RegisterRoutes()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at DotNetNuke.Common.Internal.ServicesRoutingManager.RegisterServiceRoutes()













 
Previous
 
Next
HomeHomePremiumPremiumDevelopmentDevelopmentError calling web serviceError calling web service



Try FREE
30 days money back guaranteed