Jump to content
Xtreme .Net Talk

andrewsc

Members
  • Posts

    7
  • Joined

  • Last visited

andrewsc's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi, I developed a console application, using WriteLine() and readLine(). At some stage, I invite the user to enter a password. This works fine, but ... As the user types the password into the command-line window, the characters nare being echoed on the screen. This makes the application insecure, since the password can be seen by anyone watching over the shoulders of the user. Is there any way to turn off the echo as characters are being types into the command line ?
  2. thanks for the pointer. I experimented with MS-WebBrowser but it was too graphical for me. As about MSHTML, I am trying to avoid having to wait, on an active loop, for the form to load. Meanwhile, I'm making good progress with regex(). I've just found I can get not only the matched string, but also separately the portion found between the opening tag and the closing one. The syntax is crazy, but it works. Best of all, I can have a pure-batch console application walking accross a few pages in the background. The pages are well-defined and are not likely to change, so I don't have to support a general-purpose parser. The only reason I'm parsing the forms is to get the invisible session correlators. But there is still an interesting question for the Forum. If I wanted to make the parser more general, I had to find a way to avoid comments. After all, the "<form" and "</form>" could appear within comments, but my regex() does not know that yet. Could anyone come up with a regular expression which: - ignores anything between HTML comments - and finds all forms as defined between "<form" and "</form>" No nested forms yet, .... this is fun ... Andrew
  3. Hi, I'm wring an unattended web walker, to follow a few links, fill in some forms and eventually download some files. IN the process, I need to do a very limited parsing of the HTML response. For example, I need to pick up the invisible inputs in forms, or the Meta content refresh redirection. Which approach is better: I can use either simple fundtions like String.IndexOf() or take the trouble and learn the Regular Expression Language with those horrible looking Regex() and Match() classes. Has anyone picked up HTML tags from the response stream ? If so, which is the best way ? I don't need a fool-proof parser for the whole complexity of HTML. The pages we need to scan in unattended mode do not change often, so we don't have things like "form" tags within comments, etc. Andrew
  4. the following seems to do the rick, if I run it before I execute my Dot net program: caspol -s off But I hate the idea of completely turning off Code Access Security, on an entire server. All I need is to allow my program to connect to SQL and do file IO, while executing from a shared drive.
  5. Hi, my little console utility works perfectly from C: drive. It connects first to Sql Server, and then reads and writes a few files. The same utility fails when I place the assembly file on a shared disk drive. Code Access Security makes an interesting reading, but not when I need to make it happen in the next hour or so. Is there any simple command which I can compile into the source, to make it work on shared drives as well ? The funny thing is that the failure is on the SqlConnectio.Open() call. The error message says the "request for permission SqlClientPermission failed". From my summary reading, I would have expected FileIOPermission to depend on the disk location. But SqlClientPermission ? On the other hand, I will need to address permissions for file I/O as well, because that is the next thing my programm does, after connecting to SQL Server. Being in a hurry, I've tried declarative security: ' <assembly: PermissionSetAttribute(SecurityAction.RequestMinimum, Name := "FullTrust")> The above came back at runtime with an error saying the permission could not be acquired. Any other quick-fix idea ? Meanwhile I will keep reading on. TIA, Andrew
  6. this is great code. Seems to me it implements an SMTP client from socket level up. Can you publish the C# version with attachments ? I have a batch application which distributes emails. - do I need IIS to be installed and running in order to use System.Web.Mail ? - same question with CDO: do I need it if I want to use System.Web.Mail ? Andrew
  7. PMJI, it is preferable to jump in rather than starting a new thread with an identical question. Yes, I can see the local help file, but the problem comes at an earlier point in the design. Perhaps the original question also come from this angle. I've created a datagrid at design time, and now I need to specify something like: - the format for column 2 is "dd-MMM-yyyy HH:mm:ss" - the format for column 7 is "dd-MM-yy" The point is not whether the formats above are correct, or whether I identify a column by name or by number. From VB6 practice, I've expected a Columns collection hanging off the datagrid or the OleDbAdapter. Could not find such thing. How do I access properties for individual columns in a datagrid ? Andrew
×
×
  • Create New...