vbjunkie's Q&A profile
Visual Studio 2008 (Pre-release) WCF: Is there a way to find out if the client passed a specific optional property or not?
When a client makes a call to a wcf service, Is there a way to find out whether a specific property of an object was send passed in the call or not. ClassA { [DataMember(IsRequired=true)] public int id{} [DataMember(IsRequired=false)] public string name{} } When a client makes a call to a service method passing an instance of the above class as a parameter, Is there a way to intimate the service that the "name" property is empty Thanks! I want the client to set the value if they have it. On the service side, I want to know if the client has set a value for the prperty or not. ...Show All
.NET Development FileWatcher Service doesnt watch outiside of debugger!
I created a FileWatcher Service. There is too much code to paste. When I start the service, then start the debugger, it works perfectly. However when I just run the service, it doesnt do anything! Why would it work when debugging but not on its own If you need to see some code, just let me know what portion you would want to view... thanks all. It was an educated guess. A service is not allowed to interact with the desktop and doesn't have a console window. The debugger provides a 'hook' to display console output to the Output window. Without a debugger or a console window, there is nowhere for the output to go... ...Show All
.NET Development Delphi BDS 2006 and Visual Studio 2005 Development
I am looking to see if this can be accomplished and if so, how: 1) Create a .NET application in Delphi BDS 2006, throw on a couple buttons, labels, or whatever (maybe even tie to a DB) 2) Save and run - fine 3) Open the Solution created above in Visual Studio 2005 and be able to a) edit the form in design mode, modify code, recompile and run 4) Be able to go BACK to BDS 2006 and see the modifications made in VS 2005 and also make changes 5) Go back and forth as described. Can this be done How VS 2005 cannot understand Delphi so it cannot parse or compile your Delphi code. So with a pure VS I would say "no go". Maybe someone comes up with an integration add in to make VS "understand" D ...Show All
SQL Server ASPNET account can't connect to MSSQLSERVER
When I try to access my PasswordRecovery.aspx page I get an error. I've also added the Event Warning and the Failure Audit. I've tried deleting the ASPNET user account and recreating it using aspnet_regiis.exe. I still get the same error message. Should I add the ASPNET account to the Administrators group Currently it is with the Users group. Login failed for user 'PC325862970629\ASPNET'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'PC325862970629\ASPNET'. Source Error: An unhandled ex ...Show All
Visual J# CannotUnloadAppDomainException when exiting J# app
Hi; I have a J# app that has two worker threads. One thread is waiting on a MulticastSocket.receive() and the other on a DatagramSocket.receive(). I have a nunit (not junit) test that causes my app to get set up which includes these two worker daemons. When the nunit test ends, I get a CannotUnloadAppDomainException when the nunit test attempts to end. If I do not start the worker threads, I don't get the problem. What's going on When my app ends shouldn't both threads be killed thanks - dave CannotUnloadAppDomainException is thrown when there is an attempt to unload: The default application domain, which must remains loaded during the lifetime of the application. An application domain with a running th ...Show All
Smart Device Development How to bound DataGrid to datatable/dataset and create ComboBox Grid colums
I have a requirement to add, edit, and delete data displayed on datagrid in pocket pc application. But, I do not see the dataGrid allowadd, edit, delete properties (like win app). it seems those propertiess will not be supported in pocket pc application, not sure . How can I bound dataset to datagrid how can I replicate changes to dataset, made from datagrid Is there any round about way to achieve this I would also need to set some columns as combox columns. Please suggest any one. Thanks, You would also need .Net Compact Framework V2 SP1 installed" - do you have it installed no, I thought CF V2 is part of vs.net 2005 installation. Please make sure to rebuild the solution before browsing ...Show All
Software Development for Windows Vista workflow designer
Hi All, I wonder whether it is possible to host the workflow designer in my app. I thought it would be cool if I can have the workflow designer as my app's GUI. Thanks, DK Hi Mark, I've been using the Workflow Monitor, but for some reason my workflows only show up in the monitor after my entire workflow has completed. The monitor doesn't show anything while the workflow is running. I'm selecting "ALL" events in the filter... I've even checked the database tables to see whether things are being added in the tracking tables, and they are being populated properly... Is there something else I need to configure Is this expected behavior Thanks, Randy ...Show All
Visual C++ How to paste transparent images to clipboard using Win32
Hi, I am trying to paste transparent images to clipboard. I tried using CF_DIBV5 as well as CF_DIB. Even though the alpha channel is set, applications like Excel, Word & powerpoint ignores it. I was wondering how these applications are achieving the same I compared the data, set by these applications, they are exactly same as what I have set. Has anybody ever able to do the same I am using Win32 SDK. I can post the code if it helps.... Regards Prasanth Hello Re: How to paste transparent images to clipboard using Win32 Such questions are outside the scope of this forum - for the scope of the VC General forum please look at: http://forums.microsoft.com/MSDN/Sho ...Show All
Software Development for Windows Vista Designer re-hosting and custom activities inside xoml-> NullReferenceException during GetRootActivity()
Currently I'm trying to re-host the workflow designer, who's not ;) But I'm failling with each mdsn code sample when I try to load a custom xoml workflow. I end up with a NullReferenceException during the GetRootActivity() method or I see an empy diagram showing nothing but emptyness ;( I know that there is TypeLoader service available, I've added my assembly to this typeloader before the WorkflowLoader tries to load (create instance of) the workflow and it's custom written activities. I would like to load a xoml based workflow with custom activites inside the rehosted designer, what am I missing Thanks Hi Kushal, That's not possible due to copyright rules in my company. But I think that would lead to nowhere. It seem ...Show All
SQL Server Entering Notes/Comments/Remarks to Report
Hi, there, We intended to create a report that allows users to enter remarks, comments or additional notes in supporting the report. Can it be done in SSRS FYI, we are using SQL Server 2005 Enterprise. Thank you. Regards, Yong Hwee You want to annotate within the report, or you want to add extended properties to the report If it is the first, then there is no way without changing the RDL or annotating the exported format. If it is the second, then you can use SetProperties/GetProperties to write/retrieve extended properties (including your annotations) programmatically. ...Show All
Visual Basic printing a hard copy
So i have an app that has text boxes, labels, and comboboxes. the program populates a database. What i need to do now is Print a hard copy of the data (from a command button on the form) and send an email to someone (through Outlook).. Can anyone point me in the right direction on how to do this Thanks. Ian. well following examples and tinkering I think I'm closer but im sure there is a much better way than this but I will post. Followed example and implemented it into the code using: http://msdn2.microsoft.com/en-us/library/cwbe712d.aspx So, we declare a string variable globally to store the contents we want to print. Dim theContentsToPrint as String = String.Empty then we of course implem ...Show All
Visual C# Passing an inherited class as 'T' to a generic container.
I'm having trouble finding out how to use a general purpose generic container I wrote as a member of another class which wants to hold any class type based on a common base class. The first set of code below shows 4 seperate classes, RNode is a generic class, TreeControl has an RNode<TreeItemBase> member, and a "Root" property to access it, TreeItemBase is a control (not really important to this), and TreeItemHeader is derived from TreeIItemBase... Public class RNode<T> {} public partial class TreeControl : ScrollableControl { private RNode<TreeItemBase> root = null; public RNode<TreeItemBase> Root { get { return root; } set { root = value; } } } publ ...Show All
Visual Studio An unexpected error occurred while compiling expressions
Hi, I'm having problem in diplaying report (in localmode processing ) in asp.net web application - created using vs2005 & sql2005express. The report is simple, contains a Table to display number of rows from a database-table. The problem is very strange, the report displays absolutely fine if i display the field values directly i.e. =Fields!my_field.Value - b ut, when i use any other expressions in the report, such as =Fields!my_field.Value & "Test" I get the following error. An error occurred during local report processing. The definition of the report 'Main Report' is invalid. An unexpected error occurred while compiling expressions. Native compiler return value: ‘[BC2001] fi ...Show All
Gadgets Another ActiveX/Com Question
I am trying to interface a gadget with a C++ function in a DLL that needs to send back multiple data values. If I were calling this function from within another C++ program, I would just use reference variables for the function to update, but I don't know how to do anything like that in javascript. I'm sure there's a simple way, but I'm pretty new to javascript, so any help would be great. The language that the DLL is written in shouldn't matter as long as it is a legitimate COM DLL. In that situation, you would establish the ActiveX control as an object within the HTML of the page, give it an ID, and call the method with the syntax "ID.methd(param1,param2)". Here's the oversimplified approach ...Show All
.NET Development TableAdapter missing the update method
Hi all, I am trying to call the update method of my table adapter that was automatically created by dragging the table from data sources view. However, it appears that the update method doesn't exist Only Fill and Getdata. Even on single tables this happens Is there a known bug here. I am currently using VSTO 2005 and excel and it is extremely frustrating! I have followed this code (using my database instead of northwind) and no update method on my tableadapter http://msdn2.microsoft.com/en-us/library/4esb49b4.aspx Cheers Damien 1. Open the dataset designer 2. Right click on the tableadapter with the missing command and click configure. 3. Hit next and check the third option which will gener ...Show All
