Re: [twsocket] Assign event handler to manually created TStmpCli
Hello Patrick, to see what goes wrong. However in the Pascal unit the Watch and Debug - Inspect features of the C++ Builder IDE are not workable. I'm not 100% sure, but I thought you dan step trough pascal units with cbuilder. Try to delete the SmtpProt.obj and SmtpProt.dcu files (maybe only one of them is there), check the debug options in IDE and rebuild the project. I find there is a ConApp.pas in ICS source that features message loop. Can I make a C++ Builder console application to start with it? There are several ones. Take the most recents as example. And yes, function calls in CBuilder are the sameand the winAPI calls (of course) also, so you can start :) --- Rgds, Wilfried http://www.mestdagh.biz -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] FTPClient
Thank you very much. He have found the problem. The servername was incorrect. Regards. - Original Message - From: Arno Garrels [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Monday, June 27, 2005 6:35 PM Subject: Re: [twsocket] FTPClient Carlos Lalín wrote: it Creates the first exception not connected but in my code: FtpClient1.Connect; if (FtpClient1.Connected) Then begin raise Exception.Create('Conected'); end; this too creates the exception 'Conected'. I don't know if this server requires login, I have used the configuration that they give me. In a program FTP, it connects find and it shows all files. Sorry, I mixed something up, method Connect does the login for you (very strange naming!). Connect executes the 3 methods Open, User and Pass in one go. So in order to know what exactly went wrong try this: if not FtpClient1.Connect then raise Exception.Create('Connect: ' + FtpClient1.LastResponse); Arno Garrels - Original Message - From: Arno Garrels [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Monday, June 27, 2005 5:00 PM Subject: Re: [twsocket] FTPClient What happens when you try this? The code is: FtpClient1.HostName := servername; FtpClient1.Port := 'ftp'; FtpClient1.HostDirName := '/'; FtpClient1.UserName := username; FtpClient1.Password := password; FtpClient1.LocalFileName := 'listado.txt'; FtpClient1.HostFileName := ''; lista.clear(); if not FtpClient1.Connect then raise Exception.Create('not connected'); if not FtpClient1.Cwd then raise Exception.Create('CWD failed'); FtpClient1.Binary := False; if not FtpClient1.TypeSet then raise Exception.Create('TypeSet to ascii mode failed'); if not FtpClient1.Ls then raise Exception.Create('LS failed'); .. Doesn't the server require a login? Arno Garrels Carlos Lalín wrote: The code is: FtpClient1.HostName := servername; FtpClient1.Port := 'ftp'; FtpClient1.Binary:= true; FtpClient1.HostDirName := '/'; FtpClient1.UserName := username; FtpClient1.Password := password; FtpClient1.LocalFileName := 'listado.txt'; FtpClient1.HostFileName := ''; lista.clear(); FtpClient1.Connect; FtpClient1.Cwd; FtpClient1.Ls; lista.LoadFromFile('listado.txt') For i:=0 to lista.Count-1 do begin memo1.lines.add('Fichero ' + lista[i]); end; FtpClient1.Quit; -- lista has 0 elements. Regards. - Original Message - From: Arno Garrels [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Monday, June 27, 2005 2:17 PM Subject: Re: [twsocket] FTPClient Carlos Lalín wrote: I'm sorry but this is like that. The files are there but the file is empty. The conection doesn't produce error. Can you show some lines of code? Arno Garrels Carlos. - Original Message - From: Arno Garrels [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Monday, June 27, 2005 1:18 PM Subject: Re: [twsocket] FTPClient Carlos Lalín wrote: After doing Ls, the file is empty I don't think it's possible *if the remote directory was not empty. You *may get an error in OnRequestDone if it was empty and file listing was therefore not sent. Arno Garrels Carlos Lalín wrote: Hello, I use the component FTPCliente to download files from a server. I indicate the name of the file where appear the name of the files to download. After doing Ls, the file is empty when with another program FTP I see that there are files. To what can it owe? Thank you. Regards. Carlos. -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
[twsocket] I need help
I posted data with httpCli and received Internal Server Error. This is the page I'm ussing and recieved correctly information, but when I send the post with the variables os page and receive the error. HTML HEAD /HEAD body background=Images/fondo3.gif ; form name=Consulta method=post action= http://www.anses.gov.ar/servicios/IGTPC/Consulta.aspx; id=Consulta input type=hidden name=__EVENTTARGET value= / input type=hidden name=__EVENTARGUMENT value= / input type=hidden name=__VIEWSTATE value=dDwxODY0Nzg1OTExO3Q8O2w8aTwxPjs+O2w8dDw7bDxpPDM+O2k8ND47aTw2PjtpPDg+O2k8MTA+Oz47bDx0PHA8cDxsPFZpc2libGU7PjtsPG88Zj47Pj47Pjs7Pjt0PDtsPGk8Mz47PjtsPHQ8QDA8cDxwPGw8UGFnZUNvdW50O18hSXRlbUNvdW50O18hRGF0YVNvdXJjZUl0ZW1Db3VudDtEYXRhS2V5czs+O2w8aTwxPjtpPDI+O2k8Mj47bDw+Oz4+Oz47Ozs7Ozs7Ozs7PjtsPGk8MD47PjtsPHQ8O2w8aTwxPjtpPDI+Oz47bDx0PDtsPGk8MD47aTwxPjtpPDI+Oz47bDx0PDtsPGk8MD47PjtsPHQ8cDxwPGw8VGV4dDs+O2w8QVJFUyBBTEJFUlRPICAgICAgICAgICAgIDs+Pjs+Ozs+Oz4+O3Q8cDxwPGw8VGV4dDs+O2w8MDI0LTIwLTA0MDIwOTc1LTItMDk0LTE7Pj47Pjs7Pjt0PDtsPGk8MD47PjtsPHQ8cDxwPGw8VGV4dDs+O2w8MDI0LTIwLTA0MDIwOTc1LTItMDk0LTE7Pj47Pjs7Pjs+Pjs+Pjt0PDtsPGk8MD47aTwxPjtpPDI+Oz47bDx0PDtsPGk8MD47PjtsPHQ8cDxwPGw8VGV4dDs+O2w8QVJFUyBBTEJFUlRPICAgICAgICAgICAgIDs+Pjs+Ozs+Oz4+O3Q8cDxwPGw8VGV4dDs+O2w8OTk3LTAwLTIyNjk4MzE5LTAtMDU4LTA7Pj47Pjs7Pjt0PDtsPGk8MD47PjtsPHQ8cDxwPGw8VGV4dDs+O2w8OTk3LTAwLTIyNjk4MzE5LTAtMDU4LTA7Pj47Pjs7Pjs+Pjs+Pjs+Pjs+Pjs+Pjt0PHA8cDxsPFRleHQ7PjtsPExvcyBkYXRvcyBlc3TDoW4gYWN0dWFsaXphZG9zIGFsIDI3LzA2LzIwMDUgMDA6MDA7Pj47Pjs7Pjt0PHA8bDxWaXNpYmxlOz47bDxvPGY+Oz4+Ozs+O3Q8cDxsPFZpc2libGU7PjtsPG88Zj47Pj47Oz47Pj47Pj47Prx9thUjhIR+VJE5rf58NF2sokZG / script language=javascript !-- function __doPostBack(eventTarget, eventArgument) { var theform; if (window.navigator.appName.toLowerCase().indexOf(netscape) -1) { theform = document.forms[Consulta]; } else { theform = document.Consulta; } theform.__EVENTTARGET.value = eventTarget.split($).join(:); theform.__EVENTARGUMENT.value = eventArgument; for (i=0;i theform.elements.length;i++) { alert (theform.elements[i].name + \n \n +theform.elements[i].value); } theform.submit(); } // -- /script TABLE id=tblCabecera cellSpacing=0 cellPadding=0 width=772 align=center bgColor=#ff background=Images/Fondo6.jpg border=0 valign=bottom TR TD style=HEIGHT: 18px colSpan=2 height=19 TABLE id=Table1 cellspacing=0 cellpadding=0 width=771 border=0 style=DISPLAY: inline; FONT-WEIGHT: bold; FONT-SIZE: 8pt; BACKGROUND-IMAGE: none; TEXT-TRANSFORM: uppercase; WIDTH: 176px; COLOR: #cc; FONT-FAMILY: Arial; HEIGHT: 11px; BACKGROUND-COLOR: transparent TR TDnbsp; /TD /TR /TABLE /TD /TR TR TD vAlign=top align=center colSpan=2 height=100%div id=PanLista align=Center style=height:130px;width:100%; BR TABLE id=tblLista style=HEIGHT: 133px cellSpacing=1 cellPadding=1 width=80% align=center border=0 TR TD vAlign=middle align=center colSpan=1 table cellspacing=0 rules=all bordercolor=LightSteelBlue border=2 id=GExp style=border-color:LightSteelBlue;border-width:2px;border-style:Solid;height:123px;width:85%;border-collapse:collapse; tr td style=color:SlateGray;font-family:Arial;font-size:9pt;width:70%;Carátula/tdtdNúmero de Expediente/td /trtr td style=color:DarkBlue;font-family:Arial;font-size:8pt;a href=javascript:__doPostBack('DGExp$_ctl2$_ctl0','') style=color:DarkBlue;ARES ALBERTO /a/tdtda href=javascript:__doPostBack('DGExp$_ctl2$_ctl1','')024-20-04020975-2-0941/a/td /trtr td style=color:DarkBlue;font-family:Arial;font-size:8pt;a href=javascript:__doPostBack('DGExp$_ctl3$_ctl0','') style=color:DarkBlue;ARES ALBERTO /a/tdtda href=javascript:__doPostBack('DGExp$_ctl3$_ctl1','')997-00-22698319-0-0580/a/td /tr /table/TD /TR /TABLE /div/TD /TR /TABLE /form /body /HTML I'm receive the error with this parameter __VIEWSTATE=dDwxODY0Nzg1OTExO3Q8O2w8aTwxPjs+O2w8dDw7bDxpPDM+O2k8ND47aTw2PjtpPDg+O2k8MTA+Oz47bDx0PHA8cDxsPFZpc2libGU7PjtsPG88Zj47Pj47Pjs7Pjt0PDtsPGk8Mz47PjtsPHQ8QDA8cDxwPGw8UGFnZUNvdW50O18hSXRlbUNvdW50O18hRGF0YVNvdXJjZUl0ZW1Db3VudDtEYXRhS2V5czs+O2w8aTwxPjtpPDI+O2k8Mj47bDw+Oz4+Oz47Ozs7Ozs7Ozs7PjtsPGk8MD47PjtsPHQ8O2w8aTwxPjtpPDI+Oz47bDx0PDtsPGk8MD47aTwxPjtpPDI+Oz47bDx0PDtsPGk8MD47PjtsPHQ8cDxwPGw8VGV4dDs+O2w8QVJFUyBBTEJFUlRPICAgICAgICAgICAgIDs+Pjs+Ozs+Oz4+O3Q8cDxwPGw8VGV4dDs+O2w8MDI0LTIwLTA0MDIwOTc1LTItMDk0LTE7Pj47Pjs7Pjt0PDtsPGk8MD47PjtsPHQ8cDxwPGw8VGV4dDs+O2w8MDI0LTIwLTA0MDIwOTc1LTItMDk0LTE7Pj47Pjs7Pjs+Pjs+Pjt0PDtsPGk8MD47aTwxPjtpPDI+Oz47bDx0PDtsPGk8MD47PjtsPHQ8cDxwPGw8VGV4dDs+O2w8QVJFUyBBTEJFUlRPICAgICAgICAgICAgIDs+Pjs+Ozs+Oz4+O3Q8cDxwPGw8VGV4dDs+O2w8OTk3LTAwLTIyNjk4MzE5LTAtMDU4LTA7Pj47Pjs7Pjt0PDtsPGk8MD47PjtsPHQ8cDxwPGw8VGV4dDs+O2w8OTk3LTAwLTIyNjk4MzE5LTAtMDU4LTA7Pj47Pjs7Pjs+Pjs+Pjs+Pjs+Pjs+Pjt0PHA8cDxsPFRleHQ7PjtsPExvcyBkYXRvcyBlc3TDoW4gYWN0dWFsaXphZG9zIGFsIDI3LzA2LzIwMDUgMDA6MDA7Pj47Pjs7Pjt0PHA8bDxWaXNpYmxlOz47bDxvPGY+Oz4+Ozs+O3Q8cDxsPFZpc2libGU7PjtsPG88Zj47Pj47Oz47Pj47Pj47Prx9thUjhIR+VJE5rf58NF2sokZG What's is the correctly way to send this parameters or whats is necesary to set the htttpclient component -- Fabian
Re: [twsocket] HttpSrv: implementing NTLM
On 23-Jun-05 07:40:28 Francois Piette wrote: As you can see the server must at least generate the Challenge when speak with an ICS client, and keep it to elaborate the Message3. While from the client side we are free to set flags and fields with specific values, the server should be able to hadle all possible values if it must answer to a client different from ICS. This client/server dialog occurs in a single TCP session handled by a single TWSocket at server side. You can store anything you like n that TWSocket without collision with other clients. That's clear, but there is still the problem how to handle request made from clients that aren't based on ICS, if they set flags and fields with values that are different from the fixed one set by THttpCli. In conclusion, it seems to me that implementing the NTLM in the server will require lot of time, and at the moment I don't have so much time. And I don't known if it worth the effort. Maybe it would be better to invest that time implementing a more standard authentication (client and server) instead for a proprietary and not dodumented like NTLM. For example, Apache or other web servers different fom M$ are able to accept NTLM authentication? (Not a rhetorical question, I really don't know) Bye, Maurizio. -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be