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


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

c# Interoperability

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net
 

Hi Friends,

I want to communicate between c# and c++. Can somebody tell me what is the best approach for this?

I want something like I have a c# dll which exposes some methods. I want to consume those methods in the COM client.(c++) which means source is c# dll and client is c++.

Give a good sample on this requirement friends.

Thanks,

Shanenarrifield. 




View Complete Post


More Related Resource Links

CLR Inside Out: Best Practices For Managed And Native Code Interoperability

  

There are many factors to consider when building your app with both managed and native code. Find out how to employ interop and how to choose the interop that's right for you.

Jesse Kaplan

MSDN Magazine January 2009


Cutting Edge: Browser Interoperability In Silverlight 2

  

This month Dino Esposito explains how the browser interoperability layer in Silverlight addresses a number of your Silverlight / Web page interaction needs.

Dino Esposito

MSDN Magazine November 2008


Service Station: Improving Web Service Interoperability

  

If interoperability is the main promise of Web services, why is it that so many developers and organizations have a difficult time achieving it in practice? With all due respect to our hard-working standards bodies, the primary culprits are the imperfect specifications guiding today's implementations.

Aaron Skonnard

MSDN Magazine November 2004


Design: Place XML Message Design Ahead of Schema Planning to Improve Web Service Interoperability

  

Web Services are all about exchanging data in the form of XML messages. If you were about to design a database schema, you probably wouldn't let your tool do it for you. You'd hand-tool it yourself to ensure maximum efficiency. In this article, the author maintains that designing a Web Service should be no different. You should know what kind of data will be returned by Web Service requests and use the structure of that data to design the most efficient message format. Here you'll learn how to make that determination and how to build your Web Service around the message structure.

Yasser Shohoud

MSDN Magazine December 2002


A Young Person's Guide to The Simple Object Access Protocol: SOAP Increases Interoperability Across

  

The Simple Object Access Protocol (SOAP) facilitates interoperability among a wide range of programs and platforms, making existing applications accessible to a broader range of users. SOAP combines the proven Web technology of HTTP with the flexibility and extensibility of XML. This article takes you on a comprehensive tour of Object RPC technology to help you understand the foundations of SOAP and the ways it overcomes many of the limitations of existing technologies, including DCOM and CORBA. This is followed by a detailed treatment of the SOAP encoding rules with a focus on how SOAP maps onto existing ORPC concepts.

Don Box

MSDN Magazine March 2000


Interoperability Scenarios and Technologies for SharePoint Server 2007

  
MVP Scot Hillier talks about standards, technologies, and techniques for integrating SharePoint Server 2007 with other applications in common interoperability scenarios.

Interoperability for SharePoint Server 2007 and Lotus Notes or Lotus Domino

  
Learn the standards, technologies, and techniques to use the capabilities of SharePoint Server 2007 in conjunction with those of IBM Lotus Notes and IBM Lotus Domino.

Custom binding and interoperability.

  
Hi everyone, I have to build a wcf client to communicate with a JAVA web service. The configuration of that web service is not standard and I'm trying to use a custom binding. I have to generate a SOAP message with a Binary Security Token section and a username section in the SOAP header. I have to sign the username token with my X509 certificate and add the digest to the message. I must sign the body too and again add the digest to the message. The service is under an https transport (https://...). Below I attach a correct example of a message that I have to produce: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">     <soap:Header>         <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"                        soap:mustUnderstand="1">             <wsse:BinarySecurityToken                     xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"        &

.NET Client and Java Web Service Interoperability

  
I have a .net client that consumes an operation on a java based web service that appears to work accept for an issue with passing Boolean values back to the service in the soap message. Any member of the complex type that are defined as Boolean in the service contract will not be present in the soap message generated from the client even though they are set in the code. Sample Client Code: UpdateChecklistItemStatusPortTypeClient     proxy = new UpdateChecklistItemStatusPortTypeClient();     updateChecklistItemStatusReq request = new updateChecklistItemStatusReq(); request.ouid =   "P000122112"; request.applicationId =   "00000032"; request.adminFunction =   "ADMA"; request.checklistItemTypeCode =   "UHSTRN"; request.ceebCode =   "052046"; request.transcriptTerm =   "FINAL"; request.transcriptScores =   true;     updateChecklistItemStatusRsp response = new updateChecklistItemStatusRsp(); response = proxy.UpdateChecklistItemStatusOp(request); Client Soap Message Generated: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">   <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">   

WCF Security Interoperability with Java web service

  
Hi everybody, I'm implementing a WCF client which talks to a Java web service secured with x509 certificates and username token. The service requires both signing and encryption as message protection. Thanks to Yaron Naveh and some other guys on this forum I've managed to solve the signing stuff, but the encryption seems to be much more difficult. The problem I'm facing now is the server cannot decrypt my messages - I'm getting HTTP 500 errors. I've got a request example from the service vendor and compared with the messages my client generates, there is only one difference: in the example provided by service vendor I can see an extra tag KeyInfo under the EncryptedData, which seems to me reasonable to be there, but I don't know why WCF doesn't put that item. These are the two SOAP request sections I'm talking about: My WCF client: <s:Body u:Id="_1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <e:EncryptedData Id="_2" Type="http://www.w3.org/2001/04/xmlenc#Content" xmlns:e="http://www.w3.org/2001/04/xmlenc#"> <e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/> <e:CipherData> <e:CipherValue> <!-- Removed--> </e:CipherValue> </e:Cipher

