Unsupported key type: DSA Sun public key

Hi all

Does anyone know how to use the algorithm of SHA1withDSA with WSS4J/axis?

When you use a private key generated by the keytool with type DSA utility, I get errors:

org.apache.ws.security.WSSecurityException: cannot encrypt data
Caused by: java.security.InvalidKeyException: unsupported key type: Sun DSA public key

It seems I have generate the key using RSA type.

Kind regards
Alex

Published by: ao on 12-mar-2012 12:53

DSA (Digital Signature Algorithm) keys, by definition, can only be used for the digital signature and not for encryption. As EJP suggested, you must use the RSA key-type and the SHA1withRSA - I would recommend using SHA256withRSA - construct to allow the confidentiality of messages.

Arshad Noor
StrongAuth, Inc..

Tags: Java

Similar Questions

  • com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type:

    We have intermittent out of our 10.3 web service client errors when you call an external service.


    com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: text/html; charset = iso-8859-1 supported are: [application/soap + xml]
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:291)
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:128)
    at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:287)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:171)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:86)
    at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
    at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
    at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
    at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
    at com.sun.xml.ws.client.Stub.process(Stub.java:248)
    at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
    at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)


    It seems that the service we ask is having a problem. What we want to do is save the reply message, but weblogic web services moves upwards until it never happens to our code. How can we have weblogic 10.3 dump HTTP all response including all headers and payload so that we can see the exact message that the service is back? The invocation is via https, so we can simply sniff the packets.

    You can set the property system, com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump = true

    This will cause the HTTP request and response to print to the outside system.

    Your external service seems to return a web page and no SOAP. I've seen this happen under load when the remote server returns a page like: "the server is busy... try again later. ', etc..

    You control the remote service? Is - this WebLogic or something else?

  • HELP blackBerry Smartphones ' unsupported media type: application octet_stream "?

    I just installed OK icon for USA Today on my "BOLD". The icon is there, but when I select it, I get "unsupported media type: application octet_stream" or "unable to connect to the internet, try again later!" The internet is fine as can get in simply by enetring what URL and it penetrates very well. Just does not work when you use the icon. I'm on BES, just in case this has nothing to do with it. Help if anyone can, please. Also tried with the NYTimes icon and the same problem. Installs the icon but not during the selection there. Thank you

    Cool!
    I'm glad that you understood.
    Please solve the thread so that others can find your answer faster.
    Thank you

    Bifocals

  • After Effects 'unsupported file type .ffx.

    Import of text of deck 6 to AfterEffects CC2014 gives and error "unsupported file type .ffx.

    This is fixed in the 2014.2 effects after update (13.2), which is now available.

    Details here: http://adobe.ly/1IVopxh

  • AVCHD "unsupported compression type?

    I just moved a large project from one system to another and all of a sudden all the AVCHD media comes as offiline. Other media in the project that came until appears the .mov files fine.

    When I try to recreate a link to the missing clips, I get a dialog box "the file has an unsupported compression type. I created a test project and then I import AVCHD media and work with her on this system. But my initial project will not bind to the same media on the system.

    I also deleted the cache of media and multimedia data files. But that did not help either.

    Meanwhile, I can go back to the original system and the project and AVCHD files will be opened very well.

    Both systems are iMac i7 and media are accessible from a shared server which we used in this way without problem for 3 months.

    Anyone has any ideas on what could be happening?

    Any help would be LARGELY APPRECIATED!

    Thank you!

    Hi dkmiles,

    Create a folder say "TEST" in the same folder where you have all the AVCHD files. Move all files in the test folder, and then try linking again. Also, please mention if you have directory structure complete fo AVCHD clip or not.

    Kind regards

    Vinay

  • Failure to import a file; File has unsupported compression type!

    I finished my film of edition about two weeks ago did everything audio etc last week color correction and are intended to supplement the sutitling tomorrow!

    But now the problem is that my some of my files are now in offline mode and cannot be reprinted in the moment because I get an error message that says 'failure to import a file; File has unsupported compression type"

    These files are. MTS, which I believe are AVCHD.

    So I don't know what has happened here. What is the recent update that has caused this or something else?

    Move a clip in offline mode to another location and recreate a link

    Also species of media empty.

    And the first start-up in now shift + alt up to the Welcome screen.

    See if this will help.

  • YouTube "unsupported file Type"?

    I have the Sony BDP-S5100. It works very well for a few years, but yesterday all the apps disappeared from the home screen. I don't know how I got their back, but when they returned, suddenly every video in the application YouTube YouTube says "No file Type supported."

    It's strange because he has been working well for a long time and the application interface works fine as well. Anyone know what that is changed or a fix?

    Thank you

    Hello Electricman,

    Greetings and thanks for sharing your experience with us.  We would like to recommend to try to reset your device back to settings by default in following the underneath, by doing so, it will have to set the network connection and log back with your credentials on the applications used, also make sure that the unit is the latest version of the firmware available HERE:

    • Press the HOME button on the remote control while the unit is on.
    • Press the LEFT arrow until you select the CONFIGURATION icon.
    • Press the DOWN ARROW until you find the option called reset.
    • Press ENTER (button setting on the directional circle with arrows).
    • Select FACTORY RESET of FACTORY SETTINGS press ENTER.
    • Press the DOWN ARROW until you find all THEsettings, press ENTER.
    • Once you are back to the reset menu to select INITIALIZE of PERSONAL INFORMATION, press ENTER and choose START.
    • Turn off your Blu - ray player for 1 minute and turn it back on.
    • Complete the Initial installation process including the connection to the network.

    Follow these steps to update the list:

    Select the VIDEO icon via the HOME menu.
    Press the OPTIONS button.
    Accept the agreement if requested.
    Select the UPDATED LIST. (if it does not show press the arrow key down and emphasise the last option available under the VIDEO icon and then press the OPTION button)

    Once the applications are displayed once more, please try DNS settings manually through the network configuration as follows to improve network connectivity:

    To enter the primary DNS 8.8.8.8 and 8.8.4.4 secondary as suggested following the following steps:

    • Under the menu host press the LEFT ARROW until you select the SETUP
    • Select INTERNET SETTINGS, press ENTER.
    • Select built-in wireless, press ENTER.
    • Select NEW CONNECTION RECORD, press ENTER. (if applicable)
    • Selects the MANUAL RECORDING, press ENTER.
    • Make sure she has the SSID (name of your network) press the ARROW TO THE RIGHT to CONTINUE.
    • Press ARROW TO THE RIGHT to SKIP encryption type (WEP, WPA, etc.) as it should be already an option is selected.
    • Press the ARROW TO THE RIGHT toSKIP password entry.
    • Select MANUAL or CUSTOM, press ENTER.
    • Select NO for IPV6 to installation, press ENTER (if applicable)
    • Select MANUAL or CUSTOM for configureIPV4 , press ENTER.
    • Select AUTOMATIC for the IP address, press the ARROW TO THE RIGHT to CONTINUE.
    • Select SPECIFY for DNS settings, press ENTER.
    • Enter 8.8.8 primary DNS and secondary 8.8.4.4. Press ENTER.
    • Press the ARROW TO THE RIGHT to CONTINUE.
    • Select NO for proxy, ARROW TO THE RIGHT to CONTINUE.
    • Press the ARROW TO THE RIGHT to CONTINUE and select STORE AND CONNECT.
    • Set up your accounts according to the used applications, including your Amazon credentials.

    If my post answered your question, please mark it as "accept as a Solution.

  • Why the rich text editor shows unsupported data type?

    Hello

    I used the rich text editor in my application (for the message box). I used the data BLOB to the type. But, when I click on the button send it shows invalid hexadecimal number and also in back-end, it shows the data type not supported. Why is it so? Need your help.

    --

    Thank you.

    Venky_prs wrote:

    Thanks for the reply. I changed on the CLOB type. Now, the intervention process. But, in the back-end the message column contains HTML format. For this rich text editor, I used the source as the database column type. How can I get the actual message instead of the html format.

    Elements of the rich text editor are used to create HTML text. If you need/want data plain text, then use a Textarea base element.

  • .mts unsupported compression type

    I opened a first project today and for some reason, all the files on the timeline .mts were highlighted in red with a warning of "media disconnected". First of all, I thought that something happened to my hard drive but I quickly realized it wasn't the case. I tried to re - link all the .mts files but got "it's a compression type not supported" warning. I edited these files for the last 2 weeks and Premiere Pro CC 2015 had no problem recognizes them. Nobody knows what happened all of a sudden?

    Try to connect, and then again in the CC app.  Activation of codec is going sometimes wobbly.

  • THE FILE HAS AN UNSUPPORTED COMPRESSION TYPE

    Hello friends,

    I'm having a problem here in Premiere pro CS5. What's new in CS5 they said we can import DVD files format in first pro CS5 without convert them into any format, but when I import my files to DVD it gives me an error message saying that: THE FILE has a non supported COMPRESSION TYPE.

    Is there anyway that I can fix this? pls help me...

    They are on your hard drive (DVD case is begging for trouble)? What size are they? and what was the source you have to? If all else fails, simply convert em on (I hate work outside the standard formats).

    Too bad LOL asked the essential question...

    Post edited by: JaysonM-Y

  • Error: "the file has an unsupported compression type" importer still images

    Hello

    I have creative cloud subscription.  Try to import files I saved from Photoshop in first Pro CC tried save them as JPEG and TIFF, large and small files but is never able to import.  How can I fix this so I can use these images?

    Make sure they are RGB format and not in CMYK mode

    Jeff Pulera

    Safe Harbor computers

  • Invalid key exception: no type of key: public key RSA Sun, 1024 bits

    I'm trying to recover Microsoft Keystore certificates and extract its key using SunMSCAPI in the jdk 1.6. It gives me an exception for invalid key when I try to wrap the symmetric key (what was once to perform AES encryption on data), using the RSA algorithm.

    Code snippet:
               // RSA 1024 bits Asymmetric encryption of Symmetric AES key              
                // List the certificates from Microsoft KeyStore using SunMSCAPI.
                      System.out.println("List of certificates found in Microsoft Personal Keystore:");
    
                       KeyStore ks = KeyStore.getInstance("Windows-MY", "SunMSCAPI"); 
                       ks.load(null, null) ;
                       Enumeration en = ks.aliases() ;
                       PublicKey RSAPubKey = null;
                       Key RSAPrivKey = null;
                       int i = 0;
                       while (en.hasMoreElements()) {
                            String aliasKey = (String)en.nextElement() ;              
                            X509Certificate c = (X509Certificate) ks.getCertificate(aliasKey) ;     
                            String sss = ks.getCertificateAlias(c);
                            if(sss.equals("C5151997"))
                            {
                            System.out.println("---> alias : " + sss) ;
                            i= i + 1;
                            String str = c.toString();
                            System.out.println(" Certificate details : " + str ) ;
                          RSAPubKey = c.getPublicKey();
                            RSAPrivKey = ks.getKey(aliasKey, null);  //"mypassword".toCharArray()
                            Certificate[] chain = ks.getCertificateChain(aliasKey);     
                            }
                       }
                       
                       System.out.println("No of certificates found from Personal MS Keystore: " + i);
                    
                // Encrypt the generated Symmetric AES Key using RSA cipher      
                        Cipher rsaCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding", ks.getProvider().getName());            
                       rsaCipher.init(Cipher.WRAP_MODE, RSAPubKey);
                       byte[] encryptedSymmKey = rsaCipher.wrap(aeskey);    
                       System.out.println("Encrypted Symmetric Key :" + new String(encryptedSymmKey));
                       System.out.println("Encrypted Symmetric Key Length in Bytes: " + encryptedSymmKey.length);
                       
                       // RSA Decryption of Encrypted Symmetric AES key
                       rsaCipher.init(Cipher.UNWRAP_MODE, RSAPrivKey);
                       Key decryptedKey = rsaCipher.unwrap(encryptedSymmKey, "AES", Cipher.SECRET_KEY);
    Output:

    List of certificates in Microsoft personal Keystore:
    -> alias: C5151997
    Certificate details:]
    [
    Version: V3
    Object: CN = C5151997, O = SAP - AG, C = OF
    Signature algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5

    Key: Sun public key RSA 1024 bits
    modulus: 171871587533146191561538456391418351861663300588728159334223437391061141885590024223283480319626015611710315581642512941578588886825766256507714725820048129123720143461110410353346492039350478625370269565346566901446816729164309038944197418238814947654954590754593726047828813400082450341775203029183105860831
    public exponent: 65537
    Validity: [from: Mon Jan 24 18:17:49 IST 2011,]
    [To: Wed Jan 23 18:17:49 IST 2013]
    Issuer: CN = SSO_CA, O = SAP - AG, C = OF
    Serial number: [4d12c509 eb85 00000005]

    Certificate extensions: 6
    [1]: ObjectId: 2.5.29.14 criticality = false
    [SubjectKeyIdentifier
    [KeyIdentifier
    0000: 07 E5 83 A1 B2 B7 DF 6 b 4 b 67 1 and 9 D 42 C9 0 D F4... kKg... A.M..
    0010: 35 76 D3 F7 5v...
    ]
    ]

    [2]: ObjectId: 2.5.29.35 criticality = false
    [AuthorityKeyIdentifier
    [KeyIdentifier
    0000: E4 C4 2 93 20 AF DA 4 C 53 68 4A C0 CE E7 F2, 30. .. L.ShJ... 0
    0010: 0C 3 B 8 C 9 A. ;.
    ]

    ]

    [3]: ObjectId: 1.3.6.1.4.1.311.21.7 criticality = false
    Unknown extension: coded DER BYTE string =
    0000: 04 30 30 2 06 26 2 b 06 01 04 01 82 37 15 08 82.00... & +... 7...
    0010: D1 E1 73 E4 84 FE 0B FD 84 8 B 15 83 E5 1B 90 83... s.............
    0020: 43 81 62 84 B1 A1 E6 DA 50 14 02 01 64 02 9TH D3... C.b... P...d.
    0030: 01 1B...


    [4]: ObjectId: 2.5.29.17 criticality = false
    [SubjectAlternativeName
    RFC822Name: [email protected]
    ]

    [5]: ObjectId: 2.5.29.15 criticality = true
    [KeyUsage
    DigitalSignature
    Non_repudiation
    Key_Encipherment
    Data_Encipherment
    ]

    [6]: ObjectId: 2.5.29.19 criticality = true
    BasicConstraints:]
    CA:false
    PathLen: undefined
    ]

    ]
    Algorithm: [SHA1withRSA]
    Signature:
    0000: B3 C5 8 66 92 F4 CC D7 ED 6 51 12 63 52 18 B9... f... mQ.c... R.
    0010: B8 A6 78 7 78 18 ED F7 DA 71 09 AE 49 23 C8 C9... .. x...x. q... I have #.
    0020: F5 2F 32 0F D1 C0 08 4 2 B 6 D 3 C B9 5F 5B B5 11. 2 /... L + m <... _ [.]
    0030: 05 D9 CA E6 F9 0 a 94 14 E7 C6 7 a 63 DB FE E5 CE... z.c...
    94 0040:48 8 c 0D 77 92 59 34 6 77 1 a 24 FE E3 C1 H...w. Y .4nw$...
    0050: 0 B 52 6 D8 HAS 7TH 22 13 71 F8 AF 17 64 4F C8 D1 D7... RJ. ». q... dO
    0060: 83 EA 2D 6a CA 7F C3 84 37 15 FE 99 73 1 D 7 C D1... - j... 7... s...
    0070:6 B4 99 09 62 B9 0F 18 33 4 66 C6 7 a 9F C0 DB m... b... 3L. FZ...

    ]
    None of the found certificates in personal key MS: 1
    Exception in thread "main" java.security.InvalidKeyException: unsupported key type: RSA Sun public key, 1024 bits
    modulus: 171871587533146191561538456391418351861663300588728159334223437391061141885590024223283480319626015611710315581642512941578588886825766256507714725820048129123720143461110410353346492039350478625370269565346566901446816729164309038944197418238814947654954590754593726047828813400082450341775203029183105860831
    public exponent: 65537
    at sun.security.mscapi.RSACipher.init(RSACipher.java:176)
    at sun.security.mscapi.RSACipher.engineInit(RSACipher.java:129)
    at javax.crypto.Cipher.init(DashoA13*..)
    at javax.crypto.Cipher.init(DashoA13*..)
    at com.sap.srm.crpto.client.applet.CryptoClass.main(CryptoClass.java:102)

    Published by: sabre150 on July 18, 2011 03:47

    Added [code] tags to make the code readable.

    A little research indicates the key classes gets by

                          RSAPubKey = c.getPublicKey();
                               RSAPrivKey = ks.getKey(aliasKey, null);  //"mypassword".toCharArray()
    

    are sun.security.rsa.RSAPublicKeyImpl and sun.security. * mscapi *. RSAPrivateKey. It seems that Cipher objects from the SunMSCAPI provider cannot accept class sun.security.rsa.RSAPublicKeyImpl RSA public keys and that the SunMSCAPI will accept only class sun.security.mscapi.RSAPrivateKey RSA private keys.

    This came in another form a couple of years. It makes sense because the packaging/encryption with a public key does not represent a security problem (there no secret in cryptographic operations) once done outside MSCAPI can use any provider who has the ability , BUT unpacking/decryption must be done with the SunMSCAPI provider which it delegates to the MSCAPI.

    My test code of work based on your code for implementation of this approach is:

            // RSA 1024 bits Asymmetric encryption of Symmetric AES key
            // List the certificates from Microsoft KeyStore using SunMSCAPI.
            System.out.println("List of certificates found in Microsoft Personal Keystore:");
    
            KeyStore ks = KeyStore.getInstance("Windows-MY", "SunMSCAPI");
            ks.load(null, null);
            Enumeration en = ks.aliases();
            PublicKey RSAPubKey = null;
            Key RSAPrivKey = null;
            int i = 0;
            while (en.hasMoreElements())
            {
                String aliasKey = (String) en.nextElement();
                X509Certificate c = (X509Certificate) ks.getCertificate(aliasKey);
                String sss = ks.getCertificateAlias(c);
                if (sss.equals("rsa_key")) // The alias for my key - make sure you change it back to your alias
                {
                    System.out.println("---> alias : " + sss);
                    i = i + 1;
                    String str = c.toString();
                    System.out.println(" Certificate details : " + str);
                    RSAPubKey = c.getPublicKey();
             System.out.println(RSAPubKey.getClass().getName());
                   RSAPrivKey = ks.getKey(aliasKey, null);  //"mypassword".toCharArray()
            System.out.println(RSAPrivKey.getClass().getName());
                    Certificate[] chain = ks.getCertificateChain(aliasKey);
                }
            }
            System.out.println(ks.getProvider().getName());
            System.out.println("No of certificates found from Personal MS Keystore: " + i);
            Cipher rsaCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");//, ks.getProvider().getName());       !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                rsaCipher.init(Cipher.WRAP_MODE, RSAPubKey);
            byte[] keyBytes =
            {
                1, 2, 3, 4, 5, 6, 7, 8, 2, 3, 4, 5, 6, 7, 8, 9
            };
            SecretKey aeskey = new SecretKeySpec(keyBytes, "AES");
            byte[] encryptedSymmKey = rsaCipher.wrap(aeskey);
            System.out.println("Encrypted Symmetric Key :" + Arrays.toString(encryptedSymmKey));
            System.out.println("Encrypted Symmetric Key Length in Bytes: " + encryptedSymmKey.length);
    
            // RSA Decryption of Encrypted Symmetric AES key
            Cipher unwrapRsaCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding", ks.getProvider().getName());       //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            unwrapRsaCipher.init(Cipher.UNWRAP_MODE, RSAPrivKey);
            Key decryptedKey = unwrapRsaCipher.unwrap(encryptedSymmKey, "AES", Cipher.SECRET_KEY);
            System.out.println("Decrypted Symmetric Key :" + Arrays.toString(decryptedKey.getEncoded())); // Matches the 'keyBytes' above
    
  • Network type changes 'Public' and does not return to work when the default gateway is detected

    Original title: Type of network not restored on ethernet cable reconnect.

    I have a Dell Precision R5500 running Windows 7 Professional Service Pack 1. It is connected to a network that is stored as a type of 'work '. When the ethernet cable is removed and replaced network type changes to 'Public' and does not return to work when the default gateway is detected. I also have a Toshiba Tecra M10 running Window 7 Professional Service Pack 1 that initially detects the network restored as 'Public', but 'Work' once again Exchange is a connection to the default gateway. Is there a setting somewhere in the strength of the network to double check its type periodically?

    Hello

    You have any other network assets wireless (specifically) running on the computer?

    Have another active network connection could also cause this.

    Allows us to follow the methods mentioned below and see if they help.

    Method 1: Run the network troubleshooter.

    When the network type gets changed to 'Public' after the cable is disconnected and reconnected. The troubleshooter should let you know if there are errors with the associated services.

    See the following article:

    Using the troubleshooter from network in Windows 7:

    http://Windows.Microsoft.com/en-us/Windows7/using-the-network-troubleshooter-in-Windows-7


    Method 2:
    check if network discovery and file sharing options are enabled in the network and sharing Center.

    See the following steps:

    a. click on start toreduce this top, type network and sharing Center in the Start Search box, and then click network and sharing Center in the programs list.

    b. If network discovery is off, click the arrow to expand the section, click turn on network discoveryand then click apply.

    Reduce this includes this imIf that you are prompted for an administrator password or for confirmation, type your password or click continue.

    c. If file sharing is off, click the arrow to expand the section, click turn on file sharingand then click apply.

    Collapse this includes this ima

    If you are prompted for an administrator password or for confirmation, type your password, or click continue.


    Method 3: Uninstall the network drivers and then install the last set of drivers on the manufacturer's Web site and check the issue.

    See the following steps:

    (a) click Start, right click on computer.

    (b) click on properties, click on Device Manager

    (c) expand the network adapter, right click on the adapter option

    (d) click on uninstall

    (e) now go to your computer / site Web of the manufacturer of the device, download the updated drivers and install them.

    Reference:

    Updated a hardware driver that is not working properly:

    http://Windows.Microsoft.com/en-us/Windows7/update-a-driver-for-hardware-that-isn ' t-work correctly

  • C#, UCCX, Rest API, PUT (update a resource) and not taken media Type supported

    Hi, I'm developing an application to update the skills of resources with the REST API.

    I can get all the values I want to (GET), but when I try to update a resource using PUT, and then I get a "415 Unsupported Media Type" webException.

    I discovered that c# / UCCX works with demand. MediaType (instead of request. ContentType).

    I got this error when I tried to GET the data. He now works for the GET.

    But to PUT it, I got the error. Method is defined as SAID, MediaType = "application/xml".

    I tried to empty, ' text/xml '...

    Looked on the internet, Web sites, saying always specify ContentType/MediaType = "application/xml", I have already done.

    I also got the same error if I try an application COULD and without sending data.

    Thanks for your help!

    public string MakeRequest()
    {
    var request = (HttpWebRequest) WebRequest.Create (EndPoint);
    request. Credentials = new System.Net.NetworkCredential (login, password);
    request. Method = Method.ToString ();
    request. ContentLength = 0;
    request. Accept = ContentType;
    request. MediaType = ContentType;
                
    #region so PUT
    If (! string.) IsNullOrEmpty (PostData) & method == HttpVerb.PUT)
    {
    encoding of var = new UTF8Encoding();
    PostData = PostData.Replace ("\n", "");
    var bytes = Encoding.UTF8.GetBytes (PostData);
    request. ContentLength = bytes. Length;
                    
    using (var writeStream = request. GetRequestStream())
    {
    writeStream.Write (bytes, 0, bytes.) (Length);
    }
    }
    #endregion

    Try
    {
    assistance (response var = (HttpWebResponse) request. GetResponse())
    {
    var responseValue = string. Empty;

    If (answer. StatusCode! = HttpStatusCode.OK)
    {
    var message = String.Format ("request failed. Received HTTP {0}", response. StatusCode);
    throw new ApplicationException (message);
    }

    Enter the answer
    using (var responseStream = response. GetResponseStream())
    {
    If (responseStream! = null)
    using (var = new StreamReader (responseStream) Player)
    {
    responseValue = reader. ReadToEnd();
    }
    }

    Return responseValue;
    }
    }
    catch (WebException wex)
    {
    error string = wex. Message;
    Return ' ';
    }

    OK you got, in this case, post your request in the Sub forum as well which is sought after by developers and you can you expect a concrete answer/explanation on the same

    https://communities.Cisco.com/community/Developer/Express-configuration-API

    Concerning

    Deepak

  • Bookmark backup saved as type 'File' not JSON. How can I get my favorites?

    Recently, I did a reinstall of Firefox. Before uninstalling, I made a backup of my favorites. I don't remember asking for file type, when I made the backup... I guess Firefox would use correct. When I tried to restore the backup after you install the latest version of Firefox, I got the message "Unsupported file type". I looked at my file extension. There is no extension, and it just says: 'File' file type. It is certainly not JSON. Now, I am at a loss as to what to do and how to get back my bookmarks. I must have 50 +. Help, please!

    First of all, if Windows HIDES extensions file on your part, you can change this setting. In Windows Explorer, you can access the option using one of these:

    Organize the menu drop down > folder options and research > view tab or

    (Alt + t) tools > Folder Options > view tab

    Disable "Hide extensions of known file types".

    If you return to your file, you should be able to change the .json extension, and then try again. Not sure if it is critical, but by default, Firefox seems to create an extension to lower case (json not JSON).

Maybe you are looking for