Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7715953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:30:58+00:00 2026-06-01T02:30:58+00:00

I am wanting to run a web scraping script on a server. The current

  • 0

I am wanting to run a web scraping script on a server.

The current script collects the html on the specified page.

$url = "http://websms"
 [net.httpWebRequest] $request = [net.webRequest]::create($url)
 [net.httpWebResponse] $response = $request.getResponse()
 $responseStream = $response.getResponseStream()
 $sr = new-object IO.StreamReader($responseStream)
 $result = $sr.ReadToEnd()

 $result

This works fine on a typical web page. However I am wanting to run it on a servers admin page which of course requires a login.

I thought before I attempt to login I will try and scrape the login page of the server. Running the above script I get the following result.

   Exception calling "GetResponse" with "0" argument(s): "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel."
At C:\temp\web3.ps1:3 char:56
+  [net.httpWebResponse] $response = $request.getResponse <<<< ()
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException

Any idea of how to get around this issue or perhaps if you could point me a different direction so I can scrape elements from the admin html page of the sever.

Thanks Guys!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T02:30:59+00:00Added an answer on June 1, 2026 at 2:30 am

    This one liner will ignore SSL certificate errors:

    [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
    

    Errors regarding self-signed untrusted certificates, mismatching names or expiration will be ignored after this is executed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using VS2008 on my local dev machine, when I run my asp.net Web Application
Lately, I've often found myself wanting to run some command on the output of
I'm wanting extra security for a particular point in my web app. So I
I want to run a shell script in php, but this shell script takes
I am currently working on some prototypes for a web site I am wanting
I've got a web application that has a page full of batch files which
I have a .NET web-service client that has been autogenerated from a wsdl-file using
I am currently wanting to run a SQL statement that will filter my database
I frequently find myself wanting to efficiently run a Clojure function multiple times with
Here's my code: string url = @http://eafsys:1234/vp.xml; try { XmlTextReader reader = new XmlTextReader(url);

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.