The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was 'NTLM'.

when i connect to wcf service , i am getting the client authentication error.
It happens only when i connect to wcf service from a client machine (virtual machine) that is logged in with local user account.
Wcf service is hosted as windows service in my case.
Client application is a windows application that connects using below security mode.
BasicHttpBinding httpbind = new BasicHttpBinding();
httpbind.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly;
httpbind.Security.Transport.ClientCredentialType = HttpClientCredentialType.Ntlm;
httpFactory.Credentials.Windows.AllowedImpersonationLevel
                                = System.Security.Principal.TokenImpersonationLevel.Impersonation;
Please help me with a solution.
As i read more through below link , i doubt if the client is not in the same domain, it might not work ? is it rite.
http://blogs.msdn.com/b/chiranth/archive/2013/09/21/ntlm-want-to-know-how-it-works.aspx
Regards Battech

https://msdn.microsoft.com/en-us/library/windows/desktop/aa378749%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
Well, you need to figure out what the authentication is supposed to be bettwen the WCF client and WCF service, because Windows Authentication is being rejected.

Similar Messages

  • OfficialFile.asmx The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'. ERROR

    We are getting an error on the authentication piece when trying to submit a file to the OfficialFile.asmx web service to submit a document to the Drop-Off Library. Here is the code snippet -
    public string FileUpload(HttpPostedFile FileInput, RecordsRepositoryProperty[] properties)
    string strFileUrl = string.Empty;
    RecordsRepositorySoapClient repository = new RecordsRepositorySoapClient();
    BinaryReader b = new BinaryReader(FileInput.InputStream);
    byte[] binData = b.ReadBytes(FileInput.ContentLength);
    repository.ClientCredentials.Windows.ClientCredential = new System.Net.NetworkCredential(iUserID, iUserPassword, iUserDomain);
    repository.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;
    repository.SubmitFile(binData, properties, null, FileInput.FileName, HttpContext.Current.User.Identity.Name);
    strFileUrl = repository.GetFinalRoutingDestinationFolderUrl(properties, null, FileInput.FileName).Url;
    return strFileUrl;
    Although we are setting the network credential in the client call we still get the error
    - The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'.
    Ideas?
    Thanks in advance.

    Hi,
    Based on the error message, the issue is related to the authentication type.
    I suggest you can specify the credential type like the below:
    CredentialCache credentialCache = new CredentialCache();
    NetworkCredential credentials = new NetworkCredential(UserName, PassWord, sDomain);
    credentialCache.Add(new Uri(recordCenterUrl), "NTLM", credentials);
    Here is a detailed code demo for your reference:
    http://blogs.msdn.com/b/mcsnoiwb/archive/2011/06/06/sending-files-to-a-record-center-using-the-sp2010-webservice-officialfile-asmx.aspx
    Best Regards
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jerry Guo
    TechNet Community Support

  • The HTTP Request is unauthorized with client authentication scheme negotiate - MDS Excel Plugin error

    Hi,
    Some users in my company are experiencing a strange issue when connecting to our MDS server using the MDS Excel plugin. They receive the error message:
    "The HTTP Request is unauthorized with client authentication scheme negotiate. The authentication header received from the server was "NTLM,BASIC real="DOMAIN NAME IWA"
    They are receiving this error when first trying to connect. For some reason they only receive this error when connected to the work network via the VPN. They don't receive this error from within our network.
    Does anyone know what might be causing this issue and how to resolve?
    Many Thanks,
    Phil

    Try the following links and see if it helps:
    https://support.microsoft.com/en-us/kb/896861/
    https://social.technet.microsoft.com/Forums/projectserver/en-US/912c7179-8858-4c48-a71d-d9a21ff10a1b/the-http-request-is-unauthorized-with-client-authentication-scheme-ntlm-the-authentication?forum=project2010custprog
    -Nithesh Shetty Software Engineer, C & E -> IMML -> MDS, Microsoft.

  • HI,,,,, i HAVE USED THE SITE CALLED OUTPERSONALS FOR SOMETIME BUT CANNOT CONNECT ANYMORE EVEN THROUGH EMAILS RECEIVED FROM THE SITE ,,, ANYBODY THERE HAVE SUGGESTIONS PLEASE ,,, THANK YOU ,,,

    used the site lots in the past but it now says its insecure site
    and wont connect me

    Hi Ken,
    Wow, I've logged into adobe and never seen your response until now.
    I need to make the forums more of a daily stop I guess.
    Thank you for your response, When I go to the Archives, it states I have none. In addition, previously when I'd tried to move items to the archive, they just disappeared  
    Currently my desktop is not connecting at all, Everytime I connect, it's states "We have now logged you out" and requests I login again.
    I have of course rebooted,
    Gone into taskmanager, killed all the relevant threads,  tried again to login through the desktop, no luck, I'll have to uninstall it, make sure the threads are killed, then reboot it and then reinstall it, but I've not had the time to do that.
    On another note, and just as a point of reference, myself, personally, I hate these "cloud" file repositories (not to be confused with adobe cloud services which I love) but the file repositories themselves imho, are a blackhole of resource usage when one doesn't/isn't using them,
    Is there a way we can use it more of a "ftp" sort of thing, when I want to I can  put files there?  There is no way to "Download" the repository, no way to download the folders.. only individual files and then it takes I think three different steps before the download starts.. I find this very inhibiting.  Just an fyi. for what it's worth.
    Please, feel free to contact me,
    I'm on g+ chat [email protected]

  • Autoscaling Application block for Azure worker role console app not working. Get error as The HTTP request was forbidden with client authentication

    I have written a console application to test the WASABi(AutoScaling Application Block) for my worker role running in azure. The worker role processes the messages in the queue and I want to scale-up based on the queue length. I have configured and set the
    constraints and reactive rules properly. I get the following error when I run this application.
    [BEGIN DATA]{}
        DateTime=2013-12-11T21:30:02.5731267Z
    Autoscaling General Verbose: 1002 : Rule match.
    [BEGIN DATA]{"EvaluationId":"4f9f7cb0-fc0d-4276-826f-b6a5f3ea6801","MatchingRules":[{"RuleName":"default","RuleDescription":"The default constraint rule","Targets":["AutoscalingWebRole","AutoscalingWorkerRole"]},{"RuleName":"ScaleUpOnHighWebRole","RuleDescription":"Scale
    up the web role","Targets":[]},{"RuleName":"ScaleDownOnLowWebRole","RuleDescription":"Scale down the web role","Targets":[]},{"RuleName":"ScaleUpOnHighWorkerRole","RuleDescription":"Scale
    up the worker role","Targets":[]},{"RuleName":"ScaleDownOnLowWorkerRole","RuleDescription":"Scale down the worker role","Targets":[]},{"RuleName":"ScaleUpOnQueueMessages","RuleDescription":"Scale
    up the web role","Targets":[]},{"RuleName":"ScaleDownOnQueueMessages","RuleDescription":"Scale down the web role","Targets":[]}]}
        DateTime=2013-12-11T21:31:03.7516260Z
    Autoscaling General Warning: 1004 : Undefined target.
    [BEGIN DATA]{"EvaluationId":"4f9f7cb0-fc0d-4276-826f-b6a5f3ea6801","TargetName":"AutoscalingWebRole"}
        DateTime=2013-12-11T21:31:03.7516260Z
    Autoscaling Updates Verbose: 3001 : The current deployment configuration for a hosted service is about to be checked to determine if a change is required (for role scaling or changes to settings).
    [BEGIN DATA]{"EvaluationId":"4f9f7cb0-fc0d-4276-826f-b6a5f3ea6801","HostedServiceDetails":{"Subscription":"psicloud","HostedService":"rmsazure","DeploymentSlot":"Staging"},"ScaleRequests":{"AutoscalingWorkerRole":{"Min":1,"Max":2,"AbsoluteDelta":0,"RelativeDelta":0,"MatchingRules":"default"}},"SettingChangeRequests":{}}
        DateTime=2013-12-11T21:31:03.7516260Z
    Autoscaling Updates Error: 3010 : Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling.ServiceManagement.ServiceManagementClientException: The service configuration could not be retrieved from Windows Azure for hosted service with DNS prefix 'rmsazure'
    in subscription id 'af1e96ad-43aa-4d05-b3f1-0c9d752e6cbb' and deployment slot 'Staging'. ---> System.ServiceModel.Security.MessageSecurityException: The HTTP request was forbidden with client authentication scheme 'Anonymous'. ---> System.Net.WebException:
    The remote server returned an error: (403) Forbidden.
       at System.Net.HttpWebRequest.GetResponse()
       at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
       --- End of inner exception stack trace ---
    Server stack trace: 
       at System.ServiceModel.Channels.HttpChannelUtilities.ValidateAuthentication(HttpWebRequest request, HttpWebResponse response, WebException responseException, HttpChannelFactory`1 factory)
       at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory`1 factory, WebException responseException, ChannelBinding channelBinding)
       at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
       at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    If anyone know why I am getting this anonymous access violation error. My webrole is secured site but worker role not.
    I appreciate any help.
    Thanks,
    ravi
      

    Hello,
    >>: The service configuration could not be retrieved from Windows Azure for hosted service with DNS prefix 'rmsazure' in subscription id **************
    Base on error message, I guess your azure service didn't get your certificate and other instances didn't have certificate to auto scale. Please check your upload the certificate on your portal management. Also, you could refer to same thread via link(
    http://stackoverflow.com/questions/12843401/azure-autoscaling-block-cannot-find-certificate ).
    Hope it helps.
    Any question or result, please let me know.
    Thanks
    Regards,
    Will 
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • The MAC signature found in the HTTP request '***' is not the same as any computed signature. Server used following string to sign: 'POST

    Hi,
    When trying with Postman sending a REST call to Azure Storage Queues I get:
    The MAC signature found in the HTTP request '***' is not the same as any computed signature. Server used following string to sign: 'POST.
    The code I have for creating the Authorization Header:
    var accountName = "my_account";
    string key = ConfigurationManager.AppSettings["my_access_key"];
    DateTime dt = DateTime.Now;
    string formattedDate = String.Format("{0:r}", dt);
    var canonicalizedHeaders = "x-ms-date:" + formattedDate + "\n" + "x-ms-version:2009-09-19" + "\n" ;
    var canonicalizedResource = "/my_account/myqueue/messages";
    var stringToSign = String.Format("POST,\n\n\n\n\n\n\n\n\n\n\n{0}{1}", canonicalizedHeaders, canonicalizedResource);
    stringToSign = HttpUtility.UrlEncode(stringToSign);
    HMACSHA256 hmac = new HMACSHA256(Encoding.UTF8.GetBytes(key));
    var signature = Convert.ToBase64String(hmac.ComputeHash(Encoding.UTF8.GetBytes(stringToSign)));
    var authorizationHeader = String.Format(CultureInfo.InvariantCulture, "SharedKey {0}:{1}", accountName, signature);
    return authorizationHeader;
    Anyone any idea what I'm missing/doing wrong?
    Additional question: do i have to create for every message I want to send a new Authorization header? Or is there an option (as with Service Bus Topics) to create a header that can be used for a certain timeframe?
    Thanks.

    One issue is with this line of code:
    HMACSHA256 hmac = new HMACSHA256(Encoding.UTF8.GetBytes(key));
    Please use the following:
    HMACSHA256 hmac = new HMACSHA256(Convert.FromBase64String(key));
    and that should take care of the problem.
    Regarding your question, "do i have to create for every message I want to send a new Authorization header? Or is there an option (as with Service Bus Topics) to create a header that can be used for a certain timeframe?"
    With your current approach, the answer is yes. What you can do is create a Shared Access Signature on the queue which will be valid for certain duration and then use that for posting messages to a queue using simple HttpWebRequest/HttpWebResponse.
    Hope this helps.

  • How to transfer the http request from applet to servlet/jsp

    I use the JTree component to create a navigation of a website,but i don't
    know how to connect the tree's nodes with the jsp/servlet.
    I mean how to transfer the http request from the applet to a jsp.
    I use the "<frameset>" mark which will divide the web browse into 2 blocks.
    The left side is Applet,and the right side is the linked jsp page.
    what I say is as the weblogic console layout.
    who can help me!!!
    Thank You!

    I use the JTree component to create a navigation of a website,but i don't
    know how to connect the tree's nodes with the jsp/servlet.
    I mean how to transfer the http request from the applet to a jsp.
    I use the "<frameset>" mark which will divide the web browse into 2 blocks.
    The left side is Applet,and the right side is the linked jsp page.
    what I say is as the weblogic console layout.
    who can help me!!!
    Thank You!

  • SBL-ODU-01007 - The HTTP request did not contain a valid SOAPAction header

    I am trying to insert a Lead using the following XML
    SOAPAction: "document/urn:crmondemand/ws/ecbs/lead/10/2004:LeadInsert"
    URL: https://secure-ausomxbia.crmondemand.com/Services/Integration
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ns2="urn:crmondemand/ws/ecbs/lead/10/2004" xmlns:ns3="urn:/crmondemand/xml/Lead/Data">
    <env:Header>
    <ns1:Security>
    <ns1:UsernameToken>
    <ns1:Username>****</ns1:Username>
    <ns1:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">****</ns1:Password>
    </ns1:UsernameToken>
    </ns1:Security>
    </env:Header>
    <env:Body>
    <ns2:LeadInsert_Input>
    <ns3:ListOfLead lastpage="true" recordcount="1">
    <ns3:Lead>
    <ns3:ExternalSystemId>3232323</ns3:ExternalSystemId>
    <ns3:LeadFirstName>soap</ns3:LeadFirstName>
    <ns3:LeadLastName>test</ns3:LeadLastName>
    </ns3:Lead>
    </ns3:ListOfLead>
    <ns2:Echo>off</ns2:Echo>
    </ns2:LeadInsert_Input>
    </env:Body>
    </env:Envelope>
    I am getting following response.
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <soap:Fault>
    <faultcode>soap:Client</faultcode>
    <faultstring>Client</faultstring>
    <detail>
    <ErrorCode>SBL-ODU-01007</ErrorCode>
    <ErrorMessage>The HTTP request did not contain a valid SOAPAction header. The value of the header was </ErrorMessage>
    </detail>
    </soap:Fault>
    </soap:Body>
    </soap:Envelope>
    I have checked the URL and SOAPAction seem to be correct, can somebody please let me know what can be the problem.
    Thanks.

    I am trying to insert a Lead using the following XML
    SOAPAction: "document/urn:crmondemand/ws/ecbs/lead/10/2004:LeadInsert"
    URL: https://secure-ausomxbia.crmondemand.com/Services/Integration
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ns2="urn:crmondemand/ws/ecbs/lead/10/2004" xmlns:ns3="urn:/crmondemand/xml/Lead/Data">
    <env:Header>
    <ns1:Security>
    <ns1:UsernameToken>
    <ns1:Username>****</ns1:Username>
    <ns1:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">****</ns1:Password>
    </ns1:UsernameToken>
    </ns1:Security>
    </env:Header>
    <env:Body>
    <ns2:LeadInsert_Input>
    <ns3:ListOfLead lastpage="true" recordcount="1">
    <ns3:Lead>
    <ns3:ExternalSystemId>3232323</ns3:ExternalSystemId>
    <ns3:LeadFirstName>soap</ns3:LeadFirstName>
    <ns3:LeadLastName>test</ns3:LeadLastName>
    </ns3:Lead>
    </ns3:ListOfLead>
    <ns2:Echo>off</ns2:Echo>
    </ns2:LeadInsert_Input>
    </env:Body>
    </env:Envelope>
    I am getting following response.
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <soap:Fault>
    <faultcode>soap:Client</faultcode>
    <faultstring>Client</faultstring>
    <detail>
    <ErrorCode>SBL-ODU-01007</ErrorCode>
    <ErrorMessage>The HTTP request did not contain a valid SOAPAction header. The value of the header was </ErrorMessage>
    </detail>
    </soap:Fault>
    </soap:Body>
    </soap:Envelope>
    I have checked the URL and SOAPAction seem to be correct, can somebody please let me know what can be the problem.
    Thanks.

  • SBL-ODU-01008 The HTTP request did not contain well-formed XML.

    I am trying to invoke the activity webservice using Msxml2.XMLHTTP.4.0 through PowerBuilder...
    I receive the following error when executing the code below: SBL-ODU-01008 The HTTP request did not contain well-formed XML.
    ls_post_url = "https://secure-ausomxxxx.crmondemand.com/Services/Integration/Activity;"
    ls_response_text = "jsessionid=" + sesId + ";"
    ls_post_url = ls_post_url + ls_response_text
         loo_xmlhttp.open ("POST",ls_post_url, false)
    // loo_xmlhttp.setRequestHeader("Content-Length", 200 )      
    // loo_xmlhttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8" )      
    // loo_xmlhttp.setRequestHeader("Accept", "text/xml" )           
    // loo_xmlhttp.setRequestHeader("COOKIE", left(cookie,pos(cookie,";",1)-1) )
    //     loo_xmlhttp.setRequestHeader("COOKIE", left(cookie,pos(cookie,";",1)-1) )
         ls_post_url2 = "document/urn:crmondemand/ws/ecbs/activity/10/2004:ActivityQueryPage"
         loo_xmlhttp.setRequestHeader("SOAPAction", ls_post_url2)     
         loo_xmlhttp.send()
    If I uncomment the setRequestHeader info, then I get a different error:
    ls_post_url = "https://secure-ausomxxxx.crmondemand.com/Services/Integration/Activity;"
    ls_response_text = "jsessionid=" + sesId + ";"
    ls_post_url = ls_post_url + ls_response_text
         loo_xmlhttp.open ("POST",ls_post_url, false)
    loo_xmlhttp.setRequestHeader("Content-Length", 200 )      
    loo_xmlhttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8" )      
    loo_xmlhttp.setRequestHeader("Accept", "text/xml" )           
    loo_xmlhttp.setRequestHeader("COOKIE", left(cookie,pos(cookie,";",1)-1) )
         loo_xmlhttp.setRequestHeader("COOKIE", left(cookie,pos(cookie,";",1)-1) )
         ls_post_url2 = "document/urn:crmondemand/ws/ecbs/activity/10/2004:ActivityQueryPage"
         loo_xmlhttp.setRequestHeader("SOAPAction", ls_post_url2)     
         loo_xmlhttp.send()
    SBL-ODU-01007 The HTTP request did not contain a valid SOAPAction header. The value of the header was
    I am unsure what I am missing in order to invoke the web service. If anyone can help I would truly appreciate it.
    Thanks

    Hi,
    I tried the SOAP request you provided and got a different error response:
    <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Client</faultstring><detail><ErrorCode>SBL-ODU-01008</ErrorCode><ErrorMessage>The HTTP request did not contain well-formed XML. An attempt to parse it produced the following error: Unsupported wsse:Password Type. Valid Value: http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText</ErrorMessage></detail></soap:Fault></soap:Body></soap:Envelope>
    After changing the Password Type from:
    Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wssusername-token-profile-1.0#PasswordText">hijklmno</wsse:Password>
    to:
    Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">hijklmno</wsse:Password>
    The request was successful.
    Please let me know if this resolves your issue.
    Thanks,
    Sean
    <?xml version='1.0' encoding='ISO-8859-1'?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header>
    <wsse:Security
    xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
    soapenv:mustUnderstand="1">
    <wsse:UsernameToken>
    <wsse:Username>abcdefg</wsse:Username>
    <wsse:Password
    Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">hijklmno</wsse:Password>
    </wsse:UsernameToken>
    </wsse:Security>
    </soapenv:Header>
    <soapenv:Body>
    <q0:ContactWS_ContactQueryPage_Input
    xmlns:q0="urn:crmondemand/ws/contact/">
    <q1:ListOfContact xmlns:q1="urn:crmondemand/xml/Contact/Query">
    <Contact>
    <ContactType>='Customer'</ContactType>
    <ContactFirstName>='Fred'</ContactFirstName>
    <IntegrationId />
    </Contact>
    </q1:ListOfContact>
    </q0:ContactWS_ContactQueryPage_Input>
    </soapenv:Body>
    </soapenv:Envelope>
    Edited by: Sean Duffy on Jun 4, 2010 9:38 AM

  • Problem with HTTPS requests to host with untrusted server certificate

    Hi,
    I develop an iPhone framework which sends HTTPS requests in order to communicate with a publicly available backend server. Currently I have a big problem regarding untrusted server certificates.
    The certificate of the backend server is not signed by a trusted CA, so my first approach was to use NSURLRequest's private allowsAnyHTTPSCertificateForHost. While this worked as expected an was fine as temporary workaround, our customer demands a clean solution as final result. Therefore I wrote a method which allows to install a provided certificate from the file system in the keychain, but this method does not work as expected in the iPhone Simulator. The certificate is installed in the host machine's Mac OS X keychain instead. Unfortunately, if I call NSURLConnection's sendSynchronousRequest method, I retrieve an "untrusted server certificate" error. It seems as if NSURLConnection is not able to access the host's Mac OS X keychain to retrieve the certificate.
    Is my guess correct or did I miss something?
    Would my approach work if I ran my app on a real iPhone device instead (I do not have one available yet)?
    Does there exist a keychain in the iPhone Simulator at all?
    Is it at all possible to send HTTPS requests to a server with an untrusted certificate on the iPhone Simulator or do I have to use precompiler directives to implement different routines depending on the underlying platform (simulator or device, respectively)?
    Any help is highly appreciated.
    Thanks,
    Matthias

    Indeed this would be a clean and simple solution. But our customer is not willing to get a real certificate, for whatever reasons.
    The question that remains is if the HTTPS requests would succeed on the iPhone device itself if the server certificate was installed in the keychain by the same app beforehand.

  • Watch the http request a programm sends

    Hello
    I want to write a SOAP-Request to a HttpURLConnection Object.
    public static void main(String[] args)
              InputStream is;
              String[] mess = {"<?xml version=\"1.0\" encoding=\"utf-8\"?>",
                        "<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">",
                        "<soap:Body>",
                        "<GetSlideData xmlns=\"http://tempuri.org/\" />",
                        "</soap:Body>",
                        "</soap:Envelope>"};
              try {
                   URL url = new URL("http://localhost:4351/SlideService/Service.asmx?op=GetSlideData");
                   HttpURLConnection urlcon = (HttpURLConnection)url.openConnection();
                   urlcon.setRequestMethod("POST");
                   urlcon.setDoOutput( true );
                   urlcon.connect();
                   OutputStream out = urlcon.getOutputStream();
                   for(int i = 0; i < mess.length; i++)
                        for(int j = 0; j < mess.length(); j++)
                             out.write((int)mess[i].charAt(j));
                   out.close();
                   urlcon.toString();
                   is = urlcon.getInputStream();
                   System.out.println("ContentType: " + urlcon.getContentType());
    catch (Exception e)
                   e.printStackTrace();
    When I start this program i get a:
    Server returned HTTP response code: 415 for URL: http://localhost:4351/SlideService/Service.asmx?op=GetSlideData
    The request should look like this:POST /SlideService/Service.asmx HTTP/1.1
    Host: localhost
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    SOAPAction: "http://tempuri.org/GetSlideData"
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <GetSlideData xmlns="http://tempuri.org/" />
    </soap:Body>
    </soap:Envelope>
    I'm looking for a tool or a way to see the http request, that the application does send.
    Does someone have an idea how to do this?
    Kind regards,
    ClaudeMichelle                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Using netcat to listen on that port, receive the connection and log the output
    $ nc -l 4351 > output.log &the output is
    POST /SlideService/Service.asmx?op=GetSlideData HTTP/1.1
    User-Agent: Java/1.6.0_16
    Host: localhost:4351
    Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
    Connection: keep-alive
    Content-type: application/x-www-form-urlencoded
    Content-Length: 290
    <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><GetSlideData xmlns="http://tempuri.org/" /></soap:Body></soap:Envelope>maybe you wanted
                    String[] mess = {"<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n",
                                    "<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\r\n",
                                    "\t<soap:Body>\r\n",
                                    "\t\t<GetSlideData xmlns=\"http://tempuri.org/\" />\r\n",
                                    "\t</soap:Body>\r\n",
                                    "</soap:Envelope>\r\n"};which produces
    POST /SlideService/Service.asmx?op=GetSlideData HTTP/1.1
    User-Agent: Java/1.6.0_16
    Host: localhost:4351
    Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
    Connection: keep-alive
    Content-type: application/x-www-form-urlencoded
    Content-Length: 306
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
            <soap:Body>
                    <GetSlideData xmlns="http://tempuri.org/" />
            </soap:Body>
    </soap:Envelope>Not that cr-nl should matter in the request body.

  • I want to schedule my back ups to my Western Digital Elements HDD so that it doesn't interfere with my Skype calls with clients. Operating system - version 10.7.4. The default for Time Machine is to back up every 1 hour. I'd like daily at 3am. Any ideas?

    I want to schedule my back ups to my Western Digital Elements HDD so that it doesn't interfere with my Skype calls with clients. Operating system - version 10.7.4. The default for Time Machine is to back up every 1 hour. I'd like daily at 3am. Any ideas?

    Time Machine Editor.
    Clinton

  • Keeping getting an error with-in the App Store. Error 100 saying that my payment can't be received at the time. I updated to Mountain Lion to download the new Logic Pro X. Now left with now recording software and it's not letting me buy the new one.

    Keeping getting an error with-in the App Store. Error 100 saying that my payment can't be received at the time. I updated to Mountain Lion to download the new Logic Pro X. Now left with now recording software and it's not letting me buy the new one.
    iMac, OS X Mountain Lion (10.8.4), trying to get Logic Pro X

    Hello jst84,
    The following article may be helpful in getting your purchase to complete.
    Mac App Store: "An unknown error occurred (100)" when purchasing
    http://support.apple.com/kb/TS3637
    Cheers,
    Allen

  • Hi, I godt 2 Questions: 1) My Adobe PhotoShop Elements 10.0 for MAC cannot read the RAW files taken with the new Canon 7D Mark II camera. 2) My Photoshop Elements has changed from the danish language to german language, how do I put this back ?

    Hi, I godt 2 Questions: 1) My Adobe PhotoShop Elements 10.0 for MAC cannot read the RAW files taken with the new Canon 7D Mark II camera. 2) My Photoshop Elements has changed from the danish language to german language, how do I put this back ?

    You're in the wrong forum.  This is not the Elements forum.
    Here's the link to the forum you want:
    https://forums.adobe.com/community/photoshop_elements/content

  • My phone doesnt show incoming call and it doesnt ring. Further the iphone4 is extremely slow with opening whats app, camera and photos or while in the program it just closets. Who can advice me what to do??? Otherwise this phone will be changed soon

    My phone doest ring with incoming calls, but it also doesnt show someone is calling. I only see it, when i get the txt of missed calls.
    Further the phone is extremely slow with opening whats app, emails, photos, camera and it closets the programs while using it.
    I have many people around me with iPhone having the same complaints, but nothing has changed yet.
    Please Apple solve this quickly otherwise the iPhone i enjoyed so much will be remplaceren with a Samsung

    esme43 wrote:
    ...  the phone is extremely slow with opening whats app, emails, photos, camera and it closets the programs while using it.
    See this discussion...
    https://discussions.apple.com/message/23731048#23731048

Maybe you are looking for

  • File from AFP volume vanished!

    I had a user yesterday attempt to modify the name of an InDesign CS3 file she had been working on a shared volume and it just disappeared on her. She stated that there was a error "30 or something" and then the file just disappeared. I did a search m

  • Safari save as window opens larger than screen size and I can't get to the

    In safari, I choose File -> Save As. The save dialogue window is taller than my screen and the buttons get buried under my bottom toolbar. I can't reach the save buttons and I can't seem to reach the right hand corner to manual resize it. I've tried

  • SubmitEditData() - redirect fails...

    Hi, I've got a weird error. In the portlet customization code (JSP) I call the PortletRendererUtil.submitEditData() method. I managed to get it work before, and does work for all my other portlets, but doesn't for the recent one. Although, all the cu

  • Resending the Mesage in Message Monitoring is failed again & again

    H i !  All In Scenario Idoc to File , the connectivity between XI server & FTP  was down , Now is up , a message is failed , now again i am  re-sending the message from Message Monitoring , showing the belolw error , FTP Connection is UP now  , in SX

  • Help Required in Pro*C

    Hi all, In Proc*C, is it possible to pass Array of type varchar2,char or Integer as parameters to a procedure? If yes, Pls. give an example or any other reference site. Purpose : Suppose I have an array which is already populated, I want to send that