.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

How to programmatically generate soap section for certificate signing

Posted By:      Posted Date: October 03, 2010    Points: 0   Category :WCF



Hope somebody can help me…


During the last week, I’ve been trying to work on the following problem but despite trying many things and a lot of internet searches, have not been able to get to the bottom of it.


In our company, we have a test tool that a number of external quality engineers insist on using to hit our WCF web services.  Their test tool can only natively hit our unsecured services.  However, we also have some SAML secured services and some certificate secured services.  


View Complete Post

More Related Resource Links

Certificate Signing Request Tool

Hi All, Currently there is a requirement in our application for creating a SSL Certificate Signing Request (CSR) message. Is it possible to develop one on .Net Framework 3.5 Some of the websites lilke Verisign do not mention any such procedure where they say that a custom tool is available apart from OpenSSL but they basically have provided a list all the webservers where their Digital Certificates are compatible and the instructions which say how the CSR's can be generated on these web servers.  I understand that the CSR contain the Web Server's public key, organization information and a unique match for server's private key. The certificates issued by the Certifying Authority  is used for Cient/Server authentication over TCP/IP. Look forward for some replies Thanks

Activation tab missing "Uses SOAP" section - COM+ Activation Tab

I'm looking into a migration path from our COM+ 1.5 components to WCF.  I was pointed to the "Uses SOAP" section of the Activation Tab, and how a web service could be used to communicate COM+ components.  I have been charged with creating a proof of concept, creating a COM+ component, activating this feature, and then using it with WCF.

My problem is that under Win7 or Server 2008R2 - this section of the Activation Tab is missing!

Here is a link of a screen shot showing the Activation Tab, as well as the documentation regarding "Uses SOAP" check box. 

I have enabled IIS, as well as ASP.NET on my WIN7 virtual machine - but this section simply does not show up.

I've searched the web for information on this, but nothing seems to be available.

Any ideas?  Do I have to go back to Server 2003? XP?


Seperate certificate for ssl and signing

Hi there! Im creating a service and client that has to use a different certificate for signing than for the ssl-traffic. It has to use the MutualCertificate security binding.

