PowerShell:Download a file from URL with 257 chars and 404 returned - powershell

I tried to download a file from a url which has 257 characters,but the following error is returned:
Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (404) Not Found."
When I copy the URL to firefox or IE, I can download that file. then I tried to download a file from the same website but whose URL is short, I can download it successfully with Powershell.
Does anybody find the similar issue before? Could you pls share how to solve it?
Thanks a lot.

I recently faced the exact same issue and this is how I resolved it. Thought it would help someone who comes to this thread later.
In my case, the reason for the exception was incorrect URL due to a parameter I added to the URL. Something like this:
https://yourserverurl/archive-$OS.zip
I was using a parameter in the URL for the Operating System. And I was getting the $OS argument wrong.
Therefore, the two reasons I can think of when this error occurs:
The file cannot be downloaded without authentication. But that would probably throw a 401.
The URL is incorrect. Maybe due to some parametrization as in my case.
Hope this helps!

Related

What is the octokit.js's method for updating Readme file?

I am using Octokit/rest to edit github files. When I am trying to edit the ReadMe file using the octokit.repos.createOrUpdateFileContents it throws the following error:
HttpError: Not Found
And this is the url I received in the error message:
https://api.github.com/repos/bob/repo-name/contents/README.md
So the error must be that the API call to get the readme file is wrong. So what is the correct method to use to update the ReadMe file?
edit:Created another file with a random name and tried to reach it via this method, it also throws the same error.
Thank you.
Sorry, it's my bad that I used underscore in the repo owner value. I should have used a hyphen. That's the error.
Leaving it here so someone might find it helpful in the future.

Troubleshooting QuickBooks Web Connector issue

Try to troubleshooting QuickBook's Web Connector by following helping URL: Click Me. When I try to Add an application into Web connector getting following error: "QBWC1048: QuickBooks Web Connector could not verify the web application server certificate. QBWC1051: The new application was not added"
QuickBook throws the 1048 error because it is unable to complete a GET request at the AppURL that specified QBFS.qwc file. This is because test.developer.intuit.com restricts GET requests via the SOAP API.
To get around this, include a parameter in the .qwc file, and set it to the same value as your AppURL without the URL path.
For example, if your AppURL is https://mycompany.cs1.force.com/services/Soap/class/myApiClass, then set CertURL to https://mycompany.cs1.force.com.
This is the solution suggested by the QBWC log file, and it worked for me.
Reference URL
I found I had this problem because my software was trying to load the file
http://developer.intuit.com/uploadedFiles/Support/QBWebConnectorSvc.wsdl
which no longer exists. :(
So I got a WSDL from
https://test.developer.intuit.com/QBWC/TroubleshootWebServiceFS/Service.asmx?wsdl
and put it in my Site's root directory, then changed my code to point there, and it worked.

How to fix "invalid Web Uri" for Powershell Register-PSRepository?

A few weeks ago this error started popping up.
Set-PSRepository : The specified Uri 'http://*****' for parameter
'SourceLocation' is an invalid Web Uri.
Please ensure that it meets the Web Uri requirements.
I'm not sure how to fix this short of uninstalling Powershell. There is a workaround available on StackOverflow but it's clunky and will not work for me long term.
Frankly I'd rather just find where the PSRepositories are stored and edit the files manually when I need to.
The answer to this other question should help: Invalid Web Uri error on Register-PSRepository
It involves registering the repository using a local path first, then updating it to point to the URL.
Had the same issue,
for me it was an expired certificate at my own repostitory. Exchanged the certificate and the error was gone.

An internal error has occurred. The application may still be initializing or the URL used is invalid

When I try opening the dashDB console from Bluemix, I occasionally get the following error message:
An internal error has occurred. The application may still be
initializing or the URL used is invalid. Check the URL and try again.
For more information, view the server log files.
How can I fix this?
The problem seems to be a cookie caching issue.
Get the domain name from the browser window that is displaying the error message. E.g. awh-yp-small02.services.dal.bluemix.net
Open cookie page, for example in firefox:
Search for cookies with the YOUR domain name from step 1.
Select all those cookies and delete them by clicking the 'Remove Selected' button.
You should be able to launch now.
WARNING: the above worked for me, but use the above advice at your own risk.

Coldfusion FarCry CMS error on start up after server reboot

We're using Farcry CMS which runs on top of ColdFusion. Site was running fine but we are getting this error message after a web server reboot.
"Failed to initialise core type: dmHTML.cfc"
"Parameter 1 of function IsDefined, which is now application.stcoapi.dmHTML.stWebskins.Copy of displayPageCalculatorSelector.displayname, must be a syntactically valid variable name."
Really not sure where to start, could anyone suggest a strategy for troubleshooting this type of error.
Looks like you have a file called "Copy of displayPageCalculatorSelector.cfm" in your dmHTML webskin folder.
Remove this file is the best option.
Or rename it and remove the spaces, e.g. "Copy_of_displayPageCalculatorSelector.cfm"