I'm refactoring a program containing a lot of
forms created dynamically from run-time informations.
To reduce the level of complexity of the system, I thought to write individual code files for each of these forms.
Since the forms are many, I'm thinking for a way to automate the process of creation of the forms source code files from ...
I'm doing a presentation in few months about .Net performance and optimization, I wanted to provide some samples of unnecessary optimization, things that will be done by the compiler anyways.
where can I find some explanation on what optimizations the compiler is actually capable of maybe some before and after code?
...
I want to start working with databases using the .NET framework.
From where can I download free Microsoft SQL?
Is there any tutorial for how to build and config a db and how to declare on tables and such
I got all the thoracic knowledge and i know the SQL Lang but i have never build db from scratch or used SQL queries using c# so thi...
I'm having a bit of trouble trying to add an object to the database using LINQ to SQL.
I have three tables in my database:
--------------------------------------------
tblShows
--------------------------------------------
ShowID | Name
--------------------------------------------
--------------------------------------------
tblShow...
This doesn't make any sense to me.
Look at this ViewModel:
public class SelectService
{
[Required]
public int? SelectedServiceId { get; set; }
}
Look at this Action:
[HttpPost]
public virtual ActionResult SelectService()
{
TryUpdateModel(WizardContainer.SelectService, "SelectService");
TryValidateModel(WizardContaine...
Hi guys,
I've just read on the net about a newly discovered security vulnerability in ASP.NET. You can read the details here.
The problem lies in the way that
ASP.NET implements the AES encryption
algorithm to protect the integrity of
the cookies these applications
generate to store information during
user sessions.
This...
A colleague of mine created an assembly in VB.net for use with JScript via COM interop. The assembly used to work fine, but we signed it and now it only seems to work on Windows 7 machines. I've tested 2 Windows 7 machines and 2 Windows Vista machines.
When we signed the assembly and we try to instantiate the ActiveX object in JScript...
I'm using C#, and while working on a sending mail routine using the tools available on the .NET Framework and I've sumbled upon two situations
One mail server that requires SSL
One mail server that doesn't support SSL
So when using a generic mail sending tool, I've noticed that I should ask the user if SSL should be used, or figure...
I am currently trying to retrieve the signal strength from a wireless access point using the wlanapi.dll WlanQueryInterface call.
Here is my api declaration
[DllImport("wlanapi.dll", SetLastError = true)]
private static extern UInt32 WlanQueryInterface(IntPtr hClientHandle, ref Guid pInterfaceGuid, WLAN_INTF_OPCODE OpCode, IntPtr p...
My goal was to create a REST service that will allow me to POST and GET images. I've got the GET portion working, however I'm having difficulty posting an image to the service I created. Using the WCF REST Service Template 40 (CS) template I created the following method to handle my POST.
[WebInvoke(Method = "POST", UriTemplate = "upl...
I was reading this article on warping text to splines and decided to play around with GraphicsPath.AddString which I had never used before.
I created a simple test Control to compare the three methods of drawing text: GraphicsPath.AddString, TextRenderer.DrawText, and Graphics.DrawString.
Here is the OnPaint method of my control.
...
Instance A is trying to restore instance B's window, but I can't get the B's window handle. I think the problem is that the window is being minimized by B to the system tray using:
this.Visibility = Visibility.Hidden;
And A is trying to get B's window handle using:
Process process = Process.GetCurrentProcess();
Process.GetProcessesBy...
Lately I've been looking into the .NET based ORMs that are available. I've noticed that each ends up siting in one or two camps. In one camp the database is created first, and the ORM provides an easier way to access the database in an application. In the second camp the object model exists first and the ORM facilitates persisting the ob...
I'm familiar with .Net and what assemblies are - but sadly my Java knowledge isn't as strong.
I know Java and .Net are different "worlds" (possibly like comparing apples with pears) but are JARs and .Net Assemblies roughly eqivalent concepts?
Edit: Update base on initial responses
The way I interpret this is that yes they have similar...
Hi All,
I need some reference to a realiable source on the internet (a link or something), that would show the market share comparision of each of the mentioned technologies - .NET and JAVA. Something that would be dated to 2009 at most. I have found something in 2007, but I guess in two years some things might have changed. I have real...
'Microsoft.VisualBasic.Interaction.MsgBox' method always brings up windows taskbar when any message is displayed. How to fix this issue? I want the message to be the top most but windows taskbar shouldn't be visible.
Appreciate your help!!
...
There is a lib that outputs its results into a given Stream object. I would like to begin consuming the results before the lib is done. The Stream should be blocking to simplify usage and avoid excessive memory consumption if producer runs ahead too far; thread safe to allow independent existence of producer and consumer.
Once the lib f...
Hi,
I'm writing once again about my encoding issue... Now with some code samples.
In a nutshell: when saving to database input data, some language specyfic characters like polish 'ń' won't save - insted 'n' is saved. On the other hand, string: Adams æbler, with æ is saving.
Here is code begind code that does save stuff and displays d...
I have compiled an assembly using the Microsoft Strong Name key convention and marked it to be "AllowPartiallyTrusted".
I am testing the application against this assembly from two different machines.
One is running windows 2003 server and the other machine is on windows XP Professional.
I am able to invoke the methods on the assembly f...
I have a WCF referencing a managed assembly in the project. The managed assembly inturn invokes an unmanaged assembly which is copied to the bin folder of the WCF. During runtime, calling any method in managed assembly throws exception "Attempted to read or write protected memory. This is often an indication that other memory is corrupt....