Chilkat Tech Notes
Chilkat Tech Notes
Tips, techniques, and patterns for Chilkat developers
Chilkat Software

MHT Authentication – Login/Password Properties

October 17, 2008 in Uncategorized

Question:
My HTML page requires authentication to access. If I try to download it with Chilkat MHT, I get the following text in the mht.LastErrorText property:

ChilkatLog:
  GetMHT:
    version: 5.2.1
    DllDate: Sep 12 2008
    Username: ***
    Component: .NET 2.0
    url: http://***.aspx
    root_url: http://***
    base_url: http://***
    url: http://***.aspx
    Not yet connected to web server. Need to establish connection.
    httpServer: ***
    port: 80
    Auto-adding any accumulated cookies.
    CookieDir: memory
    LoadCookieJar:
      CookieDir: memory
      Domain: ***
      Path: /***.aspx
      HashKey: ***.xml
      No cookies exist yet.
    No cookie jar found.
    StatusCode: 401
    StatusText: Unauthorized
    HttpResponseCode: 401

Answer
Set the mht.WebsiteLogin and mht.WebsitePassword properties prior to calling GetMHT.

Blogroll

  • * Release Notes
  • Chilkat Binary Encodings
  • Chilkat Character Encodings
  • Chilkat Home
  • Example Code
  • Generate Chilkat Code from Postman
  • How to Determine FTP Connection Settings
  • How To Register ActiveX DLLs
  • MSVC Runtimes for .NET Assemblies
  • Never Handle Non-Text Binary Data as a String
  • Online XML Signature Validators
  • Reference Documentation
  • SOAP WSDL to Chilkat Code
  • Socket Programming Must-Know Concepts
  • StackOverflow (Chilkat Software)
© 2025 Chilkat Tech Notes · All rights reserved.