Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Posts
    7
    Plugin Contributions
    0

    help question Automatic Login using C#?

    I'm trying to write a small code in C# that will start by logging into the zen-cart admin. I tried to start with:
    Code:
    HttpWebRequest request = WebRequest.Create("http://mywebiste/admin") as HttpWebRequest; 
    using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)  
                 {  
                     // Get the response stream  
                     StreamReader reader = new StreamReader(response.GetResponseStream());  
                   
                     // Console application output  
                     Console.WriteLine(reader.ReadToEnd());  
                 }
    But what I get is the login page and I don't know how to enter the username and password. Is it possible to set zen-cart to accept a url in the format http://username : password@mywebsite ?

    Any assistance will be greatly appreciated...

    thanks...

    Y.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Automatic Login using C#?

    Putting password parameters on the URL is EXTREMELY unsafe. That's why it's not a built-in option.

    Zen Cart is specifically designed to NOT allow external programs to manipulate and control the admin unless you're using your browser and logging in normally.

    What exactly are you trying to "write a small code in C#" for?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Automatic or Disable Login?
    By doodlebee in forum Installing on a Linux/Unix Server
    Replies: 1
    Last Post: 3 Nov 2008, 01:49 PM
  2. automatic login link
    By djdavedawson in forum General Questions
    Replies: 0
    Last Post: 18 Jul 2008, 05:04 PM
  3. Automatic login 1.3.7
    By oxicottin in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 15 Apr 2007, 09:23 PM
  4. Automatic Login to Zen Cart
    By squashrick in forum General Questions
    Replies: 1
    Last Post: 9 Feb 2007, 02:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg