This project is read-only.

Keep Alive module on intranet

Topics: Troubleshooting
Aug 24, 2011 at 8:30 PM
Edited Aug 24, 2011 at 8:32 PM

The current project I'm working on is an intranet site. When enabling the Keep Alive module and attempting to assign a URL, I keep getting a 401 error for unauthorized access. I've tried several combinations and I can't seem to find one that actually works:



When looking through the Keep Alive code, it appears that it's sending a simple http request which I would assume is being done on port 80, and then looking for a response.

I turned off the firewall on the server temporarily to see there was some setting that is blocking it, but that didn't change anything.

I can see in the log file that is indeed returning an error and therefore not actually working to keep the site from unloading


2011-08-24 12:27:50,340 [12] Contrib.KeepAlive.Services.KeepAliveExecutor - Could not ping keep alive service at url [http://schqvbid/keepalive]
System.Net.WebException: The remote server returned an error: (401) Unauthorized.
   at System.Net.HttpWebRequest.GetResponse()
   at Contrib.KeepAlive.Services.KeepAliveExecutor.Sweep()

But if I enter that URL (http://schqvbid/keepalive) in the browser on both my local computer and the server, I get a page with "alive" on it.

Any ideas on why I'm getting an Unauthorized result? Thanks

Aug 24, 2011 at 8:35 PM might be because I'm using Windows Authentication on this server and the AlexZh module and Orchard isn't passing any credentials to the server when making the request. I bet that's it.

Aug 24, 2011 at 8:40 PM

Might be it yes. Maybe you can ignore this message then and the module should work, because I assume it still pings the server to a valid resource.

Aug 24, 2011 at 9:07 PM

I tried adding the credentials to the url string: http://username:password@schqvbid/, but that doesn't seem to work either.

I actually tried from a browser that wouldn't pass credentials automatically and found that it is asking me for credentials when I attempt to go to http://schqvbid/keepalive

I'll let the site sit for a bit to see if it's unloading when the app pool times out. Thanks!

Aug 25, 2011 at 3:08 AM

Looks like you're right. The development site sat untouched for about 2 hours and when I loaded it up, it came back in about 2 seconds, so it looks like it's working. I'll just need to keep an eye on the log files since it's logging an error every time it pings and I don't want those to get too out of control.