Usman Mahmood's Q&A profile
Visual Studio 2008 (Pre-release) How do I utilize standard gzip compression for web services in WCF?
Hi, I would like to compress the messages sent over a WSHttpBinding to get a better usage of low bandwidth. I'm primarily interested in compressing the response from the server and was thinking about utilizing the standard compression module for IIS 6.0. But this requires that the request has the "Accept-encoding: gzip" in the HTTP header and of course that WCF can decompress the response automatically, which doesn't seems to be standard functionality today. Is there any way to get this kind of functionality with WCF Are there any plans to make this decompression functionality standard in WCF (It is implemented in .NET 2.0 Web Servi ...Show All
SQL Server Can we create two servicess in a same database?
Hi, I tried creating two services in a same queue but i couldnt see them working properly. Now i got a primary doubt that can i create two services which communicate with each other in a same database Please help me.... here is the script which i used to create the services /************************************Scipt *********************************/ /********************** Sender Queue and Service ***********************/ CREATE QUEUE SenderQueue WITH Status = ON ; CREATE CONTRACT SenderContract ( ArchivingMessage SENT BY INITIATOR ); CREATE SERVICE SenderService ON QUEUE SenderQu ...Show All
Visual Studio How to implement CODE SNIPPET by native code?
Hi, Our language service is COM components written by native code. We want to implement CODE SNIPPET. Someone have told us how to implement that function in MPF. But we can't use the languagesevice.dll file correctly in our project. It seems that we have to inplement the interface IVsExpansionProvider by ourself, But there is no valid help information about this interface in VSIP document. Could any one give us some advice Thanks. Best wishes. Actually there are three interfaces that you need to implement, IOleCommandTarget, IVsExpansionClient and IVsTextBufferEvents. IOleCommandTarget needs to be implemented so that you ...Show All
Visual Studio Express Editions Working with string/char
Hi, I need to get a string from textbox and do some things to it. for example, if the string is "ABCDEF", Each character has a specified value that i need to set (how ) I want to get each of the letters and multiply their value with some index. when i try to do so, i get an error about string to char conversion. how do i extract each letter from the string but still keep the main string thank you for your help. Hi there, Here's an example that may be what you're after: string test = "ABCDEF" ; string modifiedTest; char [] testAsCharArray; int index = 5; t ...Show All
Windows Forms Inside datagridview - filter value of 1 combobox based on 2 combobox selected value
Hi friends, Please note that both the comboboxes are unbound and are inside the datagridview. I have a datagridview with 2 comboboxcolumns - one showing the "category" and other the "sub category". Category and Sub Category are related tables - 1 to many. When I select the value from Category comboxbox, the sub category comboxbox should only display values which are applicable based on the selected category. Any ideas - VB only . thanks Create a relation between Categories and Subcategories tables using DataSet Designer. Set the DataSource property for your Categories co ...Show All
Windows Forms In the form designer I can't access objects which are on an other form.
how can I access an object being declared on an other form in design time in visual studio .NET For example I have a grid on one form and I wanted to set its datasource to a DataSet table being on an other form. And I also wanted to refer to an image list which is also on the other form. But, I can't. I wanted to do it in design time! Can anybody help me Oh, All my objects are listed at the bottom of the page in the code view. They are private. I can make them public. So, the main deviation from other languages is the fact that the form components are declared at the bottom of the page, rather than the top. I guess this is ok. I'll a ...Show All
Visual Studio Tools for Office How to get/calculate the character width in MS Word?
BEFORE a lot of text strings are written to a Word file using Office Automation, I need to know the width of each string. Is there any way to do it Please note that office automation cannot be used, because the Word file is NOT available yet. Thanks. It's not really a VSTO related question, but besides that I think you are not in a position where you can determine the width of the string before knowing what font is used, the size of the font etc etc. Every font (except the fixed fonts) has its own width. A Verdana string can turn out to be of a different length compared to an Arial string. ...Show All
SQL Server update query and determinism
I receive the following error on an update. Msg 205, Level 16, State 1, Procedure MessageCompleted_U, Line 26 All queries combined using a UNION, INTERSECT or EXCEPT operator must have an equal number of expressions in their target lists. I have 2 tables a and b each with primary keys and select count(*) from a where akey=1 returns 1 and select count(*) from b where bkey=2 returns 1 (1) update a set acol2=bcol3 from a inner join b on a.bkey =b.bkey where a.akey=1 and b.bkey=2 I am assuming it is a determinisism issue, but I am confused. Even though the inner join itself is nondeterministic the additional qualifiers in th ...Show All
Windows Forms Application.ExecutablePath gives strange info
Hi, I am trying to use the Application.ExecutablePath to find the executable path of my app and it gives me the following C:\\Programme\\Microsoft Visual Studio 8\\Common7\\IDE\\vctesthost.exe when running the debugger. This is not what I was expecting. I was expecting the bin directory of where my application is built Is this normal Because you are querying this under a unit test, you are actually getting the application that is hosting the unit tests, in this case, VSTestHost.exe. There are some things that are hard to test and these are one of them. I would probably abstract the Application.ExecutablePath into anoth ...Show All
.NET Development Group Emails using Vb.Net
I am somewhat new to designing .net applications. If someone can give guidance, would appreciate. I am trying to build a process where a user may enter on a web form various criterias that will pull data in from oracle db. Matching emails will be stored into a "job" that will sit on some scheduled server and have a separate process actually send out the emails. I'm sure there are many ways to go about this. Vikram, I've written a windows service that consumes a webservice to get the details of emails that have to be sent, just as you described. The timer event fires and sends email ...Show All
SQL Server CLR trigger in another schema
Hi, I'm trying to write a clr trigger. I have created Myschema schema under schemas folder and Table1 under this schema (i.e.: Myschema.Table1). I created a clr trigger and tagged it with the Sqltrigger attribute as shown here: [ SqlTrigger (Name = "Trigger1" , Target = " Myschema.Table1 " , Event = "FOR INSERT" )] When I try to deploy my assembly from VS 2005 I got the following error: Cannot find the object "Myschema.Table1" because it does not exist or you do not have permissions If I move Table1 in the dbo schema the assembly is deployed succesfully If I add the assembly from the Assembl ...Show All
Software Development for Windows Vista WF custom persistence once again
I don't want to save my workflows zipped in a blob field in one table like default SqlWorkflowPersistenceService does. It is not transparent and flexible approach, saved data contains class type information, making workflow evolution almost impossible. I would be a happy WF programmer, If someone explains me how to load/save workflow instances in different tables depending on the workflow class name, layout workflow properties in different fields, so I'd be able to make SQL-queries, and globally update my workflow definition using just new a new WF assembly and sql change script... Or somehow simulate this behavior using ...Show All
SQL Server SQL Server Management Studio Express CTP
Hello! I have a problem-SQL Server Management Studio Express CTP does not work. Mine doesn't work either. However, it did work when I first installed it, but it stopped working sometime later. The only change I made was installing the SQL Server 2005 Books On-Line. I'm planning on uninstalling BOL to see if its the culprit. Do you have the Books on-line installed ...Show All
SQL Server Problem connecting to SQL Server 2005 database instance
I have an old ASP app that I have had to migrate to use SQL Server 2005. I have two pages that are virtually identical (one is edit only the other makes provision for adding new records - I didn't write these apps but I am responsible for making them work now). One page connect successfully to the SQL Server Instance and the other does not. They are using EXACTLY the same connect string. The only weird thing that has transpired is that we migrated to Active Directory recently. The ASP app that connects successfully was already on the web server prior to AD migration. The one that does not connect successfully was migrated after AD migrati ...Show All
SQL Server Web Replication from SQL 2005 Express
I am attempting to set up the following: SQL Server 2005 with Merge Publication Web Replication Enabled IIS Configured as documented, except DB server is an AD Domain Controller so can't assign Local User to Application Pool SQL 2005 Express Using RMO to create subscription Using Basic Authentication of HTTPS Calling the replisapi.dll diag works fine When I attempt to do a web synchronization with the Publisher, I get the following error: The Merge Agent could not connect to the URL 'https://test.abc.com/TestWebReplication/replisapi.dll' during Web synchronization. Please verify that the URL, Internet lo ...Show All