In the following article the requirement is that the messagepattern for this to work has to be a duplex one? Isnt there anyway around this? =(

Note that i dont do message encryption, only message signing. I dont understand if the article refers to the message-encryption or the ssl-encryption?

How to generate pivot tables from SSAS cube programmatically?


I am able to produce about 20 pivot tables from SSAS cube one by one. Is it possible to produce these tables programmatically with header and footer information?


Please note that the end users like to use excel.





Urgent: help needed signing a SOAP 1.1 Message's Body+Timestamp, and send over SSL



I have a deadline that is about to whoosh by having underestimated how tricky this would turn out to be.



  • SOAP 1.1
  • WS-Security for timestamp and signing
  • signature has to be single signature made from 2 elements: body + timestamp
  • Asymmetric Algorithm: SHA1
  • Key algorithm: RSA 
  • sent over SSL
  • client has to authenticate to server via cert with well known CN=
  • Server is not .NET but Weblogic, with policies that cannot be changed.

Basically, a secure (SSL) based transport, with signing to protect against tampering as well as replay.



Seemed like a good choice at first as it has WS-Security built in.After setting up a behavior that defines client and server certs setting binding/  

Unfortunately wsHttpBinding creates a signature from too many elements in the message (Body, Action, RelatesTo, Timestamp).

There is no apparent way of controlling what gets selected as an element of the signature.  

For example: as the ws-Security headers (Timestamp, etc.) are not part of the proxy Request message class definition, and are added/injected somewhere down the line, and are no

Request Certificate programmatically on behalf users from an Entreprise CA

I'm programing an application that request a certificate from Microsoft Enterprise CA on behalf users. Actually, I can request a certificate (with Certenroll) by using a template. the application is hosted on IIS on the enterprise CA server. But the certificate I request belong to the computer account. My problem is that I don't know request a certificate for a specific user on AD. I have no idea how to map my certificate request to a user! Here is link that I've used to request a cert:


Thanks for help,

Signing SOAP Messages with Certificates in WCF

Let me preface this question by saying that I am a novice with WCF--especially configuration.

I currently have a .NET client written that uses WSE 2.0 to consume a web service provided by a 3rd party. The web service is designed to accept a signed SOAP message for login. Signing is achieved via a purchased certificate. Once authenticated, the service returns a SAML assertion token which is included on subsequent messages until the client calls a logout method on the web service. I was hoping to convert this client to WCF for hopefully better tracing capabilities and because it is tedious installing WSE 2.0 on target machines. I also am hoping to avoid forthcoming obsolescence of WSE.

Here are the details of the web service. Please let me know if something is lacking.

The service uses SOAP 1.1 with attachments for communication. The login messages must be signed with the purchased certificate. The public key for the certificate has already been supplied to the service provider. The endpoint addresses actually specify "https", which I understand to mean that the communication is happening over SSL--this is one area that I am a bit hazy on, so please forgive me if I stated that incorrectly. The service uses WS-Security as a means of securing the message.

In what I've tested so far, I have been able t

How do I add the client certificate to a soap request?


hello all,

I want to add the client certificate to the web request, but i'm unable to do it because it's not visible. here are the examples:

I have a web test project. if i add an asmx webservice to the web protect, i am able to do this


void buttonclick()
   WebService1 ws = new WebService1();
   ws.URL = ... someURL;
   ws.ClientCertificates.Add(new certificate in here); 


here's the problem,
if i add a webserivce project to the current solution (web test solution). And I reference the webservice. and when i do this:


void buttonclick()
  InstantName.Service1 ws = new InstantName.Service1();
  ws.URL ...??? Don't see it
  ws.ClientCertificates.Add( ... not here ... ) 


both web services class inherits the System.Web.Services.Protocols.SoapHttpClientProtocol

i don't get it ... anyone has experience with this, please give some input .. thank you.

Export SharePoint List to Excel Spreadsheet Programmatically using C#

In SharePoint applications, Custom Lists are used to store business data and Document Libraries to store the documents. But for data manupulation and analysis, Microsoft Excel provides very rich features as compared to SharePoint Lists. That's why people still loves to work on Microsoft Excel Sheets.

Creating an Excel Spreadsheet programmatically using VB.NET

The Interoperability services make it very easy to work with COM Capable Applications such as Word and Excel. This article reveals using Excel from a managed application. Excel is the spreadsheet component of Microsoft Office 2000. The majority of Excel programmatic functionality is exposed through Automation via the type library Excel9.olb. The intention of this article is to express that a managed application can interrelate with Excel as a COM server.

Creating an Excel Spreadsheet and Adding Data to It Programmatically

The Interoperability services make it veryeasy to work with COM Capable Applications such as Word and Excel. Thisarticle reveals using Excel from a managed application. Excel is thespreadsheet component of Microsoft Office 2000. The majority of Excelprogrammatic functionality is exposed through Automation via the typelibrary Excel9.olb. The intention of this article is to express that amanaged application can interrelate with Excel as a COM server.

Generate thumbnails on the fly

There are many posts how to generate thumbnails using ASP.NET. Some good some less. Be sure to get distance from the versions that use Image.GetThumbnailImage method.

How to programmatically add controls to Windows forms at run time by using Visual C#

Create a Windows Forms Application
Start Visual Studio .NET or Visual Studio 2005 or a later version, and create a new Visual C# Windows Application project named WinControls. Form1 is added to the project by default.
Double-click Form1 to create and view the Form1_Load event procedure.
Add private instance variables to the Form1 class to work with common Windows controls. The Form1 class starts as follows:

Generate Random Numbers

SQL Server has a built-in function that generates a random number, the RAND() mathematical function. The RAND math function returns a random float value from 0 through 1.

using the linqDataSource control programmatically (dynamically)



my scenario is this: I want to use the linqDataSource control to bind data to a gridview for it's efficient built-in paging and sorting features *but* I don't want the data to be bound until the user has input various search parameters, so I need to bind the data from a button click event. Also, the search options will be somewhat complex in that there will be several optional search parameters, via various dropdowns and textboxes, so I can't just declaratively/statically setup all the WHERE parameters on the linqDataSource (at least I'm assuming I can't, or that it may result in poor performance if I do and just assign default values like the everything wildcard '%' for the cases the user doesn't use a particular search parameter). Given that brief description, here is an example of what I'm doing, but with only one WHERE parameter for simplicity, the real code will be adding anywhere from 1 to about 12 WHERE parameters depending on how the user sets the search options in the GUI.

the linqDataSource on the aspx page:

<asp:LinqDataSource ID="ldsMain" runat="server" 
        Select="new (field1, field2, field3, etc..)" 

Generate rss feed with HTTPHandler





I'm looking for link/tutorials/code samples on How to create HttpHandler for generating rss feeds for a website.




ASP.NET Designer - How Do I generate this Design-Time Markup?


I want to generate this:
    <x:MyControl id="a" runat="server">
            <x:MyScript .. />
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend