This forum is in read-only mode for archive purposes, please use our new forum at https://community.justflight.com
Forum Home Forum Home > Just Chat > Just Chat - General Discussion
  New Posts New Posts RSS Feed - .NET CLR and Vista
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

.NET CLR and Vista

 Post Reply Post Reply
Author
Message
VulcanB2 View Drop Down
Chief Pilot
Chief Pilot
Avatar

Joined: 02 Apr 2008
Points: 13365
Post Options Post Options   Thanks (0) Thanks(0)   Quote VulcanB2 Quote  Post ReplyReply Direct Link To This Post Topic: .NET CLR and Vista
    Posted: 12 Apr 2008 at 12:36am
Hi,

Does anyone here code for Vista using the above? Anyone familiar with this??



It's exceptionally annoying as my app won't run correctly (it keeps crashing like this) and as far as I'm aware, .NET V2 , V3.0 and V3.5 are already installed into Vista??????? Is it safe (or even possible) for me to uninstall these and re-install them? I never saw this under XP, and this project has simply been opened up into a new install of VB.NET 2008 and ran.

A 3rd party library I've linked to isn't working, either, but I'm not sure if that is because it isn't Vista compatible. I can't get past this error though to start debugging that.

The bizarre part that  Idon't understand is that this code executes properly when it is ran (it does open up another window), but when I run the following code, it then proceeds to crash:

        Dim rsa As New RSACryptoServiceProvider(4096)
        MsgBox(rsa.KeySize(), MsgBoxStyle.Information, "Current Key Size")

        Dim i As Integer = 0

        Dim legalKeySizes() As KeySizes = rsa.LegalKeySizes
        If (legalKeySizes.Length > 0) Then
            'For i As Integer = 0 To legalKeySizes.Length - 1 Step 1
            MsgBox("Keysizes (min, max, step):" & vbCrLf & vbCrLf & legalKeySizes(i).MinSize & vbCrLf & legalKeySizes(i).MaxSize & vbCrLf & legalKeySizes(i).SkipSize, MsgBoxStyle.Information, "")
            'Next
        End If

        rsa = New RSACryptoServiceProvider(1024)
        MsgBox(rsa.KeySize(), MsgBoxStyle.Information, "Current Key Size")

        txtPrivate.Text = rsa.ToXmlString(True) ' PRIVATE KEY!!!!
        txtPublic.Text = rsa.ToXmlString(False) ' Public Key

        txtPlain.Text = "This is a test!"

        rsa.FromXmlString(txtPrivate.Text)
        Try
            txtCipher.Text = Convert.ToBase64String(rsa.Encrypt(System.Text.ASCIIEncoding.Default.GetBytes(txtPlain.Text), True))
        Catch
            txtCipher.Text = "Invalid Key!"
        End Try

        rsa.FromXmlString(txtPrivate.Text)
        Try
            txtPlain2.Text = System.Text.ASCIIEncoding.Default.GetString((rsa.Decrypt(Convert.FromBase64String(txtCipher.Text), True)))
        Catch
            txtPlain2.Text = "INVALID KEY!"
        End Try


Any help greatly appreciated.

Best regards,
Vulcan.
Back to Top
VulcanB2 View Drop Down
Chief Pilot
Chief Pilot
Avatar

Joined: 02 Apr 2008
Points: 13365
Post Options Post Options   Thanks (0) Thanks(0)   Quote VulcanB2 Quote  Post ReplyReply Direct Link To This Post Posted: 12 Apr 2008 at 11:20am
Hi,

It's looking like the .NET Framework installation is broken.

Best regards,
Vulcan.
Back to Top
VulcanB2 View Drop Down
Chief Pilot
Chief Pilot
Avatar

Joined: 02 Apr 2008
Points: 13365
Post Options Post Options   Thanks (0) Thanks(0)   Quote VulcanB2 Quote  Post ReplyReply Direct Link To This Post Posted: 19 Apr 2008 at 3:20pm
Hi,

Got it sorted! A class library I was referencing doesn't run on Vista!!!!!!!!! By removing reference to it in the code, it ran fine! Cool

Now to write a new class library!

Best regards,
Vulcan.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down