MarcoB's Q&A profile
.NET Development asp.net and asymetric encryption
Hi all, I'm having trouble with a web service using asymetric encryption. The code below works for a single user and I can even log on to encrypt text as another user. However if I create a web service that I pass the public key to, I will always get an error: System.Security.Cryptography.CryptographicException: Key not valid for use in specified state. The error is returned on the highlighted line below. Generate a new key - Logged on as User1 Dim enc As New Encrypt Dim pk As String = enc.NewKeys("MyPasswords") My.Computer.FileSystem.WriteAllText("C:\Key.txt", pk, False) Encrypt Text - Logged on as User2 Dim pk As String = My.Computer.FileSystem.ReadAllText("C:\Key.txt") Dim enc As New Encrypt ...Show All
Visual Studio Team System TFS Proxy server restarting automatically
Hi We are using TFS proxy server and if we get the latest version by using Get specific version and with the checkbox "Force get of file versions already in work space " checked, the response is slow and it tooks hours to get the latest version. If we check the event log of the proxy server, I am often seeing the message "The VSTF server stopped" and after some time it is saying "The VSTF server started". I checked the statistics and it is saying cache hit percent is 95 and the other statistics are quite satisfactory. Looking forward for your reply Regards R.Balamurugan Hello Balamurugan, The TFS Proxy server uses ASP.net which will recycle every so often - it's a key aspe ...Show All
SQL Server No "Left" function in Expression Builder?
Anyone know the reaon the Left function was left out of the list of string functions in the Expression Builder Danno DannoCoy wrote: Anyone know the reaon the Left function was left out of the list of string functions in the Expression Builder Danno No. Annoying isn't it Instead you can use REVERSE(RIGHT()) -Jamie ...Show All
.NET Development scrollbars in windows.form
I have an application that displays a TableLayoutPanel containing a number of pictureboxes containing thumbnails. I am wondering; When i load this table with, say 100 thumbnails, how do i produce scrollbars so that all of the table can be viewed Another question: I would like to be able to "select" a thumbnail by clicking on its image (perhaps putting a border on the picturebox). Is there a way of handling this (would be a little bit hard to keep track of Click events). Or should i use something else than pictureboxes in a table regards, Kristian I solved my second problem by an eventhandler. For the first problem; I was thinking maybe i could put my table inside some control that have scrollin ...Show All
Microsoft ISV Community Center Forums MS Office document and image writer print driver
Besides removing this feature from Office during setup, is there a process to remove this virtual printer from 300 users with roaming profiles on an active directory network We are having an issue with this printer assuming the "default printer" selection for our users. As a work around we have changed their default printer, but after they reboot or log off / on it has defaulted back to the MS Ofc doc and image writer printer. A little bit different problem here. I was using this Microsoft Document Imaging Writer port (virtual printer) for quite some time to print what ever screen/file into a image file (mdi/tif format). This virtual printer was missing from the printer folder without I noticed i ...Show All
Visual Basic Plz help me out
I was trying to use ConfigurationManager.ConnectionStrings.Add(settings) inside app.config programatticaly but that returns a read only exception. Is there another way to do this ...Show All
Visual Studio Tools for Office Adding Dynamic Data points to the Excel at runtime.
Hi All, I want to develop a VSTO - Excel based application Which, will have dynamic data points.I want to have data points and related data based on customer selection. Pls suggest me how to approach for this kind of application design. Regards, Uma Kadagi. Hi Im not sure I understand dynamic data points in this context. If you are referring to data which is being linked to the database, I would strongly urge you to have a look at Data Binding in VSTO. Hope this helps! Thanks, Nikhil ...Show All
Visual Studio Tools for Office MS Office Document Imaging (MODI) - Search object
Hi - I'm developing an app using the MODI objects (in VB). My question is about the MiDocSearch object. I have the search function working - I can return the count of matches, and list all of the rect coordinates. How do I navigate to and highlight the matching words If I use the MS Office Document Imaging application, the 'Find' function allows you to find the 'Next' and 'Previous' occurrences, which highlights each matching word, in turn, so, I would think I should be able to do the same thing in my program. Thanks, Mark Yes, unfortunately, a lot of the staff see the word "Office" and push people to this forum because it's the only one with "Office" in its name. Getting ...Show All
Windows Forms Can't disable a button
I am programming in c#. I have a button on my form that when clicked, it plays a wav file using the PlaySound method from winmm.dll. The wav is about 3 seconds long. The problem is that if I keep clicking the button during the 3 seconds the sound is playing, it queues all of the clicks, and plays the wav over and over. My Button is named btn. So I tried: this.btn.Enabled = false; PlaySound(...); this.btn.Enabled = true; Doing this successfully greyed out the button while the sound is playing, but it still accepts clicks, so it didn't fix my original problem. Is there some way to clear the event queue Or is there something else I'm doing wrong. I just want the button to not work while the sound is playing. I have also tried ...Show All
Visual C++ How do I link NTDLL.LIB into a Win32 console application?
I have a Win32 Console application that I would like to use the ZwQueryVolumeInformationFile function. When I add the call to the function and link the application, the linker says that the <ctype.h> functions are multiply defined. In our company, warnings are errors and so the link fails. How can I use this function from NTDLL.LIB without getting the errors Try specifying "Ignore All Default Libraries" for Linker input (Project Properties, Configuration Properties, Linker, Input). This may or may not work depending what CRT functions are you using. Anyway, you should NOT link directly to ntdll.dll in a Win 32 application. Use LoadLibrary to access the functions from this dll because t ...Show All
Internet Explorer Development Browser buttons
Hi everyone! I'm trying to create simple browser buttons, but I'm not familiar to developing anything but web pages that's why I need your help. Could you show me the source code (in C++ or C#) of a browser button that would perform some javascript code, i.e.: <script type="text/javascript"> alert("Hello world"); </script> Also I've found that IE toolbars and browser buttons can be installed from .msi and .exe files. Could you explain me the difference between them. Thank you! P.S. I don't want to add these buttons to my browser, rather I'd like to create some kind of an installer that would allow anyone to install my browser buttons. Believe it or not, it's a fairly sim ...Show All
Visual Studio 2008 (Pre-release) Localization in WCF Service PerSession
Hi, I did like it : [ ServiceBehavior (InstanceContextMode = InstanceContextMode .PerSession, ConcurrencyMode = ConcurrencyMode .Multiple)] [ ErrorBehaviorAttribute ( typeof ( ServicesErrorHandler ))] public class suNETServices : IMonitorService , IOperatorService { private System.Globalization. CultureInfo _cultureInfo; public suNETServices() { SetCulture(); } private void SetCulture() { if (_cultureInfo == null ) { _cultureInfo = new System.Globalization. CultureInfo ( ConfigurationManager .AppSettings[ "Culture" ]); } Thread .CurrentThread.CurrentCulture = _cultureInfo; } } The problem is even using PerSession as client call any method, WCF create a new Thread and uses the windows defau ...Show All
Visual Basic Use of Selected ListItems
I am not sure if this can be done, and at least done in a way where a noob can understand it. In my current VB class I am working on a project where we are supposed to call on some text in a text file and then use it to produce some results based on user selections. I am wondering if I can use a ListBox to show the choices, then by having the user click on "Submit" button call the right information. As I am learning this for the first time, and have never programmed before, I hope that you all take it easy on me. As a test to see if this works I tried the following: Public Class Form1 Private Sub Button1_Click (ByVal Sender as System.Object, ByVal e System.Event Args) Handles Button1.Click If ListBox1.Selecte ...Show All
Microsoft ISV Community Center Forums How do connect an Excel file from Remote Server
Hi All, I am creating one application in Excel. In this application One Excel file will be in the Remote Server.When one persone get log in then the file immediately has to link with this excel file which in the remote server. Now my question is - Is it possible to connect the Excel file from the remote server using VBA. Please any one help me to do this. i am searching this in lots of way. if not is it possible Access file. Kalidas Hi blackmamba Could you please explain me how it can be done to map the file drive where the file is in remote server. I am sorry if my question in wrong. please can you explain it. I need this hurrily. Kalidas ...Show All
Windows Forms Problem with the sample code of showing the error icon when the user is editing the cell
Hi ! I am using the sample code mentioned in the windows forms faq for datagridview. The code is for showing the error icon when the user is editing the cell. The problem with the code is the tooltip does not appear at all when the "BAD" text is typed in one of the cells. Also, when you type bad data and then enter the right data and then come back again to the same cell and type bad data the error icon does not appear. The error icon is only a one time thing. I am not sure if anybody has really tested this piece of code.Or am I missing anything here . Suggestions and advices would be helpful. This should be really a standard code to capture the edits but apparently is not working correctly. The code is as follows: private ToolT ...Show All
