brucerchapman / DnnBulkUserDelete

Service and Console for Deleting large amounts of users from Dnn Installations.
MIT License
12 stars 6 forks source link

Cannot Ping Host Successfully #1

Closed WillStrohl closed 9 years ago

WillStrohl commented 9 years ago

I have a DNN 7.2.2 Evoq Social 2.0.0 site where I can ping anonymously just fine. However, when I Ping Host, it simply returns a Server 500 error.

Starting Authenticated Server Ping to DOMAIN.COM at : 5:48 PM

Finished Authenticated Server Ping at 5:48 PM; Elapsed time : 0.1250592 seconds Result: Call to http: //DOMAIN.COM/DesktopModules/Dnn_BulkUserDelete/API/BulkUserDelete/AdministratorPing resulted in 500 Server Error. Check Error field.

What error field? There are no additional details in the tool or in the Event Viewer. When I turned on ALL for Log4Net, the only log entry I see that looks related is below.

2015-01-16 17:52:51,186 [SERVER-NAME][Thread:37][FATAL] DotNetNuke.Web.Common.Internal.DotNetNukeHttpApplication - System.Configuration.ConfigurationErrorsException: Password Retrieval is not enabled at System.Web.Http.WebHost.HttpControllerHandler.EndProcessRequest(IAsyncResult result) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

brucerchapman commented 9 years ago

Will, the Host ping is the same thing (just calls a WebAPI method, but one marked as Administrator access only). The Error field is part of the JSON response that you should be getting back. However, if its just returning a 500 error, I guess you're not getting any JSON response.

Stupid question - is your host user password OK? Hasn't expired or anything like that?

There's nothing in there to try and retrieve your host password or anything. It's just a ping method as you can see here from line 31. https://github.com/brucerchapman/DnnBulkUserDelete/blob/master/Dnn.BulkUserDelete/BulkUserDeleteController.cs Maybe try an admin user instead of a host and see if that works?

WillStrohl commented 9 years ago

Yes, I double, triple, and google-checked my username/password. :)

I tried user the admin and still no worky. I got the same error.

I also thought maybe this is because the passwords had special characters. I changed to only have lowercase letters and it again gives me the same error.

Finally, I re-read the documentation yet again and figured I might be reading one part wrong. I was using the console on the server, and not on my local computer. I wasn't sure if "local" in the instructions meant local to the server or not. Same result. :(

As far as I know, I haven't done anything special. I am not sure what else to try now.

brucerchapman commented 9 years ago

Local means your computer not the server.

Is the target site a 7.1 install? Maybe try creating a new administrator account just for the purpose?

For the error text, does the event log of the server contain an exception? Being a 500 error it might be lower level than DNN.

WillStrohl commented 9 years ago

I tried on both the server and LOCAL computer at this point and it's a DNN 7.2.2 (Evoq Social 2.0.0) site. There are no related errors in the Event Log or in the Log4Net file when turned on to report "All."

brucerchapman commented 9 years ago

Without an error to work from it's going to be impossible to determine a cause. Hopefully you'll get a chance to try it on a different server and see if it is working there. I've used it on a handful of sites and haven't had any issues yet.

WillStrohl commented 9 years ago

Exactly. I'd love to see an error reported. Perhaps there should be more error trapping?

In the meantime, I have a site that is effectively all but disabled by the spammer registration bot.

WillStrohl commented 9 years ago

Okay... So one bit of troubleshooting I forgot to do before is to inspect the request/response with Fiddler. Once I did, I saw the HTTP 500 Server Error. The error was about enablePasswordRetrieval being set to false. Once I set it to true, the Ping Host function works.

brucerchapman commented 9 years ago

OK cool - so now the rest works as expected?

WillStrohl commented 9 years ago

Sometimes I get some weird timeout messages and errors, but I don't think they're necessarily related to this tool.

dcwood57 commented 9 years ago

I'm having a similar problem. I'd really like this tool to work for me as my "Folders" table is HUGE.

I'm getting this message when I try to ping anonymously -

Starting Anonymous Server Ping to www.itsabouttimetc.com at : 4:54 PM

Finished Anonymous Server Ping at 4:54 PM; Elapsed time : 0.089005 seconds Result: Call to http: //www.itsabouttimetc.com/DesktopModules/Dnn_BulkUserDelete/API/BulkUserDelete/AnonymousPing resulted in 500 Server Error. Check Error field.


I've only been able to ping on localhost site, not on any production sites. I checked enablePasswordRetrieval and it is set to true.

Any clues?

WillStrohl commented 9 years ago

Does Fiddler give you any more clues?

dcwood57 commented 9 years ago

Not too familiar with Fiddler. I installed it. But not sure what I should be looking for.

From: hismightiness [mailto:notifications@github.com] Sent: Friday, February 27, 2015 5:42 PM To: brucerchapman/DnnBulkUserDelete Cc: dcwood57 Subject: Re: [DnnBulkUserDelete] Cannot Ping Host Successfully (#1)

Does Fiddler give you any more clues?

— Reply to this email directly or view it on GitHub https://github.com/brucerchapman/DnnBulkUserDelete/issues/1#issuecomment-76493677 . https://github.com/notifications/beacon/AKri1BSkvshZkIgvFxJVy_WmIQnimZxbks5nwPhRgaJpZM4DTmOF.gif

brucerchapman commented 9 years ago

To use fiddler, use the 'compose' tab and enter the URL for the ping method, then click on 'execute' This submits the request.

You can switch on the tracing (F12) and then use the Ping button on the windows app, which will ping them. This gives you a record of what the URL and response is to look at.

If you're getting a 500 error the key is finding out the text of the error. The response tab in Fiddler might give you that.

dcwood57 commented 9 years ago

Yeah, all I'm getting is: {"Message":"An error has occurred."} in TextView

Raw: HTTP/1.1 500 Internal Server Error Cache-Control: no-cache Pragma: no-cache Content-Type: application/json; charset=utf-8 Expires: -1 Server: Microsoft-IIS/7.5 Set-Cookie: .ASPXANONYMOUS=8Dk354eL0AEkAAAAMWQ0MjA0ODktMTM1MS00ZDQ4LWJkNjctNmYwMWNlNzZiNzZk0; expires=Mon, 11-May-2015 01:15:00 GMT; path=/; HttpOnly X-AspNet-Version: 4.0.30319 Set-Cookie: .ASPXANONYMOUS=8Dk354eL0AEkAAAAMWQ0MjA0ODktMTM1MS00ZDQ4LWJkNjctNmYwMWNlNzZiNzZk0; expires=Mon, 11-May-2015 01:15:00 GMT; path=/; HttpOnly Set-Cookie: language=en-US; path=/; HttpOnly X-Powered-By: ASP.NET Date: Mon, 02 Mar 2015 14:35:00 GMT Content-Length: 36

{"Message":"An error has occurred."}

brucerchapman commented 9 years ago

I would first verify that the module is installed correctly on your target site. The Ping Anon test is there to test connectivity - it is extremely simple, all it does is return a string. If that is failing chances are it isn't set up correctly on the target site.