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

Top 5 Contributors of the Month
Post New Web Links

Include certificate chain in pfx export

Posted By:      Posted Date: September 15, 2010    Points: 0   Category :.NET Framework
When using the export method of an X509Certificate2 object, can anyone tell me how to include the certificate chain within the pfx file? I would like to accomplish this without using CAPICOM. I can successfuly export the certificate but the trust chain is not included in the pfx file.

View Complete Post

More Related Resource Links

Export to Word and include an image

Hi, I am able to export a gridview and other tables into Word, but i want to include an image in this.  How is this possible.  If i do as below the image is not displayed. Please see my code below:         Response.Buffer = True        Response.ContentType = "Application/vnd.ms-word"        Response.ContentEncoding = System.Text.Encoding.Default        Response.AddHeader("content-disposition", "attachment;filename=participant_attendance.doc")        EnableViewState = False        Dim oStringWriter As System.IO.StringWriter = New System.IO.StringWriter        Dim oHtmlTextWriter As System.Web.UI.HtmlTextWriter = New System.Web.UI.HtmlTextWriter(oStringWriter)         Dim style As String = "<style> .textmode { mso-number-format:\@; } </style>"        Dim table_text As String = String.Empty        Dim contact_text As String = String.Empty         ' Top table which contains the course information.    &nb

Export Encrypted Certificate

Hi, I have successfully created the neccessary encryption certifaicates/keys/master key on a local sql server instance. I would like now to export that same settings to a new client instance so that we can do the following: Make sure that only licensed users are able to log in to the system. So the way I thought I could do this was to create a master encrypted value on our main server and then export this certificate to the client db. Then I would store encrypted values (from our main server) in the client user table. Upon logging into the app the application would attempt to decrypt these values using the orginal installed certificate, upon successful decryot to a value that the application will recognise the user will then be able to log in. Is this sort of thing possible using sql server. I have succesfully restored the certificate onto a new instance but upon running the decrypt it does not recognise the encrytpted value. Any help/suggestions/links would be most most welcome/ Thanks in advance

Why is broken Certificate Chain trusted by WCF ?


Hi all,

I have the following scenario which I really do not understand why this is working.


1. I have secure client  on Transport Level with WsHttpBinding

                binding.Security.Mode = SecurityMode.Transport;
                binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate;
                binding.Security.Message.ClientCredentialType = MessageCredentialType.None;
                binding.Security.Message.NegotiateServiceCredential = false;
                binding.Security.Message.EstablishSecurityContext = false;


CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.ChainTrust;


RevocationMode = X509RevocationMode.NoCheck;

2. I have a server which is using a self signed certificate, signed by an intermediate CA and this intermediate CA was signed by a self signed root CA

3. Root CA certificate is installed in "trus

Install Failure - Certificate Chain Trust?



Hello Community,

I'm trying to do a basic install of SQL Server Express 2008 on an XP SP3 machine.  It had been working prior to an install of Visual Studio 2008 (with SQL).  I had to uninstall and reinstall for testing purposes.  Now I can't get an install to complete.  After days of uninstalling and reinstalling, including blowing out all Visual Studio stuff, all .net stuff, and reinstalling .net 3.5 SP1 (no Visual Studio), I still can't get SQL Server Express 2008 installed (and running, that is...the management studio and config manger get installed).  Here is the error on install:

"A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)"

I have no idea why certificates are even looked at.  I've verified in the Configuration Manager that Encryption is set to "No".  I have full admin rights on the machine.

Trying to stop and start the SQL server in the config manager now yields a new clue in the error log:

"Server      A self-generated certificate was successfully loaded for encryption"

OK, that's good.  However, now I see this after a timeout

Export Visio Database Table Names to Excel

If you use the Enterprise Architect edition of Microsoft Visio for data modeling regularly, then there is a good chance that at some point you've wanted to export just the table names into Excel. You might want to do this to map logical ERD entities to physical data model tables, track project status by entity, or track overlap between database versions.

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.

Configuring Profile Image Export in SharePoint 2010

