jay1234's Q&A profile
Visual Studio Team System Running code coverage for managed windows service from remote desktop (windows XP)
I'm trying to run code coverage for a managed windows service from remote desktop, this are the steps: - instrument the code by running vsinstr -coverage mydll/exe - resign my assemblies/executable sn -r mydll/exe keyfile - start vsperfmon tool in new command window start vsperfmon /coverage /output:test.coverage /user:"SYSTEM" /user:"LOCAL SERVICE" - output from vsperfcmd /status: ... Users with access rights to monitor: UserName (SID) NT AUTHORITY\LOCAL SERVICE (S-1-5-19) NT AUTHORITY\SYSTEM (S-1-5-18) LOCALMACHINE\username (S-1-5-21-507921405-1715567821-682003330-1003) LOCALMACHINE\username (S-1-5-21-507921405-1715567821-682003330-1003) - install the service by running installutil. On v ...Show All
Visual Studio Express Editions isNumeric
I have been having trouble getting this to work. It is in the Visual Basic express edition. It is a miles per gallon calculator but I can't seem to figure out the isNumeric funtion. I need to make sure the input from two text boxes are are numbers.If a letter is typed a message box or the label should instruct the user to enter a number Dim mpg As Decimal Dim miles As Decimal Dim gallons As Decimal miles = Val(txtMiles.Text) gallons = Val(txtGallons.Text) If IsNumeric(miles) = False Or IsNumeric(gallons) = False Then lblMpg.Text = ( "Please Enter A Number" ) Exit Sub Else mpg = miles / gallons lblMpg.Text = FormatNumber(mpg, 1) & ( " Miles Per Gallon." ...Show All
.NET Development C# problems with converting bytes to string and then converting back
I think this problem is weird. I'm converting a byte array into string and then coverting the string back to bytes. But they are not the same!!! why is that UnicodeEncoding encoding = new UnicodeEncoding(); byte[] a ={ 222, 12,22,33,44,55 ,23,45,65,33,55 }; string b = encoding.GetString(a, 0, a.Length); byte[] c= encoding.GetBytes(b); run the code above, byte array c is {222,12,22,33,44,55,23,45,65,33}, one dimension lost!! And i did several tests and found that if the length of converting byte array is over 10, then the converted-back byte array won't stay the same. Less than 10, it's just OK. Why is that Many thanks, You should not convert non-text byte-arrays to strings because it may contain control-characters or even 0 ...Show All
SQL Server Upgrade Advisor error I don't understand
I'm carrying out an investigation into how much effort will be involved in upgrading our database from SQL Server 7.0 to SQL Server 2005. I've downloaded the Upgrade Advisor and run in against a copy of our production database. Most of the issues are trivial and I understand how to resolve them apart form one (to me) meaningless one: When to Fix : Before Description : Class Not Registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) Details : SVCACCTREQ That's all the information it gives, except for a "This issue is resolved" checkbox. Anyone got any idea what the problem is, or how I go about tracking down the cause I'm running the analysis tool from a W2K Professional Client, connecting to SQL S ...Show All
Windows Live Developer Forums VE Collection
I was wondering how to add a VE Collection of pushpins like the one on dev.live.com/virtualearth/sdk . But I dont want the user to had be enter in the id, I want it so when the map loads, it is already on the map. Also, after I get that code, how do I edit what the text says when you hover over it Thanks.. p.s. I know there have been post about this on here but none of them anaswer my question or dont work. Thanks In the code above, the LayerSource property for Collections should just point to the GUID, not the complete URL. You also don't need to provide the Method property for Collections. For your second question: you can't edit the content of a collection. Collections can only be created and edi ...Show All
SQL Server duplicated rows
Hello, I have a table T1 with fields ID, F1, F2, F3, F4, F5, F6…. I need to find if there is duplicated rows based on F1, F2, F3 columns. If there is set F5=’minimum’ where ID is MIN(ID). So the smallest should be set as minimum. How can I do this in a stored procedure You can do something like below (assuming that ID column is unique): update T1 set F5 = 'minimum' where ID = ( select min(t.ID) from T1 group by F1, F2, F3 having count(*) > 1 ) Else you can do below: update t1 set F5 = 'minimum' from T1 as t1 join ( select F1, F2, F3, min(t.ID) as min_id from T1 group by F1, F2, F3 having count(*) > 1 ) as t2 on t2.F1 = t1.F1 and t2.F2 = t1.F2 an ...Show All
Visual J# vjc throwing an exception
I do not have this problem when compiling from VS 2005. This started after I uninstalled the J# redist and then reinstalled it using the MSBuild created bootstrapper program (testing it). When I build using nant which calls devenv to build the solution I get the popup asking me what program I want to use to debug vjc because it hit a problem. Even weirder, the compile continues - it does not return an error. But the rest of the projects are not compiled. What is going on and how do I fix it thanks - dave Hi, This is really random and difficult to repro. First of all we never test such scenarios (intralling VJ# from third part installer or building through nant) so we don't have the repro environment. We install J# r ...Show All
Visual Studio Express Editions 'min' or 'max' function
Hello all of you, I use the min() and max() functions. If I compile the program, no compilation error (as expected), but if I right click on the 'min' or 'max' and then ask 'Go To Declaration' or 'Go To Definition', I get the error "The symbol 'min; is not defined". Why is this All the best, Victor If your project includes <windows.h> either directly or indirectly, then <windows.h> defines 2 macros, min and max, which as they are macros they dont really define any code (they are expanded inline), usually this isnt a problem, unless somewhere along the line another header file defines a function min/max, in which case the compiler wont know which definition to take y ...Show All
Windows Forms How to find the installation folder for the ClickOnce application
I was wondering if there was a way to find the application installation location installed with ClickOnce. I wasn't sure if the ClickOnce creates a registry entry or has any environment variable that keeps a track of this path. Currently, I have a way to know the application path from within the app, but for that the app needs to be executed atleast once. I am looking for a way to store the folder where my app would be installed with ClickOnce either during the installation process or after the installation. The app I am referring to here is a smart client that I need to open by passing an XML file as the input parameter or have the XML file stored in the directory of the executable. However, after I install the app using ClickOnce, ...Show All
Visual Studio Team System Run webtests in Testlists on fixed port
Is there a way to start web-tests in a testlist on a fixed port. One can record webtests on a fixed port, but running a webtest in a lists starts the webenv.webserver.exe on a random port. This fails webtests in a testlist. Regards, R.Jung If you are running the webtest against the developement webserver. then you can configure your test to automatically pick up the port the webserver is started on. Check out this help link for info on how to do this: http://msdn2.microsoft.com/en-us/library/ms184806.aspx ...Show All
SQL Server SQL Server Authentication password resets during reboot
Hi! I have a problem with SQL Server Authentication password getting reset when the server reboots. In SQL Server Enterprise Manager I go to Security ---> Logins ---> Choose Properties for the user I want to change password on. Then I change the Server Authentication password and get a window to confirm the password. The password changes sucessfully and the application that needs the password is working fine. But when the server reboots this password get changed and I have to change it again for the application to work. Anyone have any ideas why the password isn't systained during reboot ...Show All
Visual C# Send Fax
Hi, I want to make an Application that send a document (.txt) by fax. I didn't find a dll for do this. Can you help me Thanks Anja You can use winfax api from Windows XP and P/Invoke its function to get your job done. Here is how to use its functions: http://pinvoke.net/default.aspx/winfax.FaxAbort see all the function under winfax and sure see MSDN to know the description of each method. Note: This was inroduced on Windows XP so it'll no work on previous versions of Windows. Sorry, I doubt if newer versions like Windows Server 2003 etc have it or not. Best Regards, Rizwan aka RizwanSharp ...Show All
Visual Studio 2008 (Pre-release) Error 403 when browsing to Service.svc file
I am trying to run one of the wcf samples. I am deploying the server to IIS 6 and keep getting Http Error 403 Forbidden when I try to browse to the service.svc file. The directory and files appear to have the right permissions set. I added a Default.aspx page to the same directory and it works fine. I changed to Basic authentication and the Service.svc file returns the 403 error before I am even prompted to login. The Default.aspx page prompts me to login and then displays correctly. I had the sample working fine on my Windows XP workstation it just won't run on Windows Server 2003. Does anyone know what else I can check to get this working Thanks, Matthew Try to open the service in the browser ...Show All
Smart Device Development USB Port
Please suggest me how can I write applications for USB and Irda drivers. How can I open the USB/Irda ports, and read/write to/from the ports. Hi, I don't know what exactly you want to do with IR and bluethooth, but I suppose that OBEX (Object Exchange) API will be sufficient. It is very well described in MSDN (and recomended) . But If you determined to 'open/close USB/Irda ports' you have to deal with Virtual COMs. About Bluethooth you have deal with Bluetooth Protocol Stack. (hint look in MSDN for Bluetooth Protocol Stack and PORTEMUPortParams structure to specify attributes for the virtual COM port).In case of IR Win Ce has IR stack. In both cases you have to deal with a lot of stuff as RFcom ...Show All
SQL Server Incorrect PageAudit Property
Hello, after a fatal server crash (with no backups!!) I have tried to re-attach a database but I get the following message; " Msg 5172, Level 16, State 15, Line 1 The header for file 'E:\Database.mdf' is not a valid database file header. The PageAudit property is incorrect." The database files ( both mdf & ldf ) where recovered from a file system copy which was made while SQL Server 2005 was still running. The files where copied with Symantec Backup Exec (10d). Is there any way that the database can be recovered from these files (I have tried a few 3rd party tools ie, Apex SQL Log & Recovery for SQL Server, but none of these where successful ) Would Miscorsoft Product Support be able to recover any dat ...Show All
