Incorrect DES File Decryption

I am using the following code to create an encrypted file. I am doing some research for my thesis and really only care about the encrypted file, however,
I wanted to test the encrypted file by decrypting it. The decrypted file is never correct. So the million dollar question is "What am I doing wrong?"
private static void encrypted(
               FileInputStream inputFile, FileOutputStream outputFile)
          Cipher DESCipher;
          Cipher TestDESCipher;
          try
               SecretKey desKey = getDESKey();
               DESCipher = Cipher.getInstance("DES");
               TestDESCipher = Cipher.getInstance("DES");
               // Initialize the cipher for encryption
               DESCipher.init(Cipher.ENCRYPT_MODE, desKey);
               TestDESCipher.init(Cipher.DECRYPT_MODE, desKey);
               CipherOutputStream desCipherStream = new CipherOutputStream(
                         outputFile, DESCipher);
               byte[] b = new byte[8];
               int i = inputFile.read(b);
               while (i > 0)
                    if (debug)
                         System.out.write(b);
                    desCipherStream.write(b, 0, i);
                    i = inputFile.read(b);
               inputFile.close();
               desCipherStream.close();
               outputFile.close();
               // //////////////////////////////////////////start decrypt test
               FileInputStream decInFile = new FileInputStream(
                         "C:\\Documents and Settings\\Walter\\My Documents\\AFIT\\Thesis Work\\Encryption Work\\Text\\DES\\text test.txt");
               FileOutputStream decOutFile = new FileOutputStream(
                         "C:\\Documents and Settings\\Walter\\My Documents\\AFIT\\Thesis Work\\Encryption Work\\Text\\DES\\text test decrypted.txt");
               CipherInputStream desDecryptCipherStream = new CipherInputStream(
                         decInFile, TestDESCipher);
               byte[] c = new byte[8];
               i = desDecryptCipherStream.read(c);
               while (i > 0)
                    System.out.write(c);
                    decOutFile.write(c, 0, i);
                    i = desDecryptCipherStream.read(c);
               decInFile.close();
                        desDecryptCipherStream.close();
               decOutFile.close();
               // ////////////////////////////////////////// end decrypt test
          catch (Exception e)
               e.getMessage();
               e.printStackTrace();
     }Here is the contents of the plaintext input file:
