|
hello,
I have created a dynamic textbox in an asp.net and fill the value dynamically. But the value doesn't show up on the page. I think system has overwrite the value on my dynamic textbox.
I tried to trace the textbox. But couldn't do it. Can anyone give me the best way to trace the textbox. or if I can set a break point for my dynamic textbox.
any suggestion will be appreciated.
Thanks, Suds
======
You need a head to program. Cool, fast and sharp.
|
|
|
|
|
|
sorry!
======
You need a head to program. Cool, fast and sharp.
|
|
|
|
|
how to use COM which written by visual c++ ATL?
|
|
|
|
|
|
how can i disable the task manager from my program
|
|
|
|
|
You can do it thought the registry. Or, I guess you could mess around with the taskman executable in the sys dir or somewhere...
/\ |_ E X E GG
|
|
|
|
|
But, the real question is: Is that really all that wise?
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
|
|
|
|
|
Do I have to answer?
/\ |_ E X E GG
|
|
|
|
|
You can take the fifth if you want to. It is your constitutional right.
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
|
|
|
|
|
My windows service is working fine in WinXP SP1, but it can't start in Win2K Server SP4. The error message is: "The service did not respond to the start or control request in a timely fashion."
Any idea?
Thanks
|
|
|
|
|
That's a very generic error message for any service that can't start. I recommend you set the AutoLog property to true and check the event log (eventvwr.exe) for more detailed information.
It may be that you're using functionality only supported in XP and newer, but without more information it is impossible to determine.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
AutoLog is set to true. Another message that I get from EventViewer is "Timeout (3000 ms) waiting for the service to connect".
I do not use any XP specific function. In fact, my OnStart() and OnStop() are empty.
Thanks for your response.
|
|
|
|
|
You might explain what your service does, then. Like I said - any service (native, .NET, VB, whatever) will report that (it's actually the service control manager (SCM)) when any error occurs. It expects that the service itself will report additional information in the event viewer (like it should).
If you link against other assemblies (besides the .NET BCL assemblies), make sure they are in the same path, in the GAC, or in a path configured in your service's .config file. Read How the Runtime Locates Assemblies[^] in the .NET Framework SDK for more information about how assemblies are located.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
|
Just be clear, I am talking about "Windows service" not "web service."
|
|
|
|
|
Web.config is what ASP.NET uses. Windows applications that are launched by the executable loader use the "appname.exe.config" file-naming convention. It's all about what sets up the default AppDomain, loads the AppDomainSetup , and loads and executes the target assembly.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Can anyone tell me how to perform a hit test on a GDI Region from a mouse point ?
|
|
|
|
|
[StructLayout(LayoutKind.Sequential)]
struct RECT
{
public int left;
public int top;
public int right;
public int bottom;
}
[DllImport("gdi32.dll")]
static extern bool RectInRegion(IntPtr hrgn, ref RECT lprc);
Just convert your point to a RECT first.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Just in case you're using .NET's GDI+
(assuming you have a Region r)
<br />
bool hit = r.IsVisible(new Point(x, y))<br />
Just look up the IsVisible(...) method on MSDN.
|
|
|
|
|
I am developing a program to sign documents with it. When the document is going to be signed, I have to select a certificate, but, where is the private key associated?
Also I would like to know if it is possible to download a Certificate Authority to install in my PC to make testings (I have Win 2000 Proffessional, I know that there is one in Server edition but my PC is not powerful enough...).
Thank you for the information.
-.Rodrigo.-
|
|
|
|
|
Did you take a look at my article at http://www.codeproject.com/dotnet/xmldsiglic.asp[^]? It discusses this a little.
The private key is acquired from a CSP as I mentioned earlier (I believe you were the same person, only anonymously). The CSP is encapsulated in various CSP classes in the .NET BCL but how you access that key isn't always the same. To access the key in my article, for example, I had to use the key at index 1 (0-based, IIRC) because index 0 were keys used only for exchange data. If you could describe a little more about what you're doing, we might be able to help a little more.
If you need to create a self-signing CA, I suggest you download OpenSSL[^]. I wrote an article a while back using a custom configuration file, but when the old site upgraded the downloads were lost and I no longer have the ZIP that contains the config. You can construct one using OpenSSL's default configuration, however, along with their instructions. Just be sure to create a CA that can sign for different capabilities (like server authentication, client authentication, software signing, or whatever you need - or just all capabilities to make it easier).
It's really not too difficult if you read the README file, and I actually think it's a little easier once you get the hang of it than Windows CA Server (which is tightly coupled with the domain).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I have the following code:
/* In myprog.exe - I get an exception here */
catch (LdapException e)
{
string port = String.Format("{0}", ldapPort);
m_log.LogMessage("strCantConnectToLdap", "strCantConnectToLdapTitle", e, ldapHost, port, loginDN);
return false;
}
/* which calls this in my.dll */
public DialogResult LogMessage(string headerTag, string messageTag, LdapException e, string sub1, string sub2, string sub3)
{
string [] subParams = new string[3];
subParams[0] = sub1;
subParams[1] = sub2;
subParams[2] = sub3;
return FullLogMessage(headerTag, messageTag, MigError.ErrorLevelE.ERROR, e, subParams);
}
/*which call this in my.dll */
public DialogResult FullLogMessage(string messageTag, string headerTag, MigError.ErrorLevelE level, Exception exception, string [] subParams)
{
// Rework for different types of exceptions
if (exception != null)
{
if (exception is LdapException) /* should succeed but doesn't - why?*? */
{
LdapException e = exception as LdapException;
format = LoadString("strLdapExceptionFormat");
string ldapErrorString = MapLdapError(e.ResultCode);
exceptionMessage = String.Format(format, e.LdapErrorMessage, e.resultCodeToString(), ldapErrorString, e.StackTrace);
}
else
... <falls through="" to="" here="" instead="" why??? ="">
}
}
Any ideas?
BRCKCC
|
|
|
|
|
hello,
I am trying to sign data with a CAPICOM.SignedData object.
The SignedData object has got a method called Sign() which performs the operation and this method has got a parameter called Signer which (according to the CAPICOM reference) "must have access to the private key of the certificate used to sign".
I had understood that a public key certificate contains the subject's public key. so, I think that "the private key of the certificate used to sign" means that the certificate does not contain the subject's private key but that is associated with it. My questions are:
1. how is this association?
2. where is stored the private key?
3. how can I obtain a signing private key?
thanks in advance
|
|
|
|
|
Don't use CAPICOM (an interop library). Almost all the functionality of the CryptoAPI is encapsulates in the System.Security.Cryptography namespace and child namespaces and is written to support .NET while using the CAPICOM requires marshalling and isn't always .NET-friendly.
When you sign data, you sign with your private key. This allows the recipient(s) to verify your signature (an encrypted digest of the clear-text, typically) using your public key. RSA uses the same signature and encryption algorithms, where DSA uses different algorithms (more secure).
The private key is maintained soley by the user. It should never be uploaded to a PKI server or be available for others. That would defeat the whole purpose of public key encryption. Only the public key is made public, hence the name.
If you're trying to access your private key, you must provide CSP (cryptographic service provider) information to use a CSP (software-based, smart card, etc.) that contains a private key, as well as how to access that private key.
If you want, see my list of articles (link to them in my sig) for the XML Digital Signatures article. That contains information about using XML signatures and the SignedXml and SignedInfo classes to access your private key in a software-based provider (used by the sn.exe .NET Framework utility app) using the right index into the right key provider.
Microsoft MVP, Visual C#
My Articles
|
|
|
|