| Code Identity & Assembly Signing (2 replies) |
| microsoft.public.dotnet.framework.clr |
| Hi, I have a shared component that demands a strong identity permission from callers. All of the code (shared component and callers) are signed with a common key. The shared component has this attribute: [StrongNameIdentityPermission(SecurityAction.LinkDemand, PublicKey "002400000.....")] Things work fine when I use a key pair file supplied with the dot net samples (keypair.dat), see sample on sec... |
|
| using Type.InvokeMember to get class' properties (2 replies) |
| microsoft.public.dotnet.framework.clr |
| I'm trying to get a property of a class using reflections and it works for the members directly defined in the class. FOr example if I have the following structure public class A { public int a; public A(){ a 5;} } public class B { public A x; public int ivar; public B(){ ivar 7; x new A();} } then accessing B.ivar succeeds while trying to get B.x.a fails with exception indicating that this member... |
|
| Reflection.Module (2 replies) |
| microsoft.public.dotnet.framework.clr |
| How can I get the name of the current module, which is executing the current method, at runtime? I am aware of Assembly.GetModules() and Assembly.GetModule(), but these require me to supply the name of the module. Thanks. |
|
| Getting a C# .Net application to run on a non developer machine (13 replies) |
| microsoft.public.dotnet.framework.clr |
| Hi, We are trying to get a copy of our application onto another machine in the company to give clients access to it. We have installed the .Net framework and the Windows Component Upgrade, as well as the .Net framework service pack on the other machine, but not Visual Studio. When we run the compiled executable, we get a CLR exception as soon as the application starts. So we tried writing just a s... |
|
| asynchronous method calls and NUnit test framework (2 replies) |
| microsoft.public.dotnet.framework.clr |
| Any have any problems making asynchronous delegate calls from the NUnit test framework The NUnit framework is throwing the following error: at System.Runtime.Remoting.Messaging.MethodCall.ResolveMethod(Boolean bThrowIfNotResolved) at System.Runtime.Remoting.Messaging.MethodCall.ResolveMethod() at System.Runtime.Remoting.Messaging.MethodCall..ctor(IMessage msg, Boolean needAccessCheck) at System.Ru... |
|
| Byte with custom memory block? (6 replies) |
| microsoft.public.dotnet.framework.clr |
| I have a very large block of data in a fixed memory location that I want to pass around as a managed Byte[]. Is this possible to do without copying the whole block into a new array? If it's not possible with MC , is there a way to do it using raw IL? Sean |
|
| MemoryStream.Write. (5 replies) |
| microsoft.public.dotnet.framework.clr |
| hi, have a problem. I have a string "Blah Blah Blah" How can I put it onto memory stream ??? What I try: Dim s as New MemoryStream Dim sw as New StreamWriter(s) sw.Write("Blah Blah Blah") stream is empty ; ( what's wrong ? thanx. |
|
| TcpClient.RecieveBufferSize (2 replies) |
| microsoft.public.dotnet.framework.clr |
| Hi All I have a small program which makes a request thru a TCP connection to an IP and a port and returns me a response. Here is the following code that is causing me problem. byte[] bytes new byte[clientSocket.ReceiveBufferSize]; RecieveCount inStream.Read(bytes,0,(int)clientSocket.ReceiveBufferSize); responseStr System.Text.Encoding.ASCII.GetString(bytes); The clientSocket.RecieveBufferSize woul... |
|
| Interception (2 replies) |
| microsoft.public.dotnet.framework.clr |
| Hi, I recently came across an article in one of the issues in MSDN mag that talks about Aspect Oriented Programming (http://msdn.microsoft.com/msdnmag/issues/02/03/AOP/AOP.asp). The code examples given make use of method interception allowing pre and post processing of method calls, etc. using tracing as an example. I can think of other places where this may be useful, e.g. auditing, etc. The code... |
|
| Thread-Safety: IHttpModule and System.Cryptography (2 replies) |
| microsoft.public.dotnet.framework.clr |
| Hi there! I am working on an Http Module for ASP.NET and I was wondering what the thread safety concerns are when I want to use Cryptographic Service Provider (such as MD5, RSA, etc.) as a (non static) member variable of the class. All requests that come into one module are handled by instance methods (non static). So what are the implications when these methods (concurrently?) access one provider... |
|
| Does Reflection.Module.GetType() work? (3 replies) |
| microsoft.public.dotnet.framework.clr |
| GetTypes() vs. GetType() ???? I have no problem calling Reflection.Module.GetTypes() and return an array of Type objects, BUT always I get a System.TypeLoadException when calling Reflection.Module.GetType() with a specified type name, like Reflection.Module.GetType("myClass"). If anyone can get Reflection.Module.GetType() to work, I'd love to know how. Thanks in advance. Jorf |
|
| Event Handler Order? (5 replies) |
| microsoft.public.dotnet.framework.clr |
| I have a form containing a textbox, TextBox1, and I wish to add an event handler for the TextChanged event. Normally this is not a problem, but in this case it is the SECOND handler to be added. In particular, there is already a handler that was added in the InitializeComponent() call of the constructor. Here's a simplified code fragment to illustrate... public myForm() { // This call is required ... |
|
| Reflection.Module.GetType (2 replies) |
| microsoft.public.dotnet.framework.clr |
| I am getting a System.TypeLoadException when calling Reflection.Module.GetType("myClass"). I am able to successfully call Reflection.Module.GetTypes() and return an array of type objects. I iterate through the collection of types returned, and I find a type with the exact name "myClass" returned. I have tried calling three different overloaded forms of Reflection.Module.GetType(), with different c... |
|
| Error 0x80131019 strikes back but with dirrerent conditions (3 replies) |
| microsoft.public.dotnet.framework.clr |
| Hi All, I'd greatly appreciate any suggestions on how to overcome that nasty 0x80131019 error. I have searched .NET groups archives and everything I could found were advices to put an assembly to GAC or to change "Copy Local" property value to False. Unfortunately, this does not apply to my case as I am trying to load an assembly written in Managed C into dynamically created AppDomain. The code sn... |
|
| CryptoAPI to .net Managed Classes (2 replies) |
| microsoft.public.dotnet.framework.clr |
| I have a need to encrypt data in VB6 using the CryptoAPI and then decrypt in C#. I have no problem w/ encrypting in VB6. The problem I'm having is in C#. There's no mention of IV's when it comes to the CryptoAPI. How do I derive the right key and IV in C# for a successful descryption? I'm using DES to encrypt the data, and SHA1 to for the CryptoAPI hash key. David B. Bitton david@codenoevil.com ww... |
|
| AppDomains and Unsafe code (2 replies) |
| microsoft.public.dotnet.framework.clr |
| How do Application Domains handle unsafe code ? The existence of several AppDomains ( thin processes )in the same physical process depends, as far as I gather , on the inability of type safe code to address or change memory outside the AppDomain logical boundary. This is not the case for unsafe code, for example MC or C# with unsafe pointers. Is a separate physical process created for each AppDoma... |
|
| GC.Collect - Does it collect for sure (3 replies) |
| microsoft.public.dotnet.framework.clr |
| The GC.Collect method call When executed, does it enforce a GC collection or does it have the option to forgo the collection. MSDN says that it forces collection, but that all the inaccessible memory might not be reclaimed. Is there any tool through which one can view when a collection occurs ? Thank you tanveer |
|
| C# Console application failes to start from service (5 replies) |
| microsoft.public.dotnet.framework.clr |
| I have a system service which uses CreateProcess() to spin off console applications to do infrequent tasks. The service runs logged on as a specific user (rather than "Local System" which is not an option). I can use C console programs OK from this set up even if they write to the console screen. When I try to use a .Net (C#) console app it fails it gets created but seems to terminate with a retur... |
|
| .NET Framework Security (4 replies) |
| microsoft.public.dotnet.framework.clr |
| I recently read ".NET Framework Security," especially Ch. 23 26 regarding how to secure your own application, such as avoiding potential holes that may be exploited by hackers who use your assembly for their purpose. Here is my question: This sounds much like security involving class libraries. I can see how functionality in class libraries should be watertight to avoid any holes so that other cla... |
|
| How do I check to see if an object's type is derived for System.Exception? (4 replies) |
| microsoft.public.dotnet.framework.clr |
| How can I check to see if an object derives for System.Exception? This is my psudo code: foo(object o) { if (o is a derived class from System.Exception) { do something; } } |
|
| how to capture DataGrid.KeyDown event (3 replies) |
| microsoft.public.dotnet.framework.clr |
| Hi, The default behavior of DataGrid is that delete a row without any warn after the DEL was pressed, now I want to delete a row after confirmation, so I have to capture KeyDown event, dg1.KeyDown KeyEventHandler(this.dg1 KeyDown), but this evnet can not be capture after a row was selected, but it is ok when there is no row selected, can you help me? ZhangZQ |
|
| ThreadPool implementation - why worker threads pool doesn't use completion port? (3 replies) |
| microsoft.public.dotnet.framework.clr |
| Hi, From all my Win32 experience I've learned that any scalable thread pool implementation must use completion port, and more than one busy thread per CPU is inappropriate in most cases. But recently I've spent several hours to research how System.Threading.ThreadPool is working and found that it allows several busy threads per cpu (7 threads for my 20 requests). My thread function used computatio... |
|
| Unloading Assemblies (i.e. AppDomain hell) (4 replies) |
| microsoft.public.dotnet.framework.clr |
| I just "finished" writing a script host that does everything I want it to do. It's fast, type safe, and sweet. Its only problem is that its memory usage grows without bound as more and more scripts get executed. I came to this newsgroup and discovered that my problem is that the generated assemblies never get unloaded. I've read all the earlier posts on how assemblies can't be unloaded without doi... |
|
| Loading an assembly in another appdomain (5 replies) |
| microsoft.public.dotnet.framework.clr |
| Hi, I have a problem with loading an assembly into an appdomain which is already bound. For example, i want to load an assembly from "c:\temp\myassembly.dll" into an appdomain which is already there. I am enumerating the appdomains and trying to load the assembly. I am getting the exception as "File myassembly, or one of its dependencies not found". This error is valid since the applicationbase fo... |
|
| "Requested registry access is not allowed" received using EventLog in secondary domain (9 replies) |
| microsoft.public.dotnet.framework.clr |
| Stuck on what appears to be a security problem. I'm creating a second domain in my NT Service and have loaded an assembly into this new domain. One of my classes in the new domain attempts to write to the EventLog but fails with a "Request registry access is not allowed" (which is written to the event log :) The code that creates the AppDomain is: AppDomainSetup setup; Evidence baseEvidence; Evide... |
|