Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListCrypt UDT Data ?Crypt UDT Data ?
Previous
 
Next
New Post
6/12/2008 7:08 AM
 

Hello,

is it possible do crypt some tables in dnn database ?

I wan to put my business data on my web page, but i don't wont to my hosting provider or any else to read my data directly from database.

Is it possible to use UDT with crypted data in dnn table?

Thank You

 
New Post
6/13/2008 9:14 AM
 

Do you mean the Encryption features inside SQL2005/2008?

UDT has no option build in to enable table encryption. I am not familiar with this feature, so I can't tell you whether it is possible or not.

 
New Post
6/15/2008 6:42 AM
 

you can either modify UDT dataprovider to encrypt data before storing in the database or you can use SQL Server 2005 Encryption, converting UserdefinedData.FieldValue into an encrypted column, which requires to modify the stored procedures. Please refer to SQL Server documentation for details.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
6/24/2008 3:17 AM
 

I have try to encrypt data bat i have problems ...

1. I have create SQL Server 2005 Encryption

create master key encryption by password = 'SecretPassword';
create certificate MyCert with subject = 'MyCertSubj';

create symmetric key MyKey with algorithm=AES_256 encryption by certificate MyCert;

2. I have modify table UserDefinedData, FieldValue to varbinary(68)

3. procedure changes

USE [dbj_a]
GO
/****** Object:  StoredProcedure [dbo].[UserDefinedTable_AddData]    Script Date: 06/23/2008 18:11:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[UserDefinedTable_AddData]
@UserDefinedRowId    int,
@UserDefinedFieldId  int,
@FieldValue          varbinary(68)
AS
INSERT INTO dbo.UserDefinedData
            ( UserDefinedFieldId,  UserDefinedRowId,  FieldValue)
     VALUES (@UserDefinedFieldId, @UserDefinedRowId, EncryptByKey(Key_GUID('MyKey'), @FieldValue))

4. procedure changes

USE [db_a]
GO
/****** Object:  StoredProcedure [dbo].[UserDefinedTable_GetRow]    Script Date: 06/23/2008 18:16:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[UserDefinedTable_GetRow]
@UserDefinedRowId   int,
@ModuleId           int
AS
SELECT F.FieldTitle,
       cast(DecryptByKey(D.FieldValue) as varchar(16)) as "FieldValue",
       F.FieldType
FROM dbo.UserDefinedData D
INNER JOIN dbo.UserDefinedFields F on D.UserDefinedFieldId = F.UserDefinedFieldId
WHERE  D.UserDefinedRowId = @UserDefinedRowId
AND    F.ModuleId = @ModuleId

And I have this error while i try to add some data on dnn:

Error: Edit User Defined Table is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: Operand type clash: ntext is incompatible with varbinary ---> System.Data.SqlClient.SqlException: Operand type clash: ntext is incompatible with varbinary at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, String spName, Object[] parameterValues) at DotNetNuke.Modules.UserDefinedTable.SqlDataProvider.UpdateData(Int32 UserDefinedRowId, Int32 UserDefinedFieldId, String FieldValue) at DotNetNuke.Modules.UserDefinedTable.EditUserDefinedTable.cmdUpdate_Click(Object sender, EventArgs e) --- End of inner exception stack trace ---

Please what to do next, and where is the problem ?

 
 
New Post
6/24/2008 5:45 AM
 

you need also to alter the stored procdured for writing values, which use typed parameter for FieldValue.

Also you shouldn't limit the size to 68 bytes, or you will be unable to store larger values like texts.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListCrypt UDT Data ?Crypt UDT Data ?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out