.net

RijndaelManaged Padding when data matches block size

If I use PKCS7 padding in RijndaelManaged with 16 bytes of data then I get 32 bytes of data output. It appears that for PKCS7 when the data size matches the block size it adds a whole extra block of data. If I use Zeros padding for 16 bytes of data I get out 16 bytes of data. So for Zeros padding if the data matches the block size then ...

What is the equivalent of JPA in .NET?

I think JPA is nice and convenient ( not to mention standardising, as we used to have every individual programmer doing his/her own thing with a jdbc connection). I would like to use something like jpa with C# to mysql and sqlserver. ...

Can I use Linq-to-xml to persist my object state without having to use/know Xpath & XSD Syntax?

Hi, Can I use Linq-to-xml to persist my object state without having to use/know Xpath & XSD Syntax? ie. really looking for simple but flexible way to persist a graph of object data (e.g. have say 2 or 3 classes with associations) - if Linq-to-xml were as simple as saying "persist this graph to XML", and then you could also query it via...

Implicit and Explicit implementation of interface.

While working on a upgrade i happened to come across a code like this. interface ICustomization { IMMColumnsDefinition GetColumnsDefinition(); } class Customization : ICustomization { private readonly ColumnDefinition _columnDefinition; //More code here. public ColumnsDefinition GetColu...

Get Album from Facebook Application\Fan page

Hey all I am using Facebook toolkit for .NET and I am trying to to the following without success: I have facebook application with PHOTOS module inside (it has a few albums) - I want to use getAlbums() for the application to get the album ID. When I am using GRAPH protocol, i get the album id, and when I try to use Photos.Upload to th...

Problems with Silverlight4 dragging from desktop

I have ploblems with Silverlight4 dragging from desktop. When I host my application on the local IIS Web server the Drop event does not catches, but if I run my application in Debug mode it works fine. ...

Bind ISet in ASP.NET MVC2

Hi, I am trying to find out what would be the best way to bind first element of ISet (Iesi.Collection) as a first element. So basically I only have to use some kind of collection that has an indexer (and ISet doesn't) then I can write code like this (which works perfectly well): <%: Html.EditorFor(x => x.Company.PrimaryUsers[0].Email)...

How to Connect to a web service (SSL enabled and proxy interface)

There is a web service running on tomcat on a server. It is built on Java Servlet. It is listening others to call itself on a SSL enabled http port. so its web service adreess looks like: https://172.29.12.12/axis/services/XYZClient?wsdl On the other hand I want to connect the web service above from a windows application which is built ...

Quick Question: Whats wrong with this pre-processor directive in C#

Whats wrong with these pre-processor directive in C# #define OUTPUT_DIRECTORY "E:\asdf\sdfg\jhkl\" I also tried giving: #define OUTPUT_DIRECTORY "E:\\asdf\\sdfg\\jhkl\\" for both I get error: Error 1 Single-line comment or end-of-line expected ...

What is the role and purpose of a bootstrapper?

I'm working on an application which uses a bootscrapper object to perform some operations when the application first starts. e.g. registers IoC objects, puts certain variables into the asp.net Application session object, does some security checks etc. I had a look around the internet and couldn't find a reference to a bootscrapper patte...

How do I call a method when all threads (backgroundWorkers) are done with their jobs in .NET

Hello, I'm using C# .NET. Its a GUI application. When user clicks a button work is assigned to 4 different background workers. Each take different amount of time and the end result is they populate some variables. I need to call a method which operates on these end results of each bgwoeker and gives the final output. How to accomplish ...

How yield implements the pattern of lazy loading?

How yield implements the pattern of lazy loading? ...

How to get original DataColumn value from DataRow ?

I have a DataTable and i want to figure out the Original column value for all the modified data rows. I am using following approach to get the Orginal column value before the DataRow was modified DataRow[] dataRowArray = dataTableInstance.Select(null,null,DataViewRowState.OriginalRows); DataRow originalDataRow = dataRowArray[rowIndex]...

how to minimize window to maximize window using shortcut key in window application using c# ?

how to minimize window to maximize window using shortcut key in window application using c# ? ...

Binding to element in WPF: can the Path expression do math?

Hi I'm trying to bind a control to the parent's Height/width property using ElementName and a Path. However, I don't want to bind to the actual height, but to exactly half the height. Can the Path expression do the math? e.g. Path={ActualHeight/2} I couldn't find a way to do that. IS there any other clever approach? Thanks! ...

format excel sheet in c#

Hi, i want to format excel sheet generating by my c# application, as per template excel / source excel sheet which is. ...

Should we denormalize database to improve performance?

We have a requirement to store 500 measurements per second, coming from several devices. Each measurement consists of a timestamp, a quantity type, and several vector values. Right now there is 8 vector values per measurement, and we may consider this number to be constant for needs of our prototype project. We are using HNibernate. Test...

Could not load Assembly 'Microsoft.Office.Server.Search'

Hi I have got following error: "Could not load file or assembly 'Microsoft.Office.Server.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. An attempt was made to load a program with an incorrect format." Does anybody know solution for this? or Does anybody gonn t...

help setting up wsHttpBinding WCF service on .net

I'm trying to host a WCF service with wsHttpBinding. I created a certificate using makecert and put some lines in web.config. This is the error that I'm getting: System.ArgumentException: The certificate 'CN=WCfServer' must have a private key that is capable of key exchange. The process must have access rights for the private key. O...

Sharing an assembly between ASP.NET and Silverlight

Hi, I've created an assembly to share it between my main app and the silverlight app. At the beginning it looked like it was going to work but now I get this exception: "System.IO.FileNotFoundException was caught, Message="Could not load file or assembly 'System.Xml.Linq". I'm using .NET 3.5 Sp1 and Silverlight 3. That shared assembly...