It's no secret that I am thrilled with the new social features of SharePoint 2010. I am most excited about the new Profile Picture handling. I strongly believe that the more we can show the faces of our colleagues to one another the more connected we will feel. Clearly Microsoft feels that way as witnessed by the many features that make use of the Profile Image like the Activity Feed and Colleagues list

Database Export Wizard for ASP.net and SQL Server

A step wizard for ASP.net to export database objects to CSV, TXT, HTML, XML, or SQL. it guides users through a few simple steps to choose a database object (table, view, or query), select columns, and export the data in any of the standard formats CSV, HTML, XML, or SQL.

LocateSMS permitt to include your GPS-coordinates into a SMS

Summary: LocateSMS permitt to include your GPS-coordinates into a SMS

. Found under: SMS, GPS, navigation, coordinates

. Requirements:
Windows Mobile Pocket PC
GPS-antenna (wired, bluetooth, integrated, etc...)

Export Gridview data to Excel sheet


Hi ,

     I have a requirement where i need to export the gridview data to excel.My code export the data in excel that was fine.

But the enchancement needed now , I was exporting the 3 gridview in same excel sheet under the workbook.

Now i need to export the 3 grid view in 3 different sheet in the same workbook.

so can please tell or share the updated code in my below code ...

public void writeovrsummary()


        Response.Write("Overall Summary");
        //Response.Write("Report as of " + DateTime.Now.ToString("hh:mm ss tt"));

        StringWriter sw = new StringWriter();
        HtmlTextWriter hw = new HtmlTextWriter(sw);

        SqlCommand com = MyConnection.CreateCommand();
        com.CommandText = "useroverall_Report";
        SqlParameter[] par = new SqlParameter[1];
        par[0] = new

Export Dataset to excel sheet in a required format?



I know how to export a grid view to excel.

But here i have a Dataset which consists of data like below and also it need to display in a required format like below.

pno psubno pstate pdetailid pdetails

 12    1          CA         1           cbsdjcbdjc     

12     1          CA          2        cndcnjdcjcj

12     2           VA         4          xcndwkfcgygry

13     1            AL        1           ncdcnjdcndj

My excel sheet  should like this.

pid       pstate     

 12/1      CA             &nb

Bugslayer: Wait Chain Traversal


Windows Vista has a new API called Wait Chain Traversal (WCT), which allows you to determine when and why a process is deadlocked. Read on.

John Robbins

MSDN Magazine July 2007

RDLC Report Hide Export Option

The article RDLC Report Hide Export Option was added by mandandeo on Sunday, August 15, 2010.

protected void ReportViewer1_PreRender(object sender, EventArgs e) {DisableFormat(ReportViewer1, "Pdf"); }protected void DisableFormat(ReportViewer viewer, string formatName) {const System.Reflection.BindingFlags Flags =System.Reflection.BindingFlags

Include a Crystal Report in .NET Web Service for Dynamic In-Memory-Only DataSet



I would like to use Crystal Reports in a .NET web service.  Ultimately I would like to convert my report document to a PDF and then return the PDF as a byte array. 

My .NET DataSet is generated dynamically at run-time.  It consists of four related tables.  Since my DataSet does not have a physical datasource, I created an XML Schema file.  I then added the XML Schema file to the web service project with Add Existing Item. 

A solution for working with a dynamic in-memory DataSet exists for ASP.NET web sites and client-based forms.  I tried to use this method as it is published.  When that didn't work I tried creating the report and XML Schema directly in the web service project, but that also didn't work.


The problem is apparent when you try to set the datasource.......the code bombs on the call to SetDataSource(DataSet) with the message
ex = {"The data source object is invalid."}

Crystal Reports would save me a lot

export to excel issue


Hello ,

I have a browser enabled form which i published to sharepoint ..now i want to export the contents of the form to excel..i have 1 repeating table and two repeating sections ..whenever i go to export to excel and then choose just one repeating table or a repeating section or any option other than export all form data i get an error ...first the progress bar just freezes and then when i end the task through task m anager i get a msg that microsoft excel could not start.make sure excel is installed correctly and then try again....

Can somebody tell me how to debug this..i have tried the export of a form containg repeating table and sections and it works good ..so that means there is some problem with my form..so now can somebody give me an idea as to what can the problem be and how can i debug it.


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