This is an example.Here is the contents of the encrypted file:
��3���f�g�b`��C��3��8wHere is the contents of the decrypted file:
�P�e�a�C�v,(���The program encrypted and decrypted the following correctly:
bytes[] plaintext = "This is an example.".getBytes();But when I tried to put the text in a file and tried to use CipherOutputStream the problem arises.
I've tried to use a single cipher that was reinitialized to DECRYPT, and I've tried to use two separate ciphers, but the results were the same.
I know I am using the same key and padding scheme, so what is going wrong?

<snip>
My intent was not to upset you! I didn't want to
clutter the forum with 500 lines of code that won't
help to discover the problem. Which is exactly why you should provide a short testable example. I had to add about 20 lines of code to get your method testable.
The main method simply
sets up the FileInputStream and the FileOutputStream
and passes them to the encryptDES method posted in
the original post. Exactly so why did you not post one?
The getDESKey is just
an abstraction for KeyGenerator, however, the key is
stored in desKey variable and passed to both init
methods, so I am assuming the key is not
the issue, but here is the getDESKey method just in
case.I agree.
>
private static final SecretKey getDESKey()
throws NoSuchAlgorithmException,
on, NoSuchPaddingException
          byte[] key = new byte[8];
KeyGenerator desKeyGen =
= KeyGenerator.getInstance("DES");
          SecretKey desKey = desKeyGen.generateKey();
return desKey;
I'm running JRE 1.5.0_04 and am using Eclipse3.2.1
for Windows XP.
So you are able to encrypt and decrypt from and
to a
file? Have your tried more complicated files? What is a 'more complicated' file?
A 'more complicated' file is one containing more then
just the simple phrase "This is an example." as
stated in the
original post.  Presumably this would be a 3-4 Kb
text file.  Thus a file where the encryption
algorithm would span
several hundred blocks.My test file was about 10 KBytes so about 1,200 blocks.
>
>>>
Assuming the code is working fine for you, thenwhat
would prevent it from working for me?I have no real idea! That is why you need tocreate
a test harness that shows exactly how you areusing
it. One possibility is that your getDESKey()
method
returns a different key value each time it is
called
but without seeing the rest of your code how am I
to
know.
You are correct, the getDESKey() does return a
different key, but that is how I designed it. As
stated earlier, this
method is only called once and the results are stored
in a local variable. OK.
>
I would be more than happy to send you a zip file
containing the .java file and the file structure so
you can
further analysis the code. I just didn't see a way
to attach a file to a post, so you can email me at
[email protected] and I'll reply with the
attached zip file.It is not a good idea to publish your email address on a public forum.
>
There was one thing I noticed that needed fixingbut
it did does not cause a problem with encryptingand
decrypting and that is that
System.out.write(c);             
decOutFile.write(c, 0, i);needs changing to
System.out.write(c, 0, i);
decOutFile.write(c, 0, i);but this will only show a problem with yourprintout,
not your decrypted file. You did check the contentof
the decrypted file didn't you?The System.out.write(c) will write the full
length of the byte array to the output stream and is
only being used for
debugging purpose. So the System.out.write(c, 0,
i) will prevent a repeat of old data from being
printed out,
but since this is not going to the output file it
shouldn�t be causing any problems. Which is what I said but it does present an opportunity to misinterpret the output.
>
Yes I did check the decrypted file. In fact, the
contents of each file were listed in the original
post. What good is the ASCII of the encrypted data without knowledge of the the key used and the character code used to convert the encrypted bytes to a String.
>
Come on give me a little credit, I did graduate with
distinction with a Bachelor Degree in Computer
Science,
and I am pursuing a Master's Degree in Computer
Science with an emphases in Software Engineering
while
maintaining a GPA > 3.5.There are aspects to your code that don't indicate such good qualifications. For example, your encryption method takes a FileInputStream and a FileOuputStream. As part of a 'design to interface' policy I would expect these to be InputStream and OutputStream. Also, I would not expect you to close the OutputStream because the encryption method did not create the OutputStream and outside of the encryption method the user may want to provide a prefix and a suffix. This is what I do with RSA where my prefix is an IV and the RSA encrypted symetric key and the suffix is a hash.
Also, I assume you know that it is very important to design for testability so I would have expect you to provide the test harness for this method. In this way you would not have has to post 500 lines.
>
And your credentials speak for themselves.I agree! I am one of life's 'has beens'. My MSc is now 34 years old and not worth the paper the certificate is printed on.

Similar Messages

  • SQL LDR LKM generating incorrect CTL file

    Hi,
    The LKM for SQL LDR is generating incorrect CTL file for a fixed length data file. Due to this the ODI is erring out.
    Here are the contents of the CTL file:
    SnpsOutFile "-File=//Myserver/myfile.ctl"
    OPTIONS (
         SKIP=0,
         ERRORS=0,
         DIRECT=TRUE
    LOAD DATA
    INFILE "//Myserver/myfile.RDY"
    BADFILE "//Myserver/myfile.bad"
    DISCARDFILE "//Myserver/myfile.dsc"
    DISCARDMAX 1
    INTO TABLE ORA_SCHEMA.C$_0RAW_TABLE
         C1_CHAR9     POSITION(:),
         C2_CHAR2     POSITION(:),
         C3_CHAR6     POSITION(:),
         C4_CODE          POSITION(:),
         C5_RAWG_CODE     POSITION(:),
         C6_E_NUMBER     POSITION(:),
         C7_T_NUMBER     POSITION(:),
         C8_C_COLOR     POSITION(:),
         C9_D_COLOR     POSITION(:),
         C10_R_CODE     POSITION(:)
    Why is "POSITION(:)" not getting the numbers before and after ":" ?
    I reverse engineered this file and have the correct values for "Physical Length" and "Logical Length"
    TIA,
    Ankit

    Hi Ankit,
    I think the column transformation mappings are set on the Source (radio button) in the Integration Interface Mapping window.
    Change the column transformation mappings to be executed on STAGE .
    It should resolve this issue.
    Thanks,
    Sutirtha

  • [svn:fx-3.x] 13067: Fix for html-wrapper ant task generates incorrect wrapper files for flash player version detection .

    Revision: 13067
    Revision: 13067
    Author:   [email protected]
    Date:     2009-12-17 12:48:20 -0800 (Thu, 17 Dec 2009)
    Log Message:
    Fix for html-wrapper ant task generates incorrect wrapper files for flash player version detection.
    QE notes: None.
    Doc notes: None
    Bugs: SDK-18826
    Reviewed By: Paul
    Tests run: checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-18826
    Modified Paths:
        flex/sdk/branches/3.x/modules/antTasks/src/flex/ant/HtmlWrapperTask.java

    Could you try creating a new Firefox profile to see if that helps?
    8. Make a new profile
    Chris

  • Labview Scripting: Configurer le tracé des fils de liaison

    Bonjour,
    Suite à mon premier post: http://forums.ni.com/t5/Discussions-de-produit-de-NI/Cr%C3%A9er-des-r%C3%A9f%C3%A9rences-de-contr%C3...
    J'ai réussis à créer mes références de contrôles et à les insérer dans un tableau.
    Cependant les connexions entre ces références et le tableau sont faites au hasard:
    Je souhaiterai avoir des connexion dans ce style:
    J'utilise la methode "connect wire" pour créer mes connexions, mais je n'ai pas trouvé de methode qui permet de configurer le tracé des fils...
    Résolu !
    Accéder à la solution.

    Bonjour,
    C'est un peu brute de fonderie de déplacer chaque cable un après l'autre surtout quand il y'en a beaucoup comme dans ce cas précis.
    Le plus simple est de laisser LabVIEW gérer la disposition via la fonction Nettoyage du diagramme qui peut être effectuée uniquement sur les éléments sélectionnés, ainsi on a une seule partie (celle qui nous intéresse) nettoyée.
    Donc par Scripting on va sélectionner ce qui nous intéresse et le tour est joué.
    Voir l'exemple modifié ci-joint en 8.6 qui est lié à mon exemple précédent.
    Cordialement,
    Da Helmut
    Pièces jointes :
    vi.Create.Tableau.Ref.vi ‏57 KB

  • INCORRECT SDA FILE

    Hello I am triying to install Web AS 6.40, java standalone in windows 32 bits and when I get to SAP Java Cryptographic Toolkit, and I choose the SAP Java Library Archive and JCE Unlimited Policy I get this error:
    Incorrect SDA File
    The file yo specified is note the right file.
    But I downloaled the only .car file that I can see for windows 32 bits.
    SAP Cryptographic Library Microsoft Win32 for x86/IA32
    011000358700002932482003E.CAR
    I tried with SAP JAVA CryptoToolkit (J2EE Engine as of Release 6.30)
    011000358700005230472003E.CAR too,
    But it isn't working...
    Please help me, I dont understand whats wrong..
    Thanks in advance,

    Hi,
    I think you've to use sapcar first on the file 011000358700005230472003E.CAR. Then you will get the sda archives for your JRE. The Installer looks for this files.
    (Same procedure for the other *.car file; these are the windows libraries).
    Regards,
    Daniel

  • Trim marks positioning incorrect for files that have a larger crop box than trim box

    I've seen this question in one other place on the forum, but it doesn't look like it ever got answered. It's been driving me nuts for months, so I'm going to try to do a very simple walkthrough for this problem to find out if this is a glitch in the software, or I'm doing something wrong.
    When telling Acrobat XI Pro to print a PDF with "Trim Marks," the marks are applied to the "CropBox" instead of the "TrimBox." As far as I'm concerned, this is incorrect behavior. Acrobat 9 Pro, on the other hand, applies the Trim Marks to the TrimBox. Since I receive files with bleed and need to print out a sample on the printer on a regular basis, I have found it necessary to leave Acrobat 9 installed just to print these files. I've done a very simple walkthrough on how to generate a very simple mockup file from InDesign and output it to better illustrate the problem.
    I've created a new InDesign document that is 5x7 inches with 1/8" bleed. To make it easier to spot the applicable boxes in the file, I've made a box with a 1/2 point stroke. I made a magenta stroked box that's 5x7 inches to signify the trim, and a cyan stroked box that's 5.25 x 7.25 inches to signify the bleed. I then output it to a high resolution PDF. For the purposes of this example to make sure this can be replicated easily, I'm using the built-in [PDF/X-4:2008] preset to start off with. The only adjustment I'm making to this preset is going to the "Marks and Bleeds" section to check the "Use Document Bleed Settings."
    When opening the resulting PDF in Acrobat XI Pro, you can see that the various "Page Boxes" have been applied properly. "CropBox" is set to 0 to include all of the artwork in the file, "BleedBox" is set to 0 since there's nothing outside of the bleed area in this pdf, and "TrimBox" is set to 0.125 in since we gave this file 1/8" bleed. When going to print the file, you can go to "Advanced" and then "Marks and Bleeds" to enable printing with the "Trim Marks." Once you click ok, you can see in the preview image that the trim marks are lining up to the cyan box instead of the magenta box.
    As an extra step, it's possible to confirm that the trim marks are going to the crop box and not the bleed box or trim box. If you add a slug to your InDesign document and reoutput the pdf (being sure to include the slug area in the "Marks and Bleeds" section), you will find that the Trim Marks are even further outside of the cyan box. If you output your PDF from InDesign with Trim Marks already applied, you can turn on the Trim Marks option when going to print in Acrobat to see that Acrobat's Trim Marks are going outside of the crop box as well instead of overlapping the ones generated by InDesign.
    Is there any fix for this behavior aside from opening the files in Acrobat 9 and printing from there instead?

    yes, in the pure definition of the word in the world of print, Crop DOES equal trim...in the exact concept of what YOU see it as.
    in Adobe's little bubble, they decided to call the outer box the "Crop" so that they could differentiate between trim and crop in the page box model.
    These pictures should help, if not, I'm not going to continue to explain something that you don't want to grasp.
    Each picture shows what Acrobat is calling each page box line.  since they felt the need to call one trim and one crop, you have to widen your concept of what Adobe is defining "crop" as.  Not saying its right, but it is what they are doing, and what is causing the whole issue.
    All that aside, if you are not understanding the page box model, then your PDFs are probably not set up this way, so you probably wouldn't even notice the change... So why are you posting on this thread?

  • Folder/File Decryption in Windows 8.1

    Hello,
    I have a folder with some files in it, and two sub-directories also with files in them, that I encrypted some time ago, but after I've been updated to Windows 8.1.
    Suddenly, even though there is only one account on this computer (administrator), it will not allow me to decrypt the folder (and/or subfolders or individual files). When I Right-Click->Properties->Advanced...->UNCHECK Encrypt Contents to secure
    data-> OK->Apply, first I get a 'Access Denied' 'You will need to provide administrator permission to change these attributes. Click Continue to complete this operation.' Click Continue and get: 'An error occurred applying attributes to the file: C:\Blah.jpg
    Access is Denied' and then the option to Ignore/Try Again (Same Result)/Cancel.
    The only thing I can think is, randomly about a month ago, my password stopped working to sign in on my computer (strange right?). I then had to reset it online in order to get back into my computer. I haven't needed these files since before then. Could
    the fact that I encrypted them with a different original password matter here?
    Here's what I've tried:
    Verified that under Security All users have full access (there is only me after all).
    Clicked on 'Advanced'
    Checked all permissions for full access.
    Added HomeUsers to that folder with full access.
    Added Everyone in the Share Tab.
    Added my username to the Audit tab.
    Added my username to the Effective User tab.
    Everything says I have full control..in fact ANYONE on this computer has full control..yet all I get upon opening is 'Access Denied. You do not have permissions to view this file'.
    Any thoughts?
    V/R,
    Larry

    Larry,
    The reason that you’re receiving the “Access Denied” error is because your system is unable to find the encryption key and related certificate that were used to originally encrypt the files.
    The
    Recover encrypted files or folders webpage states:
    “You can lose access to encrypted files if you install a new operating system or upgrade your current one, or if your current operating system fails.”You must have a backup copy of your encryption key and related certificate on a disc or other
    removable media (such as a USB flash drive)
    If you were able to back up your encryption key and certificate before upgrading to Windows 8.1, follow these steps to regain access:
    Right-click on the start button and select Run.You must      have a backup copy of your encryption key and related certificate on a      disc or other removable media (such as a USB flash drive) to
    follow the      steps below.
    Type in certmgr.msc and press Enter.
    In the left pane, click Personal.
    Click the Action menu, point to All Tasks, and then click
    Import. This opens the Certificate Import wizard.
    Click Next.
    Type the location of the file that contains the certificate, or click
    Browse and navigate to the file's location, click Open, and then click
    Next.
    If you have navigated to the right location but don't see the certificate you are importing, then, in the list next to the
    File name box, click Personal Information Exchange.
    Type the password, select the Mark this key as exportable check box, and then click
    Next.
    Click Place all certificates in the following store, confirm that the
    Personal store is indicated, click Next, and then click
    Finish.
    Note: Do not enable strong private key protection.
    After you import the certificate, you should have access to the encrypted files.
    Mike
    Windows Outreach Team – IT Pro

  • How to read a incorrect XML file using file adapter

    Hi',
    I have a XML file which is incorrect,
    example
    <?xml version='1.0' encoding='UTF'?>
    <emp>
    <empid>100</empid>
    <empname123>yatan</empname>
    </emp>
    now we can see that the XML data *<empname123>yatan</empname>* is incorrect,
    so if we have to read this type of XML in BPEL is it possible to read it or can we read it with some work around
    I have tried one way to achieve this,
    I read this XML with file adapter opaque read operation, and inside the BPEL process used Base64Decoder (Java embedding) to decode the
    opaque data to XML, it works to some extend. I am able to see the only the data like,
    100 yatan
    If I read a correct XML with same approach the data is a complete XML like,
    <?xml version='1.0' encoding='UTF-8' ?>
    <emp>
    <empid>100</empid>
    <empname>yatan</empname>
    </emp>
    can some one advice me how to achieve this, or some one has done this before
    thanks
    Yatan

    What initially I have thought is,
    once a incorrect file comes in this failed directory, some BPEL process should get invoked and feed the data to user, for this I thought of designing a BPEL process which will poll this failed directory, so for this we will need a empty BPEL process which will pick the file and then pass the data, the issue is I need to use here a opaque read and I dont know how to convert back the opaque (faulty XML) back to string.
    I have already tried to convert the opaque to XML using java embedding but for faulted XML only the data comes back in the form of string, where as need the complete XML back, can you suggest how to do this.
    thanks
    Yatan

  • Incorrect DME file format from GB_BACS

    I have an incorrect DME BACs file being generated with a line format of
    UHL1 00001999999    000000001 DAILY  000
    it should read:
    UHL1 11034999999    000000001 DAILY  000
    with 11 being the year and 034 the daily sequence number.
    Can someone advise how and where this should be populated?
    Thank you.

    Hello,
    I had the same problem.
    Check the validity date of the factory calendar and the holiday calendar.
    SPRO>SAP netWeaver>General Settings>Maintain calendar
    Hope It helps.
    Regards,
    Emmanuel

  • Javax.crypto.BadPaddingException in DES encrypt/decrypt algorithm

    I am using DES algorithm, the default provided by J2ME to encrypt and decrypt some text. My problem is that I can encrypt the text but when I decrypt I get javax.crypto.BadPaddingException. I used a sample code from this forum I suppose and modified it to some extend.
    Here's the output -
    Plain Text :debayandas
    Cipher Text :Ɩ2&#65533;Ü°*Yð´4}&#65533;f¥
    Recovered Plain Text :javax.crypto.BadPaddingExceptionAnd here's the J2ME code -
    Declaration part:
    private boolean midletPaused = false;
            private static String algorithm = "DES";
         private static byte[] secretKey = {(byte) 0x2b, (byte) 0x7e, (byte) 0x15, (byte) 0x16,
                                                      (byte) 0x28, (byte) 0xae, (byte) 0xd2, (byte) 0xa6 };
         private static String secretKeyAlgorithm = "DES";
         private static byte[] iv = "DES".getBytes();
         private static byte[] plainText = null;
         private Key key = null;
         private static Cipher cipher = null;
         private static int ciphertextLength = 512;
            private static byte[] cipherText = new byte[ciphertextLength];
            private static int decryptedtextLength = 1024;
            private static byte[] decryptedText = new byte[decryptedtextLength];commandAction:
    public void commandAction(Command command, Displayable displayable) {                                              
            if (displayable == form) {                                          
                if (command == exitCommand) {                                        
                    exitMIDlet();                                          
                } else if (command == okCommand) {
                    plainText=textField.getString().getBytes();
                    encrypt();
                    decrypt();                                                        
        } Encrypt:
    public void encrypt()
                try
                    key = new SecretKeySpec(secretKey,0,secretKey.length,secretKeyAlgorithm);
              cipher = Cipher.getInstance(algorithm);
                    cipher.init(Cipher.ENCRYPT_MODE, key);
                    cipher.doFinal(plainText, 0, plainText.length, cipherText, 0);
              System.out.println("Plain Text :"+new String(plainText));
              System.out.println("Cipher Text :"+new String(cipherText));
                catch(Exception e)
                    System.out.println(""+e);
        }Decrypt:
    public void decrypt()
            try
    //            cipher = Cipher.getInstance(algorithm);
                cipher.init(Cipher.DECRYPT_MODE,key);
                cipher.doFinal(cipherText,0,cipherText.length,decryptedText,0);
                System.out.println("Recovered Plain Text :"+new String(decryptedText));
            catch(Exception e)
                System.out.println(""+e);
        }Where am I going wrong?

    debayandas wrote:
    I am using DES algorithm, the default provided by J2ME to encrypt and decrypt some text. My problem is that I can encrypt the text but when I decrypt I get javax.crypto.BadPaddingException. I used a sample code from this forum I suppose and modified it to some extend.How did you get DES in J2ME?
    I am asking as there isn't one default implementation in J2ME and as far as I am aware it is not included in any Configurations or Profiles of J2ME.
    You might be using [Bouncycastle library|http://www.bouncycastle.org/java.html] or any other third party implementation of DES, in which case please refer to the documentation of it to see in which methods throw BadPaddingException and in what circumstances, in order to pinpoint the problem.
    Daniel

  • Getting incorrect DME file formate

    Hi,
    I am using TCODE FDTA in ECC5.0 to download the DME text file and expecting it to be downloaded in tabseperated format. whereas I am getting the correct file format in SAP 40b version. can anybody let me know if any SAP NOTE available to correct this problem.
    Thanks,
    Manish

    Please answer it as soon as possible since it is very urgent to me.
    Manish

  • Incorrect QuickTime file size shown in Finder

    I have a few QuickTime movies that I moved out of Aperture in order to move back into the newest iPhoto. When I attempted to sync my iPhoto library with my iPhone, the videos would not sync, so I investigated further and found that while they play perfectly fine under both iPhoto and in QuickTime 7 and QuickTime X, the file size in Finder is showing each movie as only a few KB in size, when in fact they are dozens of MBs in size.
    What the heck is going on? Permissions repair did nothing, I can't think of what else to try.

    I would suspect you moved the .mov file, but at some point in processing and saving things you have failed to note that the .mov file should be saved as a "self contained" movie, so that the actual movie content is left somewhere on your hard-drive. The .mov file will play on the computer, because it is pointing to the location of the content, which is accessed and used, but when you move (or try to) the .mov file, the content is left behind on the hard drive, and only the container is moved. Thus there is nothing TO play in the new location, there is just the container with no content.
    Francine
    Francine
    Schwieder

  • SQL Server 2008 R2 Disk Usage report showing incorrect data file

    When I go to ANY database (System, AdventureWorks*, user) in Managemant Studio, I right-click on the db, select Reports, select Standard Reports, and select Disk Usage.  The disk usage report shows the correct db on top, but always only shows AdventureWorks_Data.mdf
    when I expand Disk Space Used by Data Files section.  This happens to any db I try.  When I look at Database Properties/Files for that database, the logical and physical file names are correct.
    Since the correct files appear in Database Properties/Files, I'm hoping it's just a bug in the report.  Same thing happens if I run a Disk Usage by Table report for ANY database,  The tables for AdventureWorks always only appear,
    Thanks,  Mike

    Thanks Tibor!
    I looked at the Properties for my login under Security/Logins and it shows my default db to be master.  Not sure if this is correct, but it sounds plausible.  I'll see if I can report the problem.
    The only issue I can think of that was out of the ordinary for the install of 2008 R2 EE was this:
    I originally installed 2005 DE, since it wouldn't expire.  After the install of 2005 DE, I decided to uninstall it and install 2008 R2 EE.  In between the installs of 2005 DE and 2008 R2 EE, I installed/uninstalled stupid stuff like 2008
    Express, 2008 Express with Advanced Services (?), and 2008 EE.  After each uninstall I also did a system restore to be safe.
    Now each time I open Management Studio, i get a pop-up stating that there are SQL Server 2005 registered servers on my sytem and asks me if I want to add them into Management Studio.  I always say no.
    The AdventureWorks db is from 2005 and was installed automatically with 2005.  I installed the 2005, 2008, and 2008 R2 AdventureWorks databases to my R2 for class.  I'm not sure now if the Disk Usage report is showing me AdventureWorks_Data.mdf
    because of my install into 2008 R2 EE or my previous install of 2005 DE.
    Hope this kind of makes sense...
    -Mike

  • Incorrectly opening files as UTF-16

    I do a lot of web editing and have a variety of HTML files with the following line in them:
    <META http-equiv=Content-Type content="text/html; charset=unicode">
    Now that I have Leopard, anytime I open these files, it fills the screen with chinese characters. I've found that if I go into TextEdit, and select anything except Unicode (UTF-16) when opening the file, the file loads as it should.
    It seems that every program (TextEdit, Dreamweaver, etc) is now trying to load these (English) files at UTF-16 and it's converting them into Chinese.
    Any ideas on how to disable this "feature" or make TextEdit into a true text (only) editor?

    Hi Krishna,
    try to use:
        response->set_header_field( name = 'Content-Type'
                                    value = 'application/vnd.ms-excel' ).
    to set the correct content type for the file (example above Excel).
    Also place the coding in the OnRequest Event and not on the Layout of the page with flow logic. As an alternative you can use a controller with a controller class. In there redefine the method do_request and place the coding for creating the response therein. The coding should look similar to:
    *  send back the file
        response->set_header_field( name  = 'Content-Type'
                                    value = ls_file-content_type ).
      response->delete_header_field( 'Cache-Control' ).         "#EC NOTEXT
      response->delete_header_field( 'Expires' ).               "#EC NOTEXT
      response->delete_header_field( 'Pragma' ).                "#EC NOTEXT
      CONCATENATE 'inline; filename="' ls_file-name INTO lv_string.
      response->set_header_field( name = 'Content-Disposition'
                                  value = lv_string ).
      response->set_data( ls_file-content ).
    In the example above lv_string has type string and ls_file is a structure containing strings for name and content-type and an xstring for the file content.
    I usually don't set the content length as I have enabled compression and then the icm calculates the content length for me after compression.
    Hope that helps.
    Best Regards
    Michael

  • License file decrypt on CUCM, Unity 9.x

    Used to be in the past that License file was a text base file that was created in plain text and signed to avoid tampering. These days License file is encrypted and no way we can know the content of the file.
    Since license team is not really very accurate we have to go back and forth several time in many project and looking inside a file was an easy way to detect mistakes.
    It is possible now?
    Thanks
    Alex

    Well, I think part of this depends on whether you purchased a new CUCM 9.x or an upgrade from an earlier version.  If the later (i.e. upgrade), you do not receive a PAK with the CUCM 9x software order.  Instead, you use ELM to migrate existing licenses.  If you ordered a new version, then you would likely want to 1st contact the vendor you are working with and then send a note to [email protected] and give them your Cisco Sales Order Number as well as any contract information you have that would go along with the details of the order.
    Hailey
    Please rate helpful posts!

Maybe you are looking for

  • Memory leak in Solaris 10?

    Dear all, I have installed and configured a Solution Manager 4.0 system SPS 15  on a Solaris 10 T2000 SPARC hardware with 8 core CPUs and 32 GB of RAM. The database is Oracle 10.2.0.2.   My Java virtual machine version is 1.4.2_17. When I start the s

  • AX messes up my WPA security from AEBS

    After being wireless with all-Apple hardware for six years, at last I decided to password-protect my AEBS + AX network. Well. As punishment for finally doing the right thing I'm now having the "no padlock" problem--but only on ONE of my wireless Macs

  • How to lock a row in a db

    Hi, Could someone share the code for how to lock the whole database, part of the database or just a row in the database? Thanks.

  • Prepaid Customer - ByPass Credit Limit Warning

    Hi, We have customers who have a credit limit, have prepaid payment terms and will prepay their order before delivery.... Is there a way to process the prepayment and bypass the credit limit warning? I tried using a A/R downpayment invoice, but the c

  • A friend used my computer, and sync is set up with HER email, and I would like to delete that and put in my email address.

    I don't recall setting up sync acct. But am not computer savvy (can get by). Was checking out Sync and discovered that an acct is set up, but not with my email. My friend has used my computer, and I don't know if she meant to do it, but now acct. is