.net

runat="server" question

Possible Duplicate: ASP.NET why runat=server Why don't the ASP.NET server controls (or any element with the asp namespace) have a default value of "server" for the runat attribute? As far as I know there is no case when you wouldn't include it or use a different value. I do understand why it is useful for normal html element...

SSCLI (Rotor) for the v4.0 clr?

Does anyone know if there is (or will be) an SSCLI release for the v4.0 runtime? ...

Deploy a .exe and dependent .dll

I have console project. It is developed in VS2010. It uses Mysql.net connector. When I was developing in my machine, Every thing worked fine. I copied the .exe to my friends laptop and tried to run it, but I got an error telling that Mysql.data.client not found. I copied all the dlls in to the project folder. Everything worked fine. ...

Dll not copying to bin folder

I'm having an issue with Devart DLLs not getting copied to the bin folder of my web app. I have my web app project that references projectA. ProjectA references projectB. The Devart Dlls are used in projectB and are not being copied into the web app projects bin folder during a build. ProjectB also references EL Unity dlls and they are ...

RC4 128 bit encryption in C#

I need to perform a 128-bit RC4 encryption, I'm using .NET and C#. Is there a built-in function to do this. If not, I found this function that can do it: public void RC4(ref Byte[] bytes, Byte[] key) { Byte[] s = new Byte[256]; Byte[] k = new Byte[256]; Byte temp; int i, j; for (i = 0; i < 256; i++) { s...

.Net MVC Ajax and Scriptmanager conflict

Hello all, We have a simple ajax link (Ajax.ActionLink(...)) that has been working fine. Recently, another developer added some ajax-ey code to the same page that uses an asp scriptmanager ... now suddenly the first ajax link no longer works. More specifically we get the error : "sys.mvc.asynchyperlink' is null or not an object". Below ...

WPF error CS0433

Hi, I'm getting this error in my WPF application. I get this error not always. If I make Clean and then Rebuild everything is ok. SGEN (0,0): error: Unable to generate a temporary class (result=1). SGEN (0,0): errorCS0433: The type 'XamlGeneratedNamespace.GeneratedInternalTypeHelper' exists...

Why does .net use a JIT compiler instead of just compiling the code once on the target machine?

The title pretty much sums it up but I was wondering why systems like .net compile code every time it is run instead of just compiling it once on the target machine? ...

Which version of the .net framework to use

Hi, I'm developing an application for wide use using c#. I'v writen most of the project, a freeware app, using the 3.5 ,net framework and now it's time to publish this project. And I have run into a few dilemas I would like your opinion . 1] Most people don't have ,net 3.5, should i offer the user to install it? the install is quite...

Component not found when deployed on IIS but found when running ASP development server

We have an VB.net application that is being moved from one box to another. It runs great on the old box. The new box is configured the same as the old one but is on newer hardware. When I run the application on the new server it complains that the adobe toolkit that we use can not be found. The error message is. Compiler Error Message...

Invoking a method of a Generic Class

Here is the Context : I try to code a mapper for converting my DomainModel Objects to ViewModel Ojects dynamically. The problem I get, it's when I try to invoke a method of generic class by reflection I get this error : System.InvalidOperationException : Late bound operations cannot be performed on types or methods for which ContainsGe...

linq to entities case sensitive comparison

This isn't a case-sensitive comparison in Linq to entities: Thingies.First(t => t.Name == "ThingamaBob"); How can I achieve case sensitive comparison with Linq to entities? ...

Why validate an IPAddress?

I am retrieving the IP Address for tracking purposes, this is not something that the user neither inputs nor is it used for any other reason than to track how many times a user has been to a site. The address is stored in a database and used to see if the client has been on the site before. So the question is can an IP Address be us...

Prevent old dll version loading

I'm having a bit of trouble with a simple exe. On the first machine I have .net 3.0, 2.0 (&1.1) and visual studio 2005. When I build the application it correctly loads the 3.0 version of mscrt.dll. I then built a deployment project containing the required libraries and installed it on a second machine which only has .net 2.0. When I ...

LINQ to SQL ToDictionary method

I have a table with a structure like this: Column1 AS INT, Column2 AS INT, Column3 AS INT, Column4 AS DECIMAL My LINQ query is this: var query = from t in context.Table select t; I want to convert/transform the query to this Dictionary object: Dictionary<int, Dictionary<int, Dictionary<int, decimal>>> using only the ToDictionary...

Is there any free ilmerge like tool out there which can merge wpf assemblies?

Hi! I'm looking for a free tool to merge all of my wpf application's assemblies into a single assembly. Usually, I use ILMerge, but unfortunately, it does not support merging WPF assemblies. Are there any tools out there which can achieve that? A commercial tool is not an option for me because the application is an open source project....

how to call a method of a class from another appDomain

hi, my application want to call a method of a class that is from another AppDomain. AppDomain env = AppDomain.CreateDomain( "test", null, new AppDomainSetup() { ApplicationName = "test" } ); Assembly a = Assembly.LoadFrom("d:\\testenv1\\test2.dll"); //env.AssemblyR...

Drawing to and saving a png in vb .net

How could I create a bitmap which is initially completely transparent. I would then like to do some drawing to it, like g.drawImage() and then I would like to save it as a png. How could I do this? Thanks ...

Drawing every VisualStylesElement?

I have made an application that can render and save a given element. With windowElements .Add("statusBar", _ VisualStyleElement.Window.CloseButton.Normal) 'need each element End With 'calculate rect Dim heightMinusFrame As Integer = _ ClientRectangle.Height - frameThickness ' Calculate...

I am a process, how much CPU do I consume?

Is there a way (.net 2.0) for a process to know EXACT amount of processor usage it consumes (something like it would be seen in processexplorer properties/performance graph). Please, don't go much further then semi-esoteric questions (p-Invoke OK) Also, so I don't open yet another question - how can I (as a process) control my own affi...