fungicide's Q&A profile
.NET Development Show domain user full name
Hello, How to display domain user full name using ASP.Net v2.0 In ASP I used to write the following simple code: ============== sFullUser = Request.ServerVariables ("LOGON_USER") iPos = InStr(sFullUser, "\") sDomain = Left(sFullUser, iPos - 1) sUser = Mid(sFullUser, iPos + 1) Set usr = GetObject("WinNT://" & sDomain & "/" & sUser) ShowFullName = usr.FullName ============== You could also use Response.Write("Name="& System.Security.Principal.WindowsIdentity.GetCurrent().Name); -Shawn ...Show All
Visual Studio Tools for Office Word.Range.Font.Hidden???
I'm setting various ranges within a Word document to be hidden. When the document is reloaded and I check to see if those same ranges are indeed hidden I get confusing values. Most of the time when I'm checking a range to see if it's hidden the value returned is either 0 or -1. True or false as expected. Sometimes I get a value of 9999999. What does this value mean I came across that one... it is WdConstants.wdUndefined If for some reason the status can't be determined the result will be this one. You can find it here in the list. Go to WdConstants and expand the group: http://msdn.microsoft.com/lib ...Show All
.NET Development How to generate XSLT file from WordProcessingML.xml word document programmatically
Hi there, I would like to programmatically (.NET or VSTO with C#) generate xslt file from an .xml word document. Here what I do manually: I attach an xsd schema to a word.doc document. I save the document as xWordML.xml with both data and format. With WML2XSLT.exe, I generate xWordML.xslt from xWordML.xml. How can I automate the 2 nd and 3rd step programmatically I mean saving the word doc as xml type without opening Word Application. Then instead of using wml2xslt.exe, generate XSLT file from the xml file programmatically. Are there any xml classes that support this in .N ...Show All
Visual Basic Dynamic file manipulation
I have a problem I need to try to solve. Here is the sequence of events I need to accomplish. 1. Pull in listing of every file name in a selected directory 2. They are .zip files so I need to then iterate through each file filtered by the first two letters in the filename, unzip it and retrieve the text file that is in the archive. 3. I have to then open the file and import the data into an SQL table then close the file, the zip file and go to the next file and do the same appending data from each file to the SQL table. If I could get help in how to iterate through each file name and the process for unzipping it and get access ...Show All
SQL Server moving from a beta version to another
while moving from beta 1 to beta 2 many things have changed: database connection to beta 1 version was refused, many features in dts beta 1 also not accepted and one of them is the variables in sql statements. i used to put and now the variable name is entered instead.. i wonder will that happen in the next release of beta and when will that be i'm afraid i'll have to repeat the same work over and over again. Christina Christina, sorry for the troubles you're seeing. We did our best to not force changes from Beta1 to Beta2. However, the product has stabilized substantially since Beta1 and I don ...Show All
Visual Studio 2008 (Pre-release) Transaction not aborted...
Hi all, I have a service with netTcpBinding with a single operation that is decorated: [OperationBehavior(TransactionScopeRequired = true, TransactionAutoComplete = true)]. The operation perform inserts 3 new records to the DB, and then throws an exception. I expect that the records will not be written to the DB in the above scenario, but found out that they were indeed. Did I miss something Thanks in advance, Guy I tried WCF transactions,it should work as expected can you please send me your repro code to madhup@microsoft.com,i hope you are using SQL+pubs database,otherwise,please s ...Show All
Visual Studio Express Editions value from txtBox
Hi all, In the new version this code variablename = me.txtboxname.value or variablename = Val(me.txtboxname.values) don`t wrk it. Is there a another option to read values (numbers) in vb express or i can`t use it in vb express cheers, spike As first thank you shakalama and to you johan for helping With tryParse i solved the problem (just for info if some1 have a same trouble) Just the last question : If i will to make for every textbox, where user entering information, a if-function like: Dim success As Boolean = Decimal .TryParse(txtFcprober.Te ...Show All
Windows Forms None square window in C#
Hi, how can I make a non-square windows like in Windows Media Player 10 Are there any tutorials or samples Assigning a Region to the Region property of your form will do it. If the shape you assign doesn't include the window's title bar or close button, you'll have to come up with ways for the user to move and close your ...Show All
Visual Studio Team System Why can't I create a report
When I want to create a report. I got a " rsLogonFailed " error message. The windows application event log is like below ================================================ Event Type: Error Event Source: TFS Services Event Category: None Event ID: 3031 Date: 2005-12-8 Time: 21:27:38 User: N/A Computer: MSRAIT-TRAINING Description: An unexpected condition has occurred in a Team Foundation component. The information contained here should be made available to your site administrative staff. Technical Information (for the administrative staff): Date (UTC): 2005-12-8 13:27:38 Machine: MSRAIT ...Show All
Visual C++ Registering ATL Simple control
I am using the July CTP. I am building a test ATL control, so very simple. It seems that to register the control I have to have built a manifest. If I turn off manifest contruction then the registration fails with error PRJ0050: Failed to register output, check security.... Attempting to use regsvr32 produces error 0x80070716 - specified respource name cannot be found in the image file I think this is something to do with the new registrationless COM side-by-side stuff. However, I am perfectly happy to register and don't want all this new stuff. How do I make it work the 'old' way All this is not helped by one of my developer ma ...Show All
SQL Server Database Mail
I am trying to configure Database Mail on a new installation of SQL Server 2005 and the 'DatabaseMailUserRole' does not exist. How do I add this role to the server Hi, mhmm, strange thing, but use this script to recreate the Role: IF NOT EXISTS ( SELECT * FROM sys.database_principals WHERE name = N 'DatabaseMailUserRole' AND type = 'R' ) CREATE ROLE [DatabaseMailUserRole] AUTHORIZATION [dbo] HTH, Jens Suessmeyer --- http://www.sqlserver2005.de --- ...Show All
Visual Studio Express Editions HELP!
I was testing my first litle app in VCPP at school. School doesn't have any of the visual studios stuff on it, i build the app at home. When i open the app the following error presents itself "[application path name] this application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem." how do i overcome this Wilko :-} That is probably because you don't have the SxS binaries installed on school machines. Either link statically using the /MT compiler option or deploy using one of the options at http://blogs.msdn.c ...Show All
.NET Development Attempted to read or write protected memory - Fonts
I am receiving the following error message in a non-reproducable and seemingly random fashion in my ASP.NET, C# application: System.AccessViolationException was unhandled Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. The only steps I can take to reproduce the error are to run the offending function many times, and at some point, this error occurs. The function that I believe to be causing the error is as follows (well, actually I think that GDI+ using this functions output is the cause): public static Font GetFont(HttpServerUtility Server, string FontName, int Size, bool Admin ...Show All
Visual Studio Team System Howto stop TeamBuild from deploying, if tests fail
Hi, in TFS B3r a TeamBuild gets deployed, even if tests fail. Since I am also using TB to deploy to our production environment, I would like to let it deploy only, when all tests pass. How can I achieve this Hi Tilli Unfortunately there is no straightway to do this. However you can apply a workaround by editing the Microsoft.TeamFoundation.Build.targets file to get this working. 1. Set the ContinueOnError = " true " flag in the TestToolsTask target to 'false'. 2. However there is a broader impact of this. On setting this flag as 'false' MSBuild process stops as soon as a test fails. Hence you will run into an i ...Show All
Windows Forms C# control which acts like CRectTracker?
Anyone know of such a control Something that's free to use, just using it for a grad project.... Jason ...Show All
