Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

PortalWebHosting
  Ads  
Iron Speed Designer is a software development tool for building database, reporting, and forms applications for .NET without hand-coding.
 


  Sponsors  

Meet Our Sponsors

WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
OnyakTech
The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  User Defined Ta...  Crypt UDT Data ?
Previous Previous
 
Next Next
New Post 6/12/2008 5:08 AM
User is offline Goran Ivanić
28 posts
10th Ranked


Crypt UDT Data ? 

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 7:14 AM
User is offline Stefan Cullmann
1553 posts
5th Ranked








Re: Crypt UDT Data ? 

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.


Stefan Cullmann - stefan.cullmann [at] dotnetnuke.com
form and List will be the successor of the User Defined Table module.
----------------------------------------------------------------------
Do you want to import external data to form and List /User Defined Table?
Check out http://www.codeplex.com/Csv2UDTImport
 
New Post 6/15/2008 4:42 AM
User is offline Sebastian Leupold
15057 posts
www.deutschnetnuke.de
1st Ranked












Re: Crypt UDT Data ? 

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.


Sebastian Leupold

DeutschNetNuke dnnWerk - The DotNetNuke Experts German DotNetNuke User-Group

DotNetNuke Project UserDefinedTable
DotNetNuke Project Release Tracker
 
New Post 6/24/2008 1:17 AM
User is offline Goran Ivanić
28 posts
10th Ranked


Re: Crypt UDT Data ? 

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 3:45 AM
User is offline Sebastian Leupold
15057 posts
www.deutschnetnuke.de
1st Ranked












Re: Crypt UDT Data ? 

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.


Sebastian Leupold

DeutschNetNuke dnnWerk - The DotNetNuke Experts German DotNetNuke User-Group

DotNetNuke Project UserDefinedTable
DotNetNuke Project Release Tracker
 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  User Defined Ta...  Crypt UDT Data ?
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DM Analytics, LLC
DM Analytics, LLC provides software solutions that facilitate rapid development of independent or dependent datamarts and their associated web-based reporting.
www.dmanalytics.com
Integral Hosting | DNN only $14.95/month
Experienced .NET hosting on Windows 2003, ASP.NET 1.1 & 2.0, MSSQL with real technical support.
www.integralhosting.com
Aricie
Aricie is one of the French pioneers and experts in DotNetNuke technology.
www.aricie.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP