.net

WPF calling WCF with Windows Authentication - Not working

I am developing a WPF application in .NET 4.0 which calls a WCF Service hosted on the server developed in .NET 4.0. I want to use windows authentication for this purpose and it seems that it is not working and keep on giving me following error. The provided URI scheme 'http' is invalid; expected 'https'. Parameter name: via I...

Why don't Open Sourced Projects Version their assemblies / namespaces?

If you've used two or more open sourced frameworks then I'm sure you've come across the following problem. Project 1 FrameWork 1 - v2.0 FrameWork 2 - v1.0 FrameWork 1 - v1.0 Project 1 has references to Framework 1 & 2, whilst Framework 2 contains a reference to Framework 1. Unfortunately there is a breaking change in v2....

How can I use Alpha Compositing (Porter and Duff) with C#?

Are there a implementation (API) of Alpha Compositing for .NET. The Wikipedia means that Windows has a native implementation of it. Of course it can be do with pixel manipulation but this will be a bad performance. If there are a native implementation then we should use it. If there is no native implementation that can be used from .NET...

Assembly Microsoft.VC90.CRT question

Our C# application needs to launch a thirdpart (from our customer) executable (VC++) to do something. it worked fine in XP and windows 7 but it crashed in Window Embedded Standard 7. Following is the log from System event log. Activation context generation failed for "C:\Ande\thirdParty\cogs2.exe". Dependent Assembly Microsoft.VC90.CRT,...

Converting hexadecimal string to dynamic primitive type

Hi everyone, I have the following code: string hexString = "0x00000004"; Type hexType = typeof(Int32); object o = Convert.ChangeType(hexString, hexType); Which throws a System.FormatException as soon as it is executed as, apparantly, Convert.ChangeType can't work with hexadecimal values. My other alternative...

Infragistics license file add itself to project!!?

I have a solution in VB.NET .NET 2 Use Infragistic componets all over the application. One day decided to add floating toolbar support to our Forms. Our forms inherit one base form BaseForm. This base form is used in multiple projects in the solution. So, on the BaseForm was added a UltraToolbarsManager. Since, a nightmare began: th...

MySQL Connector/NET connection multiple DataReaders per Connection?

Hey guys, I'm migrating from Java to C# now that I've realized I prefer the C# language features over the ones in Java, but I have this small issue. In MySQL Connector/J and JDBC, I believe that one of my applications allowed multiple PreparedStatements to be executed while another one is open, like I could perform a query that returns a...

linq query to get monthly expenses in vb.net

I have a collection of order objects (properties - date, amount and vendor). I need to prepare a report showing spend by vendor by month since 01/01/2009. How can i get the results using LINQ? ...

Good questions to determine a candidate's level of C# and t-SQL knowledge?

Possible Duplicate: Good C# Interview Questions for a Senior Dev Position What questions would you ask, specifically? If you were looking for a candidate with "strong t-SQL and C#" skills. The position is not a senior position, but requires an experienced web developer. What knowledge would you be looking for? ...

How to pass parameter to javascript function that contains web service results?

I use this function in javascript to call web service (WCF): function Do(caller) { MyService.GetClient(some_id, CallBackGetClient); } function CallBackGetClient(WebServiceResult) { var result = WebServiceResult; etc. } Now I want to pass parameter (caller) to CallBackGetClient function so I can make dictinction who called Do...

How many connections are available in the ADO.NET connection pool

Is it possible (from a asp.net application) to check how many connections of the ADO.NET connection pool are currently in-use and how many are available (not currently in-use)? ...

Which .Net-compatible architectures are not little-endian?

The BitConverter class has a field IsLittleEndian which, according to the documentation: Indicates the byte order ("endianness") in which data is stored in this computer architecture. I notice in Reflector that the field is hard-coded to true in the static constructor of BitConverter. So my question is, do I need to take account o...

WPF control containing an IDisposable member

I have a member in the WPF code behind that is disposable (meaning it implements the IDisposable interface) I do not see any Dispose method I can override from UserControl in WPF so I can dispose of the member in my wpf usercontrol What is the correct way to dispose of a member in a WPF usercontrol? It's a usercontrol that wraps a pr...

What to return from my linq to entities query

So I have a data access class library I make a linq to entities call I end up with a single row that has my TableData object. What should I return back from my class library method? I thought it would be cool to return back the TableData object, but I see that if you make changes to it and call a save that it actually updates the dat...

Fluent NHibernate Many-To-Many with Additional Data

We process specialty ads for companies. These companies have a number of stores that have unique ads but share some ads. These ads that are shared across stores may appear on a different pages for each store. So I have a database like this: Specialty SpecialtyAd: SpecialtyId, AdId, AdNumber(Think of this as a page number.) Ad (Really a ...

InvalidComObjectException when using Excel Interop

I get an InvalidComObjectException after I close my application in the following piece of code: class MyExcelManager { myExelAppInstance = new Excel.Application(); // finalizer ~MyExcelManager() { myExelAppInstance.Quit(); // InvalidComObjectException thrown here myExelAppInstance = null; } } Why is that? Shouldn't ...

When using msbuildtasks UninstallAssembly the service is only queued for deletion and server needs restart

I am setting up a project to run under the teamcity integration server on windows server 2003 (with sp2). The integration tests run using msbuild with the latest version of msbuildtasks v1.2.0.306. All code is build with .net 2.0. In our build.xml file we remove all the services used by the systems, rebuild them all recreate them and th...

What do you look for in a dependency to determine if it should be an injected dependency?

I am having difficult figuring out when a dependency should be injected. Let's just work with a simple example from my project: class CompanyDetailProvider : ICompanyDetailProvider { private readonly FilePathProvider provider; public CompanyDetailProvider(FilePathProvider provider) { this.provider = provider; } ...

C# integrate google webmaster api

I'm busy integrating google webmaster tools into my mvc2 project. I downloaded the google Data API SDK here. But i can't figure out how to connect to the api and retrieve information from it. I can't find any assemblies in the SDK i can use in my testproject to connect to the webmaster tools api. If anybody already tried or has informat...

Application Failed to Initialize Properly

We have a project built with vs2010 which utilizes a .dll with managed code. I've built the .dll in vs2010, target Framework .NET 4.0 (tried Client Profile as well), which is the only option 2010 gives you to use. When I go to run it, it can't initialize and I assume it's some incompatibility...but I have no idea what it would be. Does a...