Sully65's Q&A profile
Visual Studio 2008 (Pre-release) Default value?
I have the below contract but it does not seem to work. When the client calls this api without specifying the optional argument instead of setting the value to the default it is always null. I have included the datacontract and a portion of the service reference from the client. The client service reference code seems to "know" that this parameter is optional but it does not seem to "know" about the default value. What am I doing wrong Kevin < xsd:element name =" Culture " type =" xsd:string " default =" en-US " minOccurs =" 0 "/> [ DataContract ()] public class GetPaymentTypesRequestType { private string cultureField; public GetPa ...Show All
.NET Development Controlling security when hosting CLR
I have an unmanaged C++ application that I deploy on the network. Currently, users (including non-admins) can just click the executable and run. I am now trying to leverage some functionality from the .Net framework. My unmanaged app hosts the CLR. I am doing things in the managed code that require FullTrust (access to COM components, pinvokes, etc). When a user runs my app that does not have the correct security permissions for the network location (or my assemblies), they get the standard errors. I have seen some tutorials on custom security when hosting the CLR, but all seem to require admin rights at some point or another (to install assembly to GAC, or at least put it in a location with full trust). It seems odd that my unmanaged app ...Show All
Visual Studio Express Editions How to add the text from a textbox into the printdocument
I am trying to take the text from a TextBox or label and put it into the PrintDocument so that I can use PrintPreview. Keep in mind, the name 'printdocument' confuses a lot of people. 'PrintDocument' is not what is printed. A printdocument is a collection of printer settings. 'PrintDocument' does have an event associated with it called 'PrintPage'. The 'PrintDocument.PrintPage' event handler is a sub that is called when PrintDocument.Print() is called or when a PrintPreviewDialog.ShowDialog with it's 'document' set to a printdocument is called. (Example print preview calls the PrintDocument.PrintPage event: PrintPreviewDialog1.Document = PrintDocument1 PrintPreviewDialog1.ShowDialog() ) See example at ...Show All
Visual Studio FileCodeModel.CodeElements throws an E_FAIL ComException
Hello, My problem is with the FileCodeModel object. I want to get hold of the code model for a project item without having it appear in an open project. In order to do so, I create a temporary invisible project of the appropriate kind (csproj for .cs files, vbproj for .vb files...) and add the item to that project. Once added, the file content is parsed and the code model may be accessed through the FileCodeModel property on the project item. While this strategy works with C# projects, it fails with VB projects with the CodeElements property born by the FileCodeModel object throwing a COM exception (E_FAIL) whenever it is accessed. Note that I am still able to get an actual reference to the FileCodeModel object with the expected valu ...Show All
Windows Search Technologies WDS 3.0 w/ Outlook 2007 Beta - won't return results in cached mode, does when online.
Hi, I have been fighting WDS 3.0/Outlook 2007 for a good while now. I started with Outlook and BCM loaded, but have uninstalled BCM and re-installed Outlook alone with WDS 3.0. Everything seems fine, but my searches return no results. On a whim, the other day, I turned off "use Exchange in cached mode" and voila, WDS started returning results! This is repeatable. I turn on caching, WDS does not return results. I turn off caching, it does. I do not use a .pst file, but rather keep all my information on the Exchange Server. I wonder if it has something to do with either an Exchange Server setting, or something to do with my .ost (offline folder) file. Anyway, I wonder if others that are having trouble getting WDS to ret ...Show All
Visual Studio Express Editions Single Instance application crashes with an exeption...?
I was making a program that I wanted only 1 copy to be running at a time. If its multi instance, I can run it over and over. If its single instance, instead of letting just 1 copy run, whenever a second copy is launched, both it and the first copy CRASH with some fatal exception error. I'm simply checking off the "Make single instance application" option under the "Windows application framework properties" section. Why does this make the program crash Hi, Would you please post more details about the fatal exception you got That will help investigating this issue. Also, it's great if you can try this: - Click on 'View Application Events' button below the "Make single instance application" check box. - Add the following code: P ...Show All
Visual C# static method - Is there any workaround?
I think most know we cannot declare a static anything in an interface. However, let's say I have this: public sealed class MyClass { private MyClass(string someText) { m_someModifiedText = someText; } private readonly static m_someModifiedText; public static MyClass Create( string someText ) { string modifiedText= ModifyText(someText); return new MyClass(someText); } private string ModifyText(string someText) { string modifiedText = someText; //do something to modify text return modifiedText; } public static string UsefulText { return m_someModifiedText; } } Now, this "sample" is just to keep it simple, but PLEASE just consider the concept rather than what the ...Show All
Visual Studio Team System Can't Install SP1
On a Windows Server 2003 machine with Team Suite installed (and the previous beta version of SP1) I tried to install the newly released SP1 but I got this message: "The installation source for this product is not available. Verify that the source exists and that you can access it." What's wrong I wonder Thank you, Sammy Follow up: I couldn't get the SP1 patch process to start until I had removed all of the service pack 1 updates from the various 2005 installs AND removed the 2005 Premier Partner Edition completely (I believe this was installed in conjunction with some of the SQL Server 2005 pieces, such as Reporting Services). ...Show All
SharePoint Products and Technologies Crawling file servers
With an out of the box MOSS setup I have configured the crawl of a file server. Search does a fine job of finding and indexing all the allowed file types. The problem is that I want to be able to find, by filename, everything on this file server. In other words if I search for "setup.exe" I want all the hits from my file server to be displayed. Is this simply a matter of adding all the file types, like exe's, that I want What will the crawler do when it finds a file type that it has no ifilter for For file types I want to allow but have no ifilter I'm just interested in the crawler picking up the file name and its location. Is that possible Thanks Chris Fields I think you are on the ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Array of ID3DXMesh causes crash on draw with more than 2 elements
Hi, Bit of an odd one - I think the solution is probably quite simple but I can't see it so maybe need a few more pairs of eyes please! I've got an array of ID3DXMeshes, and for each one I do D3DXCreateMeshFVF, then fill the vertex and indexbuffers. I then go thru the array and draw them. If I have just one element in the array, all is well. It gets drawn and it's released ok on exit. If I have 2 elements, it gets drawn ok but crashes when I try and release element[0]. If I have more than 2, it just crashes when it tries to draw the first one. I've been looking at this for ages now and am going a bit mad! Any help would be great. Below is the method that creates the meshes, the method that draws them, and the code where they are dec ...Show All
SQL Server StrToMember performance issue
I am building a parameterised report against a cube. After starting with an MDX statement that performed perfectly well and parameterising it the performance went downhill fast. I was able to replicate similar symptons against the Adventure Works cube. In this example I am getting sales values at 2 different dates and breaking them down by Sales Territory and Customer Geography dimensons. In fact they could be any dimensions, but I do need to add a crossjoin in order for the problem to show itself. WITH MEMBER Measures.FirstDateAmount as --([Date].[Date].&[32],[Measures].[Internet Sales Amount]) ( StrToMember ('[Date].[Date].&[32]'),[Measures].[Internet Sales Amount]) MEMBER Measures.SecondDateAmount as ([Dat ...Show All
Visual Studio Tools for Office MDI form
Iam want to avoid creating the same child form again when ther is an existing childform Iam working with VS2005 C#.Net(MDI Forms) and when create a child form(say FormAbout) from the menu and when that child form is working and when I click the same menu option(ie FormAbout) Iam getting another instance instead of showing the previous childform(I want to avoid that and the focus should be again in the previous form) I think now you get my point..so please help me.. With thanks. ...Show All
Windows Forms get name of usercontrol instance
Hello! I hope this is the right place to post this question. I want to be able to get the name of the instance of a usercontrol from within the code of the usercontrol, in order to display it to the user (form designer - usercontrol user). I would also like to know when the name changes so that I can update it. Is this possible exactly me.name always returns the instance name you cn use IComponentChangeService for the notification a solution you might like better is override the name property an raise a event on the name setter Remco ...Show All
SQL Server backup database by maintenance plan
1. create new MaintenancePlan to get a full backup of myDb by Wizzard,... the message is: create failed for JobStep 'Subplan' ... the specified '@subsystem' is invalid .. Error 14234 2. create new MaintenancePlan without the Wizzard, by drag and drop "Back Up Database Task" and configured to full backup myDb scheduled daily the message is: create failed for Job 'MaintenancePlan' the plan exists without scheduling, after modifying get the message Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-...). can I get help - Thanks There is a KB article to resolve the above error. http://support.microsoft.com/ kbid=922651 ...Show All
Internet Explorer Development Where can I store images that my extension injects into the DOM on Windows Vista?
I have a toolbar that does some direct DOM manipulation, sort of the way the IE Developer Toolbar does. Part of this DOM injection are some images that we use. Previously, we were programmatically inserting our images into the Temporary Internet Files folder, and when we created our DOM objects that needed these images the URLs pointed to the images in that folder. The problem is, that on Windows Vista it now seems that Temporary Internet Files is now considered a system folder, and I have lost the ability to write to it. At this point, I think I have a few options but am unsure as to how to implement any of them: 1. Store the files in an accessible temporary location (using a different Special Folder, maybe ). I don't know which one, i ...Show All
