Philip Coupar's Q&A profile
Visual C# Security and Authentication
I have a C# .Net console application I wrote that is on server 1. It needs to copy files from server 1 to server 2. The location at server 2 is a shared drive with a domain user as the only user with access. I need assistance with code or tools that will allow my console app to impersonate this domain user so that it can appropriately authenticate to server 2 and copy the files over. I can run it logged into server 1 as the domain user, but I can't schedule it to run as this domain user. Please help. Thanks in advance. There is a very nice sample about impersonating the windows user credentials at the following link. Hope it helps you http://www.codeproject.com/csharp/cpimpersonation1.asp ...Show All
.NET Development Odbc SCHEMA Issue
Hello everyone, This is my issue. For the longest while i've been reasearching and trying to figure out how, when using and ODBC connection, do I get the database schema, withouth having to execute an sql statement first. What exactly i'm trying to do is this - Connect to an odbc database (which I already can), retrieve the list of columns for a specified table - before executing a specific sql statement. Now is there a way this can be done Ok then, another question, can it be said though that all database have some sort of DATABASE with some TABLE that has a list of the tables and their columns in some COLUMN if so then i should be able to work with that. but, i'm just wondering if such an abstract conclusion is true. ...Show All
Visual Studio Tools for Office Add-in doesn't show up in Outlook after msi-install, but shows up in Outlook while developing, why?
Hi, I have made an Outlook 2003 add-in in VS 2005 using VSTO 2005. When developing, both building debug and release builds, the add-in automagically shows up in Outlook when starting Outlook. The problem though is that when I (after removing the add-in in Outlook) run the add-in-installer (the, by VS2005, autogenerated msi-file) everything seems ok and the add-in is even listed under Add/Remove programs but when I start Outlook it doesn't show and when I go look for it under add-ins it's not there. This is on the same computer so all prerequisites like .Net 2.0, Office 2003 Pro PIAs and VSTOR are all there. Under the add-in:s setup-project the following detected dependencies are shown: Microsoft .NET Framework Interop.ADODB.dll Microsoft.O ...Show All
SQL Server databases on SAN will not reattach @ SQL server reboot
Hello. I have a SQL 2000 server running on server 2003. The databases are located on a lefthand networks SAN. At SQL server reboot, the databases will not automatically reattach. You can however manually attach them. Nick, We have seen this frequently on our SQL Server instances connected to our Lefthand SAN. In every instance of the problem, restarting the SQL Server instance/service after the boot had completed fixed the problem (rather than going through and manually attaching each database). As others have mentioned in replies, it is just a matter of the SAN Volumes not getting finished mounting before SQL Server tries to bring the databases online. ...Show All
Windows Forms How to cancel the process untill the validations conditions are met when click the button? --VB.net or VS 2005
Hi I have a 10 tabs in windows form (VB.net or VS 2005). I have validation function to validate the textbox control in the tabpage. So if the condition not met the validation triggers when leave the tabpage and inform the user by message box. When user responds to that message box the curser move on to other page or other control. But I want keep user to stay on that tabpage untill the validation conditions are met. The sample code will be appriciated. Advance thanks Hi Thanks for your help. I have one more question: I have 10 tab pages. Assume that I have put all validation functions in the "Button click"(Save button) .When button click IF any conditions NOT met in tabpage1 and if the user is in any ot ...Show All
Windows Search Technologies can the wds team please acknowledge the OE bug, it is easy to reproduce
Can easily be reproduced on a fresh XP sp2 install. When indexing an Outlook Express store with a Hotmail account (http mail, not pop), if you leave OE running, after a little while searchprotocolhost.exe will pop up the following error message box: Outlook Express could not be started. The application was unable to open the Outlook Express message store. Your computer may be out of memory or your disk is full. Contact Microsoft support for further assistance. (0×80004005, 183) When the hotmail http account is removed the error goes away. The error may happen for other reasons, but the OE hotmail integration is definitely one cause. i'm getting it too and have been ...Show All
Windows Forms Can not turn off automatic update
I made Windows application which manualy checks for updates each time when the application is started. Although I turned off auto updates, I still get sometimes before I launch the application update form which wasn't created by me. My manifest looks like that: ....... <deployment install="true" mapFileExtensions="true"> <deploymentProvider codebase="http://some.url/> </deployment> ....... What do I do wrong I still didn't find the solution. I downloaded a program which is tracing changes in my registry, because if I can't find the way how to turn off automatic updates, I may simulate pressing the skip button on ClickOnce update form ...Show All
Visual Studio Tools for Office C# with Excel - are ranges with letters no longer usable, like "A3"
So can "A3" only be referred to as Cells[3, 1] In VB6 it was .ActiveSheet.Range("A3").CopyFromRecordset but now it would be Excel.Range range1 = (Excel.Range)sheet1.Cells[3,1]; range1.CopyFromRecordset(object data,object maxrows,object maxcolumns) or is there some way to still use the "A3" range TRY THIS CODE Range docObj = Globals.Sheet1.Range[sRangeName, Type.Missing] What is A3 the name or the address ...Show All
Software Development for Windows Vista Microsoft has not emailed me the Vista Beta 2 Key
i have not received through email which was supposed to be emailed to me my vista beta 2 product key.why how can i get a new key When i first download VISTA BUILD 5384, here's what i've done to obtain the key Go to this url http://www.microsoft.com/windowsvista/getready/preview.mspx Then in the section Download Windows Vista Beta 2 choose Download Now and select your location and Go. You have to sign with with your Windows Live ID You will obtain a validation key... Note it or copy it and keep it carefully. It will be available for 10 pc ! ...Show All
.NET Development Missing tlb file... sometimes ??
I have a vb.net component that exposes a class and it's methods to the COM framework. It's strong named, added to the installer etc. and works fine except for one thing: the tlb file associated with the class (dll) does not always end up on the target machine. Even re-installing the same msi without recompile/rebuild might or might not install the tbl file. This is necessary as we need to give other vendors access to our product so that they can use it. If the tlb file is not always installed, then their apps are going to break when they look for it. What on earth is going on I could directly reference the tlb in the installer to be absolutely sure that it gets installed (at the moment, it's picked up as a reference) but I'd like to know t ...Show All
Software Development for Windows Vista performance issue with multiple threads?
I'm making 3 threads that each instantiate a WF that only has one activity (prints "Hello World" to the console) and I run alll of this in a loop about 3 times. It's taking roughly 2 seconds for each loop. Any idea what could be taking so long My code looks something like this Thread[] t = new Thread[iterationCount]; for (int i = 0; i < iterationCount; i++) { t = new Thread(new ThreadStart(new ThreadClass().RunWorkflow)); } DateTime startTime = DateTime.Now; for (int i = 0; i < iterationCount; i++) { t .Start(); } Program.mEvent.WaitOne(); TimeSpan timeElapsed = DateTime.Now - startTime; ...Show All
.NET Development [2005] int32
Hi everyone, how can i store a data variable of type int32 into a byte array of size 4 10x for ur help See this thread about a similar question regarding long. You just need to replace long with int and you get your answer: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=821611&SiteID=1 ...Show All
Visual Studio Express Editions Registering
I was not sent the registration key for Visual Studio Express Edition. Is it possible for one to be sent to my email address The registration key will not be sent to you. You will get it on the page you get to after selecting Help->Register product and signing in. If you missed to copy it from that page you can just choose to register the product again. If you installed from the CD image you will not get a registration key and can continue using the express edition after 30 days. It might nag you to register a few days but you can just ignore it. ...Show All
Visual C# Changing code editor background color?
Hey all, Like quite a few people, i love my late night coding sessions, one thing thats been bothering me for a while is the background color of the code editor in Visual Studio, and the fact that I cant change it to a lovely black color instead of white to save my poor little eyes from strain. Is there anyway to change it without me having to set custom settings on my monitor just to turn the contrast and brightness all the way down hehe :) Any help would be greatly appreciated, thanks :) Skoby never mind i got it.. lol, sorry for making the post. Tools > Options > Fonts & Colors > Plain Text > Item Background > Black... :) ...Show All
Windows Forms application/form without getting focus
Hi, I want to write a virtual keyboard. Therefore I need a form which is not getting focus (and becomming active app) when the controls are clicked. The other programs should keep active status that I can use the SendKeys Class. At the moment I still get active status and make other apps active again. But this works only with a sleep(50) before using SendKey. That is time I do not want to waste. ...Show All
