Stéphane Beauchemin's Q&A profile
.NET Development Overhead of Serialization
Hi, What level of performance effect does Serialization/Deserialization gives opposite to direct consumption of Objects/Interface I am talking about scenario on WEB when we have Presentation Layer, Business Layer , Data Access Layer in picture and we want to make the architecture SOA Extendible. Thanks There is a cost to pay but .NET framework is optimized for it. To use or not use webservices is a performance vs extensibility/interoperability discussion. Webservices alone dont enable SOA. SOA is a collection of patterns around service modelling. Webservices is just one of the technologies involved. You will find tons of articles on the web/msdn/pnp websites. Check out http://www.microsoft.com/patterns or http://msdn.microso ...Show All
Visual Studio 2008 (Pre-release) InstanceContext initialization, IContractBehavior and IContractBehaviorAttribute
I want to basically hook into InstanceContext initialization and, via what little I could find in the documentation , IContractBehavior seems to be the way to do it. So, first question is: is this the right approach If so, the documentation for IContractBehavior claims that there are two ways to hook the behavior into the flow of things: Programattically to add it before ServiceHost.Open. Implement a custom IContractBehaviorAttribute. I'd rather not do option #1 because it just feels so anti-configuration/declarative which is what seems to be one of the great things about WCF. However, given the lack of documentation around IContractBehaviorAttribute, I'm lead to believe it's not a much better route because y ...Show All
Visual Studio Team System Work Item Start/End Date
How can I update the start/end dates in my work items Wayne In our environment we don't always use Project with TFS so I was contemplating turnning off the "readonly" flags on the start date and end date so dates could be entered manually within the workitem form if desired. The only downside I see is that if you do use Project it would overwrite these dates. Can anyone comment on this Is my assumption correct Rick ...Show All
Internet Explorer Development New Security in IE
Hi, I've been creating a web app which dynamically creats PDF files using PHP and pdflib wich up until a couple of weeks ago worked fine. Now IE asks whether I want to open the PDF file and on closing asks if I want to save it. Does anyone know why this security has been added Also, session cookies don't seem to work the same now ie I sign into my website while another page is open and when I close my website (but not the other page) I get an error when I try to sign in! Why is this Like I said, the site was working perfectly until a few weeks ago but now looks totally unprofessional! I have tried the same thing with big commercial sites ie ladbrokes.com and the same thing happens so I know for a fact it isn't down to my code. ...Show All
Visual C++ Need help with Windows sockets
I have written the following simple program that is supposed to just download a webpage from a webserver on my network. Can somebody please explain to me why this program does not work I used ethereal to capture the packets coming out of the Windows box and I noticed that the packet seems to be malformed! Thank you. #include "stdafx.h" #include <stdio.h> #include "winsock2.h" #pragma comment( lib, "wsock32.lib" ) // This will link to wsock32.lib void main() { // Initialize Winsock WSADATA wsaData; if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) printf("Error at WSAStartup()\n"); // Create a SOCKET for connecting to server SOCKET ConnectSocket = socket(AF ...Show All
Windows Forms DataGridView Selection Mode
I have an app that is to be deployed on a touch-screen terminal with no exposed keyboard. There is a DataGridView control in this application set up for multiselect and whole-row selection. However, I also want the selections to behave as if the control key was pressed- click once to select, click again to de-select, any number of rows may be selected and they need not be continuous. Is there a way to get this behaviour from the standard DataGridView If not, is there a way to convert Click events on this control into Control-Click events ...Show All
Windows Forms DataGridView binding to complex business objects
Here is my problem. I have 2 objects one is nested within the other as follows. public class Department { private string name; public string Name { get{return name;} set{name = value;} } } public class Person { private string name; private Department department; public string Name { get{return name;} set{name = value;} } public Department MyDepartment { get{return department;} set{department = value;} &nb ...Show All
SQL Server No seperate worksheets on Exporting to Excel
I am exporting an Report with page breaks to excel. The challenge is that on export the records should appear in a single worksheet and not in multiple worksheet, which are created due to page breaks. Thanks, Amit Hello, In my opinion, ignoring page breaks when exporting to Excel would be a very useful rendering option. In our organisation, usually, PDF is used for distribution of the report as is. Excel is used a lot for analysing a bit further, and the page breaks that turn into different tabs are a big pain. I hope this option will be available in the next SP, because there seems to be no workaround except for removing the page break from the report or buying some third party tool... Thnx! ...Show All
Windows Search Technologies Hotkey assignment
I asked this question before, but it was somewhat hidden into another post of mine, so perhaps it wasn't noticed. The default hotkey in WDS 3.0 is Ctrl-Alt-M. In the previous version there was an option to redefine the hotkey. Are there any plans to re-instate that option I've seen there's still a registry key called 'Hotkey'. If I only knew how to set it ;) Thanks! Paul, Any updates on the hotkey assignment My latest request for network drives was so successful...request 1 day, add-in fix the SAME day! Thanks, Tim ...Show All
Visual C# Cross-language.
I have a programm which supports plug-ins and there is a 'manual' how to write it on C++. I'd like to write my plug-in using C#. Here is some valuable extracts from THAT manual. 1. Base application was written with C++ and using MFC. So they begins creating plug-ins by choosing 'Regular DLL using shared MFC DLL' in MSVC. 2. Next main step is to write two functions in sample.h: class SampleClass : public CWinApp { public: SampleClass(); void OnLoad(); void OnInitialize(CMapStringToString&); } sample.cpp: SampleClass theApp; __declspec(dllexport) void OnLoad() {theApp.OnLoad();} __declspec(dllexport) void OnInitialize(CMapStringToString& str) {theApp.OnInitialize(str);} sample.def OnLoad= OnLoad@@YAXXZ OnInitia ...Show All
Visual Basic add jpgs
i have jpegs as well as .dat files in a folder called 'data' and i want to include all these in my project which i converted to vb 2005 from vb6, however, i cannot find how to publish them using the wizard; i.e i cant find any options to include these files! (i'm very new to vb.net - only been using it a few days!) From the Project menu...Add Existing Items...All Files... And then select the files you would like to add to the project...You can also create a Subfolder to place all of these files... HTH ...Show All
SQL Server Sql Server Configuration Manager ????
If you want your database to be available from the Internet by using the ip address, what should the 'Log On As' column show Local System Local Service NT AUTHORITY\NetworkService What do these choices mean I'd advise you to consider whether you really need to expose your database on the Internet. Otherwise all of the above should work (provided that you're using TCP as your protocol). For the differences between those accounts please see: http://www.microsoft.com/technet/security/topics/serversecurity/serviceaccount/sspgch02.mspx Hope that helps. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Setting the Fullscreen Resolution
Hello all, I have a very simple question that I can't seem to find a direct answer to. My Game's GraphicsComponent's backfuffer is set to 320 x 240. The game window is also 320 x 240. When I swtich to fullscreen by setting the GraphicsComponent's IsFullscreen property to true the fullscreen resolution seems to be 640 x 480. My graphics appear up in the top-left corner. How can I set the fullscreen resolution to 320 x 240 I tackled something like this a little differently. I created a ScaledSpriteBatch class which inherits from SpriteBatch and given a base resolution (in your case 320x240) it calculates the actual destination rect or vector from the one supplied in the Draw() method. So I implemented my o ...Show All
Visual Studio Custom build
Hi, I am trying to write a custom build step where c# code is generated to implement an interface specified in a different .cs file and then compiled into the same assembly. I followed the example described in http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=238441&SiteID=1 but this doesn't quite work when the generated .cs file is built into the same assembly. When I add a new method to myInterface.cs, the implementation gets generated ok but I get the error that my class does not implement the new interface member - If I build the project a second time it works ok. To clarify, I have myFile.cs interface IFoo partial class Foo : IFoo and I want to generate myFile.implementation.cs that contains the ...Show All
Visual C# How to plot real-time graph?
Hi, Suppose I should plot a 2-D graph with XAxis the time, YAxis is a loop of integer from 1 to 500. How to realize this for(int x=1; x<501; x++) { double y; y= (doulbe)DateTime.Now; plot(x,y); } The data I received are as follows(ignore the hex numbers): 9:43:38 AM 1 1 9:43:38 AM 2 2 9:43:38 AM 3 3 9:43:38 AM 4 4 9:43:38 AM 5 5 9:43:38 AM 6 6 9:43:38 AM 7 7 9:43:38 AM 8 8 9:43:38 AM 9 9 9:43:38 AM a 10 9:43:38 AM b 11 9:43:38 AM c 12 9:43:38 AM d 13 9:43:38 AM e 14 9:43:38 AM f 15 9:43:38 AM 10 16 9:43:38 AM 11 17 9:43:38 AM 12 18 9:43:38 AM 13 19 9:43:38 AM 14 20 9:43:38 AM 15 21 9:43:38 AM 16 22 9:43:38 AM 17 23 9:43:38 AM 18 24 9:43:38 AM 19 25 9:43:38 AM 1a 26 9:43:38 AM 1b 27 9:43:38 AM 1c 28 9:4 ...Show All