Interoperability between SharePoint 2007 and MS Office 2007 on a 64 bit windows

  

I have 64 bit windows operating system with SharePoint 2007 and Microsoft Office 2007. Secondly, I have an application which communicates with share point and displays the content of MS Word documents stored in a document library in the Share Point 2007. 

When my application tries to create an instance of "SharePoint.OpenDocuments.3"

viewType = Type.GetTypeFromProgID("SharePoint.OpenDocuments.3");
object viewObject = Activator.CreateInstance(viewType);

It throws an exception. 

"Error in display content-retrieving the COM class factory for component with

Interoperability between SharePoint 2007 and MS Office 2007 on a 64 bit windows

  

I have 64 bit windows operating system with SharePoint 2007 and Microsoft Office 2007. Secondly, I have an application which communicates with share point and displays the content of MS Word documents stored in a document library in the Share Point 2007. 

When my application tries to create an instance of "SharePoint.OpenDocuments.3"

viewType = Type.GetTypeFromProgID("SharePoint.OpenDocuments.3");
object viewObject = Activator.CreateInstance(viewType);

It throws an exception. 

"Error in display content-retrieving the COM class factory for component with

WCF interoperability with Java SOAP service - sign elements order, force wsu id value

  

Hi,

I need to consume a SOAP web service created in Java from a WCF client. By intensively searching this on the web in general and on this forum in particular, I've seen that quite a lot of people have problems in this area, however I never found the answer to the questions I will post on this thread.

The service I have to consume has the following constraints:

  • needs transport level security by communicating over HTTPS 
  • needs signatures on the body (soap:body element) and a custom header of each request. The signature is done using a client certificate and complies with http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0.pdf. The signature is required only on requests. Service responses are not signed.

After an intensive amount of work I managed  to make my request messages look like (intercepted with fiddler):

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u<

How to get rid of ArrayOf prefixes: Cause interoperability problems

  

Hello,

We have lately encountered a difficult problem with sending arrays to a non-WCF service (WS02 WSF/PHP). The WSF/PHP service has been created on the basis of the WSDL generated by WCF. It looks like WSF/PHP expects the following kind of bare arrays: 

<sequence>

 <element name="MyElement1" />

 <element name="MyElement2" maxoccurs="3" type="tns:MyElement" />

</sequence>



<MyElement1/>

<MyElement2/>

<MyElement2/>

<MyElement2/>

but WCF generates a WSDL which requires wrapping the elements in another element as follows:  

<sequence>

 <element name="MyElement1" />

 <element name="MyElement2" type="tns:ArrayOfMyElement"/>

</sequence>



<xsd:complexType name="ArrayOfMyElement">

 <xsd:sequence>

 <xsd:element minOccurs="0" maxOccurs="unbounded" name="MyElement" nillable="true" type="tns:MyElement" /> 

 </xsd:sequence>

</xsd:complexType>





<MyElement1/>

<MyElement2>

 <MyElement/>

 <MyElement/>

 <MyElement/>

</MyElement2>

Well, this works in .NET but not in WSF/PHP. So is this a bug in WCF or WSF/PHP? Which one follows s

MD5 with RSA Signing - Java DotNet interoperability

  

Hello,

From my 2.0 .Net Framework App I need to sign a string with a X.509 certificate and the encryption algorithm for signing should be MD5/RSA. The resulting signature must be verified in a remote java app. Here's my methods to sign and verify the string:


public byte[] SignMessage(string Message)
{


 try {
  //----
  // Instantiate X509Certificate using file path
  X509Certificates.X509Certificate2 x509 = new X509Certificates.X509Certificate2(My.Settings.CertificatePath);

  //----
  // Convert Message to byte array
  byte[] data = Encoding.Unicode.GetBytes(Message);

  //----
  // Instantiate a RSA Algorithm object with Private Key
  RSACryptoServiceProvider rsa = (RSACryptoServiceProvider)x509.PrivateKey;

  //----
  // Sign it
  // New MD5CryptoServiceProvider -> Instantiate the hash Algorithm to create the hash value.
  byte[] signature = rsa.SignData(data, new MD5CryptoServiceProvider());

  //---
  // Encode the Signature
  string Base64EncodededSignatureString = Convert.ToBase64String(signature, Base64FormattingOptions.None);

  //----
  // Return it as byte array
  return Encoding.Unicode.GetBytes(Base64EncodededSignatureString

Interoperability: Runtime Data Sharing Through an Enterprise Distributed Cache

  

Learn how an enterprise distributed cache can help .NET and Java apps share data at run time, providing high performance and scalability.

Iqbal Khan

MSDN Magazine October 2010


Categories: 
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