.net-3.5

EFv1 mapping 1 to many Relationship to POCOs

I'm trying to work through a problem where I'm mapping EF Entities to POCO which serve as DTO. I have two tables within my database, say Products and Categories. A Product belongs to one category and one category may contain many Products. My EF entities are named efProduct and efCategory. Within each entity there is the proper Navigat...

Dependency Injection wcf

I want inject a implementation of my Interface in the WCF but I want initialize my container of Dependency Injection in the Client of the WCF. So I can have a different implementation for each client of the my service. Help me please. ...

If we can assign a Lamda expression to a delegate type .Does Lamda expression converted to a delegate internally

Does the lamda expression converted to a delegate of type SqureDelegate in the below code? Are all lamda expression or statments internally a delegete. public delegate int SqureDelegate(int a); class Program { static int Squre(int i) { return i*i; } static void Main(string[] args) { S...

Does Win 2008 r2 x64 server come with .net 3 sp1 package already installed?

same as in title? I have a test server with mentioned OS and my app is .net 3.5 based. I do want to know if win 2008 r2 comes with service pack 1 for .net 3.5 from the box. And does it come with .net 3.5 sp1 family update as WELL, since after I downloaded the update, the installer says I do not have software required to update. Could som...

Is it possible to create custom methods in entity classes in linq to sql

I have a table Site in SQL with (amongst others) three properties idReviewer1, idReviewer2, idReviewer3. Now I would like to create a methods on the entity class of Site to check if a user is a reviewer: partial class Site { public bool IsReviewer(int idUser) { return idReviewer1 == idUser || idReviewer2 == idUser || i...

WCF Error - Security processor was unable to find a security header in the message

Hi, I'm getting what appears now to be a security error in my WCF Service. Originally my error was about a falted state(removed using around client proxy to clear this error), but have found more information through enabling trace. I have been unable to get my solution running after encountering this error, and even my backup copy now...

Raise of Gen 0 collections, 80% time spent in Garbage Collector

We believe we have a memory congestion problem. Not ground-breaking on itself, but what surprises me is that if the number of sessions on our ASP.NET site rises above a certain threshold (about 600 concurrently logged in users, around 40 requests / sec), the GC starts to choke. We know that our application has some smaller memory leaks....

WinMo > ASMX WebException - how to get details?

Okay, we've got an application which consists of a website hosting several ASMX webservices, and a handheld application running on WinMo 6.1 which calls the webservices. Been developing in the office, everything works perfect. Now we've gone to install it at the client's and we got all the servers set up and the handhelds installed. ...

SL 3 navigation not working!

Hey Guys I converted all my existing Silverlight app UserControls to Pages so I could use the Navigation Framework. Anyway so I created a UserControl called MyFrame, which would host all the pages. In my App.xaml.cs I have the following to make sure that MyFrame is loaded when the App loads: private void Application_Startup(object se...

Team build of Web Projects generates App_web_xxxx.dll files and TFSBuild.Proj Script

Hi all, I have a web application that has some non-web projects as well. When using Web Deployment, a single assembly is generated for all the aspx.vb files. When using Team Build (TS 2008), a lot number App_Web_xxx.dll file(s) are generated instead of a single assembly. How can i solve this problem and change the TFSBuild.proj file ...

Getting selected checkboxes in a gridview in ASP.Net

I am using a gridview in asp.net with the left column being checkboxes. How can I tell which rows have a checkbox "checked" upon button submit? ...

Attempt to use DLL results in error.

I am using a library (DLL) that uses the Oracle.DataAccess DLL to connect to the database. I am doing in in C# .NET framework 3.5 When I attempt to compile, the compilation takes place, but the executable throws this error message. Could not load file or assembly 'Oracle.DataAccess, Version=2.111.7.20, Culture= neutral, PublicKeyToken=...

Getting rowID value for a "checked" checkbox in GridView in ASP.Net

I am using checkboxs in a GridView. I need to determine the value in the cell in the 2nd column, if a checkbox has been checked. I am using C# 2008 and ASP.net <asp:GridView ID="gvOrders" runat="server" AutoGenerateColumns="False" CellPadding="4" GridLines="None" Width="100%" AllowPaging="True" PageSize="20" ...

What is the best type to use for returning an image in my C# library project?

I'm making a project that will scrap information about a movie and return all sorts of goodies. This will be a .dll that other developers will use in their projects. For example, if they want to set a pictureBox image to the movies poster, what would be the best way to handle my library returning the image? //Set the image to The Matri...

Insert a default row into a combobox that is bound to a datatable?

On a winform there is a combobox that derives its information from a datatable. The datatable draws from a database list. this.cboList.DataSource = pullData(); this.cboList.DisplayMember = "fieldA"; Once the DataSource is set I am not able to insert a default row (ie *) as the first item in the combobox. I tried this: this.cboLis...

Assigning a RecID field to Gridview TemplateField (Checbox column)

I want to assign a RecID to the checkbox column "cbPOID". The RecID field that is being returned in my dataset, but should not be displayed in the gridview. <asp:GridView ID="gvOrders" runat="server" AutoGenerateColumns="False" CellPadding="4" GridLines="None" Width="100%" AllowPaging="True" PageSize="20" onpage...

Weak event manager and memory leaks

Dear all, I have a problem and I hope you can help me, guys! We implement a software which have to register weak event listeners on objects. The reason is that we have to react on some events, where we cannot know if the event source object still exists. During the implementation, I found a potential memory leak in .NET FW's WeakEventMa...

Create delegate via reflection.

Given an assembly that contains namespace Foo{public class Bar;} How could I create an Action<Foo.Bar> from another assembly without referencing the first assembly at compile time? ...

How to get the physical location of an ASP.NET web application without using HttpContext.Current?

I've found myself having a requirement to configure log4net based on a file relative to the physical location of the running ASP.NET web application. We like to start the logger as early as possible, so Application_Start seems a proper place. In IIS6, this works fine and has been running for ages, but now we moved to IIS7 and this won't ...

Counting words in a collection using LINQ

I have a StringCollection object with 5 words in them. 3 of them are duplicate words. I am trying to create a LINQ query that will count how many unique words are in the collection and output them to to the console. So, for example, if my StringCollection has 'House', 'Car', 'House','Dog', 'Cat', then it should output like this: House ...