This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Certificate was issued by an unrecognized Entity
I am developing a little J2ME application that will read our grades from our university's server. With Desktop Applications, It is fine, I can do it but in J2ME, it always gives me this error, even I use well-known services like HTTPS Google, I still get the same error.
urlConn = (HttpsConnection) Connector.open("https://stars.bilkent.edu.tr/srs/ajax/login.php");
urlConn.setRequestMethod(HttpsConnection.POST);
urlConn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
o = urlConn.openOutputStream();
// Sending my POST requests to server
input = urlConn.openDataInputStream();
In the last line I always get the error I mentioned above. What should I do about it?
Anyways, the problem is with the J2ME Emulator, Works perfect on the phone.
Related
This question already has answers here:
Where i can obtain client secret for my Universal app?
(2 answers)
Closed 6 years ago.
I'm following this guide (msdn.microsoft.com/library/windows/apps/hh465407) to implement push notifications on my app, but it seems to be outdated since I can't find the client secret as shown in this image (https://msdn.microsoft.com/dynimg/IC737349.png).
If I try to register using the password i can generate at (https://apps.dev.microsoft.com), I get an error message.
Request:
POST /accesstoken.srf HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Host: https://login.live.com
grant_type=client_credentials&client_id=ms-app%3a%2f%2fS-1-15-2-3747961549-[...]&client_secret=[???]&scope=notify.windows.com
Response:
{
"error": "invalid_client",
"error_description": "Invalid client secret"
}
So, where to find this client secret?
You must login into the microsoft dev dashboard, create a new app (you don't have to load a .xap file, you just need to put in a name and all those stuffs...)
After that, click on the app you just created: on the left, select "services" from the menu and then click on the "push notification" link.
Finally, on the page you will see now, click the "live services website" link that you will see on the second text paragraph. you should now see a page with your secret code.
let me know if you resolved the problem, cheers!
I have an IOS App that sends HTTPS request to a server, using NSURLConnection, it works without any issue.
Now, I'm trying to put this App on OSX and to reuse code from the IOS App. It's the first time I'm developing on OSX, so I'm a beginner ;-)
My OSX get an exception when I'm sending my first HTTPS requests (using Post), the exception is about NSURLConnectionLoader (it ends at libc++abi.dylib __cxa throw and it seems it has been raised due to security issue Security::KeyChainCore...).
Next, on the debugger, if I click many times on continue, the request is successfully sent and I'm get the correct answer from the server.
The following requests that are sent are working fine (no exceptions), only the first one has issues.
Any idea? Any differences between OSX and IOS for NSURLConnection?
Thanks for the help,
Sebastien.
I have been using Google Places API inside my application. The client code is written in Java. It was working fine till couple of weeks ago and suddenly it started throwing following exceptions while making API call:
javax.net.ssl.SSLException: hostname in certificate didn't match: <maps.googleapis.com/209.85.175.95> != <*.googleapis.com> OR <googleapis.com> OR <*.googleapis.com>
I am using following URL for making API call : https://maps.googleapis.com/maps/api/place/search/json?
Also tried with different Google API keys generated from Google API console.
Can someone please point what I am missing here?
Many thanks
I used the latest Google API (version 1.13.2) which support better SSL options:
ApacheHttpTransport.Builder transport = new ApacheHttpTransport.Builder().doNotValidateCertificate().build();
I'm working with WebClient for some time now. (using the Mango SDK)
Each time I have an error, the error message is always "Not Found". Either the error is due to login problem, server or page not found. Any error code >= 400 cause the same Exception with the same message and no data.
I tried to use the WebRequest/WebResponse but it seems the problem is always the same.
I mean, I know how to write it correctly in C# (for desktop), but on windows phone, I have no way to access the error code nor the response body.
I found many posts talking about the problem, but no solutions are pointed.
Does anyone have a solution or a workaround (even a dirty one...) I'm open to any suggestion.
That (very misleading) error is often caused by an underlying HTTP error.
If you are using HTTPS, it could be because it's a self-signed (or otherwise unsupported) certificate. You can temporarily get around this by emailing the certificate to an account on the phone, but this won't fly in the marketplace.
If the requests aren't HTTPS, you can run Fiddler to find out what the underlying error is. (Pro tip: The WP emulator will only the use Fiddler if Fiddler was running when it started up so you may have to close it down).
To access the data, you need to get the WebException (it may be the InnerException of what is being thrown) and then you can access the Response
I am trying to implement Google Check out (GCO) on a new server, the process seemed to work fine on the old server.
The error from GCO integration console is the timeout error you might expect if there is load on the server and/or the response takes longer than 3 seconds to respond.
To perform a test (not integrating with my database), I have set some code to send an email to me instead. If I hit the https url manually, I get the email and I can see an output to the screen. If I then leave it as that, Google still returns the Timeout error and I don't get an email. So I have doubts as to whether google is even able to hit the https url.
I did temporarily attempt to use the unsecure url for testing and indeed I received the email, however this solution isn't the route we've developed for, so the problem is something to do with the secure url specifically.
I have looked into the certificate which is a UTN-USERFirst-Hardware which is listed as accepted on http://checkout.google.com/support/sell/bin/answer.py?answer=57856 . I have also tried to temporarily disable the firewall with no joy. Does anyone have any sugestions?
Good to hear you figured out the problem.
I'm adding the links below to add a litle more context for future readers about how Google Checkout uses HTTP Basic Authentication:
http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API.html#urls_for_posting
http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API.html#https_auth_scheme
http://code.google.com/apis/checkout/developer/Google_Checkout_HTML_API_Notification_API.html#Receiving_and_Processing_Notifications