Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: Problems with wwMaint

$
0
0
Re: Problems with wwMaint
Web Connection 5.0
Re: Problems with wwMaint
01/14/2012
02:13:39 PM
3EQ0UHUN4 Show this entire thread in new window
From:
To:
Attachments:
None
Hi Bodo,

I'm not sure what's happening for you. What version are you running?

All requests EXCEPT for FastHit (which is a test request) pass through the same security check. So either you are already logged in when you hit the kill link or there's no authentication for *any* of those wwMaint requests.

Note that there is an issue there when using the Web Connection .NET Module where the cAdminAccount property is not set during startup of the wwMaint Process class. When the Module is in use the values are not properly read from web.config which results in empty values and open access. I just fixed this so that the values are read from web.config the same way as they are from the INI file via the XMLDOM in this case. The method in question for this is wwRequest::GetWcIniValue which has been changed to this:

********************************************************************* FUNCTION GetWCIniValue(lcKey, lcSection) **************************************** #IF .F. *:Help Documentation *:Topic: wwrequest::getwcinivalue *:Description: Retrieves a value from the Web Connection ISAPI/CGI configuration file. Most useful for retrieving the AdminUser value. *:Parameters: <<b>>lcKey<</b>> The key to retrieve <<b>>lcSection<</b>> <<i>>Optional<</i>> - the section to retrieve the value from. The default is the [Main] section. *:Returns: String of the value retrieved or "" (null string) if the key doesn't exist. *:ENDHELP #ENDIF ********************************************************************* lcFile = LOWER(JUSTFNAME(this.ServerVariables("wcConfig"))) IF EndsWith(lcFile,".ini") lcSection=IIF(EMPTY(lcSection),"wwcgi",lcSection) lcValue = THIS.oAPI.GetProfileString(THIS.ServerVariables("WCCONFIG"),; lcSection,lcKey) IF ISNULL(lcValue) RETURN "" ENDIF RETURN lcValue ENDIF IF EndsWith(lcFile,".config") *** Web.config file lcSection=IIF(EMPTY(lcSection),"webConnectionConfiguration",lcSection) *** Cache the DOM instance for this request so we don't keep reading *** from disk for every access IF VARTYPE(this.oConfigXmlDom) != "O" this.oConfigXmlDom = GetXmlDomObject() IF !this.oConfigXmlDom.load(lcFile) RETURN "" ENDIF ENDIF LOCAL loXml as MSXML2.DomDocument loXml = this.oConfigXmlDom LOCAL loNode as MSXML2.IXMLDOMNode loNode = loXml.documentElement.selectSingleNode(lcSection + "/add[@key='" + lcKey + "']") IF ISNULL(loNode) RETURN "" ENDIF loAttr = loNode.attributes.getNamedItem("value") IF ISNULL(loAttr) RETURN "" ENDIF lcValue = loAttr.text loNode = null loXml = null RETURN lcValue ENDIF RETURN "" ENDFUNC * EOF wwRequest::GetWCIniValue

If you are running the .NET module the intermediate fix is to explicitly set the values of the cAdminAccount propery in wwMaint::OnProcessInit(). Set the value to ANY.

FWIW, all the Kill and Restart links should be fired from ISAPI DLL or Module Directly. If you go to the ISAPI or .NET Modue admin page you'll see the links at the top to restart/stop etc. These are better links to use since they are driven through the connectors and don't require access at all to the FoxPro code.


+++ Rick ---

Dear Rick,

I did the following:

Entered the URL .. wc.wc?wwMaint~ShowStatus and canceled the Windows Security-Dialog.
"Access to this page is denied" is displayed.

Entered the URL .. wc.wc?wwMaint~ServerStatus in the same Browser-Tab
No Security-Dialog is displayed, EXE is crashing with wwDhtmlForm-Error

Started my EXE again on the server

Entered the URL .. wc.wc?wwMaint~ShowStatus and canceled the Windows Security-Dialog.
"Access to this page is denied" is displayed.

Entered the URL .. wc.wc?wwMaint~Sessions~Kill in the same Browser-Tab
EXE is quitting on the server.

Did this with my Windows 2008 R2-Webserver and also with my local Windows 7 - Setup.

Can you check again?

Best Regards,

Bodo



The Server Configuration code has been removed since wwDhtmlForm has been removed from Web Connection. I can't recall if the code in wwMaint was removed recently or not, but that will no longer work.

Kill is working without auth because you probably are already authenticated from a previous request.

+++ Rick ---


Hi,

I am using Web Connection 5.60 and have some issues with wwMaint:

In wc.ini i set an AdminAccount.

wc.wc?wwMaint~ShowStatus is working with Windows Authentication
wc.wc?wwMaint~ServerStatus gives an error on the file based exe: Classdefinition wwdhtmlform not found

But the worst:
wc.wc?wwMaint~Sessions~Kill ist quitting my exe without authentication !

Who can help ?

Best regards,

Bodo





Rick Strahl
West Wind Technologies

Where do you want to surf today?
Reader Version: 5.0

from Maui, Hawaii



Viewing all articles
Browse latest Browse all 10393

Trending Articles