|
Your setup routine could add write privileges to the users, either to the startup directory or to the file(s) of your database.
|
|
|
|
|
The data should not be in the program directory.
|
|
|
|
|
HI all,
I am having a value in a encrypted format and the encryption and decryption technique used id 3DES.And also i am having a decryption key which is like "abcdefghiABCDEFGHI12345jKlMnopqrstuvWxYz67890ZLM" (i.e., length is 48).
Now can any one tell me how can i decrypt the encrypted value using decryption key.
And i am using the DNN database.
Thanks in advance.
modified on Thursday, February 17, 2011 11:41 PM
|
|
|
|
|
Decryption is the reversal of encryption: Whatever code you used to encrypt should provide the basis for your decryption routine.
There is an example of doing both here[^] which may help you, although it does some ancillary stuff you may not want. However, it should compare to your encryption code reasonably easily.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Digital man: "You are, in short, an idiot with the IQ of an ant and the intellectual capacity of a hose pipe."
|
|
|
|
|
According to Wikipedia (http://en.wikipedia.org/wiki/Triple_DES[^]), Triple DES uses three keys of 56 bits(! that is 7 bytes each, or 21 bytes in total). Something seems to be wrong with your 46 characters string. Perhaps a hash function is required to get the "real" key from your string?
|
|
|
|
|
Take a look at there[^] having same type question with some perfect solution.
hope it will works for you.
|
|
|
|
|
What is the mechanism to prevent other users to use class libraries developed and used in distributed UI application, neither as stand alone or by adding the reference to the UI application?
In native dll it is possible to handle licening e.g. in dll load event.
Чесноков
|
|
|
|
|
Use Friend Assemblies: Friend Assemblies at MSDN[^]
Your functions and classes can only be used by assemblies using a certain namespace, further protection is done using keys. This does not prevent ILDASM from disassembling though.
To prevent ILDASM from disassembling it, add this: [assembly: SuppressIldasmAttribute()][^]
|
|
|
|
|
I experienced that from the other side: a long time ago, I tried to use a data mining dll from SQL Server in my application. When I instantiated the COM object, I got a message that I had no license to do so.
From that experience, I'd think of some licensing mechanism, likely with asymmetric encryption (only the "public" key would be stored somewhere in the application and could be read by reverse engineering).
The reference to your dlls could still be added, but they would not be useful.
|
|
|
|
|
You might want to look at the ILMerge tool.
|
|
|
|
|
Hi all,
I am currently trying to send a COM Event from a .NET Assembly to another application. Therefore I am applying the approach that's found multiple times across the internet. Here it's outlined for short.
[ComVisible(false)]
public delegate void OnNotifyDelegate();
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface Events
{
void OnNotify();
}
[Guid(EventSource.ClsID)]
[ClassInterface(ClassInterfaceType.None)]
[ComSourceInterfaces(typeof(Events))]
public class EventSource : ServicedComponent, EventInterface
{
private const string ClsID = "4A235195-E8B3-473b-8F14-F7F0ADFC40E0";
public event OnNotifyDelegate OnNotify;
public EventSource() { }
public void CauseOnNotify()
{
OnNotify();
}
}
Now, to raise the OnNotify Event I created a small WPF Application with a button, whose Click handler invokes the method CauseOnNotify above. I don't show it here, because that would be verbose.
What I get is a NullPointerException because OnNotify is at the time it's invoked null.
My question is: None of the examples mentions a instanciation of the delegate (which is why its null, but under which circumstances does this exception not happen? Where is the instance coming from?
thanks in advance
Lars
#pragma error( disable : * )
|
|
|
|
|
When some other object has registered for the event?
I haven't tested with COM, but it looks similar to raising a "normal" .NET event:
if (this.MyEvent != null)
{
this.MyEvent(this, new EventArgs());
}
Only after an object has registered for MyEvent, it is different from null.
|
|
|
|
|
Hello
In my program I dynamically load DLL, but I have some problem. Dll use my program config and not his own confg. Here is part of the code:
Assembly assemblyInstance = Assembly.LoadFrom(assembly);
Object ProviderClass = assemblyInstance.CreateInstance(type);
object[] methodMaramList = new object[1];
methodMaramList[0] = logInInfo;
if (providerInfo.GetInformation == false)
throw new Exception("This provider does not support get abonent function.");
authorizationResponse = (AuthorizationResponse)assemblyInstance.GetType(type).InvokeMember(method,
BindingFlags.Public |
BindingFlags.InvokeMethod |
BindingFlags.Instance,
null,
ProviderClass,
methodMaramList);
|
|
|
|
|
Which one of the code lines causes a problem? What's the error message?
What is "providerInfo"?
|
|
|
|
|
Hi,
When I try to enter ALT+1(Num Lock pad) in a text box, its loading as ☺ in textbox. How to avoid such symbols. I tried to avoid taking input from num lock pad and wrote the below code. But still its showing symbols. Please let me know how to avoid those. Thanks in advance
private void txtHotKey_KeyDown(object sender, KeyEventArgs e)
{
//for Num Lock keys 0-9
if (e.KeyValue==18 || e.KeyValue > 95 && e.KeyValue < 106)
{
return;
}
}
|
|
|
|
|
Pressing Alt with the number keys generates special characters with the value of the keys pressed. So for example Alt+65 would give the character A which has the decimal value 65 (hex 41).
I must get a clever new signature for 2011.
|
|
|
|
|
thats fine.. But how to avoid those special symbols programmatically.
|
|
|
|
|
HaroldVish wrote: But how to avoid those special symbols programmatically
You shouldn't. The facility is provided to allow people to enter codes which are not directly available from their keyboard: À rather than A for example. It you cut down on what a user is used to doing, then they will probably get frustrated and annoyed with your program.
Imagine for example, that someone wishes to enter Arabic or Chinese characters: should you stop that, too?
Why are they causing you a problem?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Digital man: "You are, in short, an idiot with the IQ of an ant and the intellectual capacity of a hose pipe."
|
|
|
|
|
Did you notice that little KeyEventArgs thingy in the KeyDown handler? it has some properties and some methods, you need one of each: Handled and SuppressKeyPress() . Use Google and read the documentation.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Hi,
Create a function which scan all text char and check whether it is a special character or not, if it is then remove the character. Call this function on the leave event or text change event.
C#, VB.NET,ASP.NET DEVELOPER
|
|
|
|
|
hi
looking for how to make my own MessageBox sample code
something simple that has title, body text and yes/no button
and how to use it
thanks in advance
|
|
|
|
|
|
Why would want to reinvent the wheel?
|
|
|
|
|
|
Hello all,
i'm trying to do sequential reading from a OleDbDataReader that is retrieving an xml stream generated (string) in the sql server but i end up with an invalid cast exception.
The same code works like a charm using SqlDataReader, but for some reason, i had to integrate with another connection object and retrofit the code to use OleDbDataReader.
Have anyone ever experienced something like this?
_reader = _command.ExecuteReader(CommandBehavior.SequentialAccess);
while (_reader.Read())
{
_index = 0; ;
_read = _reader.GetChars(0, _index, _chbuff, 0, BUFF_SIZE);
while (_read > 0)
{
_writer.Write(_chbuff, 0, (int)_read);
_writer.Flush();
_index += _read;
_read = _reader.GetChars(0, _index, _chbuff, 0, BUFF_SIZE);
}
}
|
|
|
|