Jump to content
Xtreme .Net Talk

Coen

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by Coen

  1. Hi, I'm developing an application that sends information over the internet to other applications (which are not written in .NET). We decided to use Rijndael encryption for this. But we can't create the same key at both sides... This is the code that generates the key in .NET // this should be random and should be send with the encrypted data byte[] salt = new byte[] {0, 1, 2, 3, 4, 5, 6, 7}; System.Security.Cryptography.PasswordDeriveBytes pwd; pwd = new System.Security.Cryptography.PasswordDeriveBytes("password", salt); pwd.IterationCount = 1; // we've tried this with the values 0 to 10000 pwd.HashName = "System.Security.Cryptography.SHA256Managed"; byte[] key = pwd.GetBytes(32); But I can't generate the same key at the other side because we've got no idea how the .NET framework uses the Salt. Does anyone knows how we can generate the same result without the PasswordDeriveBytes class? Thanks, Coen
  2. Imports :confused:
  3. also not available in the .net compact framework :( but I found a solution in the google groups: :) System.Reflection.Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName I'm not sure if this solutions always works correctly...
  4. yes when you create a new project you can choose a Smart Device Application when you select that project type you get the choice between a Pocket PC application or an Windows CE application
  5. nope :( the Environment object only has three members; OSVersion, TickCount and Version
  6. Hi, I'm developing an application for a mobile device but I'm in the need of a database. So I found the Sql CE database but I can't find anywhere if it's free to use. When I searched the Microsoft site I found this page: http://www.microsoft.com/sql/ce/howtobuy/default.asp I'm using this database locally and not in combination with a Sql Server. So I'm I free to distribute my application with an Sql CE database? Thanks, Coen
  7. Hi, I'm developing an application for a pocket pc using the .net compact framework 1.1 but I can't get the executable path of the current application. Normally I'd get this from the System.Windows.Forms.Application object but this doesn't have all the members it has in the normal .net framework. Greetings, Coen
  8. I was looking in the MySql documentation to get the number of affected rows by the last query. But they only refer me to the C function mysql_affected_rows() but I can't use this function because I'm using ADO.NET. But I can't find out how to get the number of affected rows by the last operation using a Sql query.
  9. I've checked the column again samsmithnz but I'm sure it's VARCHAR(30) :p And when I get the column size it's MaxLength is 8? So ADO.NET doesn't seem te be able to get the correct column length...
  10. I'm trying to insert some records in a MySQL database with a DataSet but I'm getting an error when I try to set the value of a column. This is the code I'm using: Dim odbcDataSet As New DataSet Dim odbcDataAdapter As New OdbcDataAdapter(New OdbcCommand("SELECT * FROM MyTable", dbMySql)) odbcDataAdapter.InsertCommand = New OdbcCommand("INSERT INTO MyTable (MyColumn) VALUES (@MyColumn)", dbMySql) odbcDataAdapter.InsertCommand.Parameters.Add(New OdbcParameter("@MyColumn", OdbcType.VarChar, 30, "MyColumn")) odbcDataAdapter.FillSchema(odbcDataSet, SchemaType.Source) odbcDataSet.Tables(0).TableName = "MyTable" Dim odbcDataRow As DataRow = odbcDataSet.Tables("MyTable").NewRow() odbcDataRow("MyColumn") = "yhjhgj" odbcDataSet.Tables("MyTable").Rows.Add(odbcDataRow) odbcDataAdapter.Update(odbcDataSet, "MyTable") The MySql server is version 3.something and this is the error I'm getting: System.ArgumentException: Cannot set column 'MyColumn' to 'yhjhgj'. The value violates the MaxLength limit of this column. Why is this error occuring while I set the columns length to 30 (which is VARCHAR(30))?
  11. Hi, I've developed a HTML editor in the past with VB6. And I used the `DHTML Edit Control for IE5` for the HTML editing. But I was wondering if there is a control like this in .NET. Coen
×
×
  • Create New...