To get the content encoding from the response from the server, you can use the HttpWebResponse.ContentEncoding parameter. You can then conditionally use the appropriate Encoding class that Daniel mentioned to get the string from the byte array.
Does anyone know of a simple example of securing a webservice client and server. I need to pass a username and password from the winform client to the web service, but I don't want them sent in plain text xml.
Or even easier, just setup an SSL certificate on your web server and communicate with your web service via the SSL port (default is 443). This encrypts everything for you.
Instead of the SOAP headers (which doesn't encrypt anything), see the System.Security.Cryptography.Xml namespace in the .NET Framework SDK. I also cover the signing portion of this (to see an example of that part of it, which is similar to what you need to do for encrypting the SOAP message) in my article, Using XML Digital Signatures for Application Licensing[^]. The WS-Security specs (of which WS-Signatures and WS-Encryption is part) are also an industry standard.
let me first say how impressed i am with the resources avaliable on this website, its been making life easier with all the help on the tutorials avaliable. Good Job!
Ok well my question Im quite new to C# i come from a VB background (so bare with me)
Right I have created my own custom contol, a button, and a pannel, the pannel allows stongly typed collections in this case is the button im basically at the stage where i can go into the properties of my pannel and start adding my buttons (via the collections properties), add the buttons, but it does not store the information all it does is generate the following code:
this.pannelbutton1 = new InfoData.Components.Pannel.pannelbutton();
I know i have missed something off put i dont know, if anyone has any good examples or point me in the right direction that will great help.
Try using the DesignerSerializationVisibilityAttribute on the property set to DesignerSerializationVisibility.Content. See the aforementioned attribute documentation in the .NET Framework SDK for more information. You may also have to implement a CodeDomSerializer, which you can find more information and an example in the .NET Framework SDK documentation[^].
Well I really need a dummy's manual about ComboBoxColumn in a Datagrid, I try to do it, but still doesn't work, I made this:
1 - I added a ComboBoxColum class from MSDN.
2 - I added a TableStyle to my datagrid, this datagrid's datasource is a dataview. The MappingName is empty??
3 - I made a instance of the ComboBoxColum class, and I added it to the TableStyle.
4 - I binded the ComboBoxColum to a table.
In theory is all, or no?? And what it doesn't work???
Yeah, I try this too, but I look my problem is with the MappingName, into my TableStyle I can't choose anything, and if type something the datagrid isn't works, like I know the MappingName is the table to used (a DataMember), but I'm working with a DataView, so don't use DataMember, and I can't use a Mapping Name
I must try to develop the datagrid form again from zero or what??
I'm using an Xml-file to fill my dataset and I place the dataset in my datagrid. My problem is that when I click a row in the datagrid, I want the data in text and/or checkboxes that are placed below the datagrid. Then I want to change the data in the text and checkboxes and then the row that was selected in the datagrid has to be replaced with what has changed in the textboxes
Is this possible or to difficult?
You must either change your system colors (applies to all applications) or owner-draw your entire main form and paint a different fill color in the area occupied by the menu. The MainMenu is not a control and cannot be drawn individually.
See the Control.OnPaint method documentation in the .NET Framework SDK. Override this in your form. If you don't know how to perform owner drawing, then you better do a search here on CodeProject. It's not trivial.
I'm having a problem whit my page. I have a sql db, and I want to combine to columns, "lastname" and "firstname", from my "user" table. I want to put the the combined two colums in one dropdownlist. This is my sql query:
SELECT DISTINCT u.UserID, Firstname, Lastname
FROM [User] u, Course_User cu
Does anyone have a suggestion on how i can solve this?