Click here to Skip to main content
15,927,212 members
Home / Discussions / C#
   

C#

 
GeneralRe: DataGrid Sorting Problem using a DataSet from ViewState Pin
Heath Stewart20-Sep-04 13:54
protectorHeath Stewart20-Sep-04 13:54 
GeneralC# and org.apache.log4j.PropertyConfigurator Pin
devvvy20-Sep-04 4:22
devvvy20-Sep-04 4:22 
GeneralRe: C# and org.apache.log4j.PropertyConfigurator Pin
Heath Stewart20-Sep-04 6:46
protectorHeath Stewart20-Sep-04 6:46 
GeneralRe: C# and org.apache.log4j.PropertyConfigurator Pin
Steven Campbell20-Sep-04 7:06
Steven Campbell20-Sep-04 7:06 
GeneralRe: C# and org.apache.log4j.PropertyConfigurator Pin
Heath Stewart20-Sep-04 7:11
protectorHeath Stewart20-Sep-04 7:11 
GeneralRe: C# and org.apache.log4j.PropertyConfigurator Pin
devvvy21-Sep-04 7:53
devvvy21-Sep-04 7:53 
GeneralRe: C# and org.apache.log4j.PropertyConfigurator Pin
devvvy21-Sep-04 7:52
devvvy21-Sep-04 7:52 
GeneralRe: C# and org.apache.log4j.PropertyConfigurator Pin
Heath Stewart21-Sep-04 11:01
protectorHeath Stewart21-Sep-04 11:01 
To what end? If you're trying to encrypt communication, simply install a SSL cert on the server with the "Server authentication" OID (from VeriSign[^], Thawte[^], or a handful of others) and encrypt HTTP over SSL (HTTPS). Done. ASP.NET honors this because the SSL handshaking happens before the HTTP protocol.

If you need a way to encrypt data, consider using what ASP.NET already exposes: read about the <machineKey> element, which is auto-generated by default in your machine.config file, and can be explicitly set in your machine.config file, your site Web.config (the one in the root, or /), and your application Web.config file.

For a simle way to generate validation (public) and decryption (private) keys, read How to create keys by using Visual C# .NET for use in Forms authentication[^].

Now, if neither of these scenarios work, then I would recommend you do what you're doing with a slight modification: group your sections together under a section group like so:
<configuration>
  <configSections>
    <sectionGroup name="mycompany">
      <section name="securityInfo" type="System.Configuration.NameValueSectionHandler, System" />
      <section name="licenseInfo" type="System.Configuration.NameValueSectionHandler, System" />
    </sectionGroup>
  </configSections>
  <!-- other stuff -->
  <mycompany>
    <securityInfo>...</securityInfo>
    <licenseInfo>...</licenseInfo>
  </mycompany>
</configuration>
Make sure to change ConfigurationSettings.GetConfig("securityInfo") to ConfigurationSettings.GetConfig("mycompany/securityInfo"), for example.

This helps group related sections together so as not to be confused with others, or just to form a better hierarchy of settings. For example, the <system.web> element is another section group with child elements handled by lots of different section handlers.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles]
GeneralRe: C# and org.apache.log4j.PropertyConfigurator Pin
devvvy22-Sep-04 17:26
devvvy22-Sep-04 17:26 
GeneralRe: C# and org.apache.log4j.PropertyConfigurator Pin
Heath Stewart22-Sep-04 20:21
protectorHeath Stewart22-Sep-04 20:21 
GeneralRe: C# and org.apache.log4j.PropertyConfigurator Pin
devvvy22-Sep-04 20:39
devvvy22-Sep-04 20:39 
GeneralRelating datagrid rows to datatable rows Pin
blakeb_120-Sep-04 4:07
blakeb_120-Sep-04 4:07 
GeneralRe: Relating datagrid rows to datatable rows Pin
Anonymous20-Sep-04 8:24
Anonymous20-Sep-04 8:24 
GeneralCrystal Reports progress in an app Pin
Mr. Labenche20-Sep-04 4:04
Mr. Labenche20-Sep-04 4:04 
GeneralRe: Crystal Reports progress in an app Pin
Dave Kreskowiak20-Sep-04 6:44
mveDave Kreskowiak20-Sep-04 6:44 
GeneralRe: Crystal Reports progress in an app Pin
Mr. Labenche23-Sep-04 1:24
Mr. Labenche23-Sep-04 1:24 
GeneralSearch and display text in richtextbox Pin
clatten20-Sep-04 3:24
clatten20-Sep-04 3:24 
GeneralRe: Search and display text in richtextbox Pin
mav.northwind20-Sep-04 3:48
mav.northwind20-Sep-04 3:48 
GeneralRe: Search and display text in richtextbox Pin
clatten20-Sep-04 5:14
clatten20-Sep-04 5:14 
GeneralCrystal Reports progress in an app Pin
Mr. Labenche20-Sep-04 2:58
Mr. Labenche20-Sep-04 2:58 
GeneralRegister and unregister a Windows Service programmatically... Pin
Salil Khedkar20-Sep-04 2:00
Salil Khedkar20-Sep-04 2:00 
GeneralRe: Register and unregister a Windows Service programmatically... Pin
S Sansanwal20-Sep-04 13:52
S Sansanwal20-Sep-04 13:52 
GeneralUsing Excel.WorksheetFunction in C# Pin
itstime9820-Sep-04 1:00
itstime9820-Sep-04 1:00 
GeneralRe: Using Excel.WorksheetFunction in C# Pin
sreejith ss nair20-Sep-04 1:08
sreejith ss nair20-Sep-04 1:08 
GeneralRe: Using Excel.WorksheetFunction in C# Pin
itstime9820-Sep-04 1:39
itstime9820-Sep-04 1:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.