Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
P

pelos

@pelos
About
Posts
34
Topics
18
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Active Directory (ADSI): substring search problem
    P pelos

    hello forum, Not sure if this is the most suitable place in codeproject to put a thread related to Active Directory... sorry, if does not. I have got a problem while searching directory through ADSI. I want to search those organizational Units which contains a specific substring in its distinguishedName attribute. The filter expression is as follow: (&(objectClass=organizationalUnit)(distinguishedName=*mysubstring*)) where mysubstring is the specific substring. The problem is I get always nothing. Could u give me any idea what is the problem and how to solve it? thanks in advance!

    Database question windows-admin algorithms help tutorial

  • some ideas for my final research project
    P pelos

    :laugh: hahaha.. very good joke.. Belive me, I use google a lot Cheers!

    The Lounge csharp security help question

  • some ideas for my final research project
    P pelos

    :omg: Marc, you are very hard with me. I only was looking for things that were not done. Of course, I have friends and teachers for inspiration... I have used the Internet and I have seen what other people are doing...and I have got my own ideas too. I was looking for more ideas... I think you, programming experts, can give me great opinions. Cheers!

    The Lounge csharp security help question

  • some ideas for my final research project
    P pelos

    hi forum, I am a Computer Sciences student and I am going to developing my final research project... the problem is that i dunno what can i do!! Well, i would like to develop something related with security (criptography, certification, smart cards, ...) on the .NET platform. Could u give me any ideas for my project? ... ..or give links where i can get some ideas? Thanks in advance!!! Sergio.

    The Lounge csharp security help question

  • problem integrating unmanaged C/C++ with C#
    P pelos

    hi, I have solved the problem by setting the "Not Using Precompiled Headers" option, but now i have got another problem: I dont know how to use the imported C# dll. What i do is to copy the c# dll in the "debug" folder. Then, I set the path of the "debug" folder in the "resolve #using reference" project property and finally, I import in the C++ program the C# dll by using the #using directive: #usign "MyDLL.dll" But now, how can I create an object contained in the DLL? Thanks a lot!! Sergio.

    C# csharp dotnet help question c++

  • problem integrating unmanaged C/C++ with C#
    P pelos

    hi forum, I want to integrate an old C application with a C# library (dll). I know there are various alternatives but i have choosen the "managed C++ extensions" way. What i do is to modify the compiler options by adding the /clr option and to recompile the old C application... but the compilation returns this error: Command line error D2016 : '/YXstdafx.h' and '/clr' command-line options are incompatible do u know what is the problem and its solution? I am using Visual Studio .NET 2002 (.NET Framework 1.0) Thanks in advance! Sergio.

    C# csharp dotnet help question c++

  • Problem verifying a signed XML document
    P pelos

    Hello, i have developed a web service where the client sends to the server a signed xml document signed with "Infopath". When the server receives the document it is impossible fot him to valiadate the signatures. Here is my code: (doc is a XmlDocument) XmlNodeList nodeList = doc.GetElementsByTagName("Signature"); SignedXml[] signatures = new SignedXml[nodeList.Count]; for(int i = 0; i < nodeList.Count; i++) { signatures[i] = new SignedXml(); signatures[i].LoadXml((XmlElement)nodeList[i]); if (!signatures[i].CheckSignature()) validSignatures--; } The xml document has been signed with a valid X509 certificate. thank you for your help!

    C# help sysadmin cryptography xml

  • access certificates of an ASP.NET Webservice
    P pelos

    hi forum, i am developing a web service which adds and removes certificates from a certificate store. I would like to add and remove the certificates "by hand" (not programmatically) too. I think that the web service runs as the ASPNET user, so I would like to add/remove the certificates of the ASPNET user "by hand". I know that I can manage the certificates of an user with the MMC but I dont know how to manage the certificates of the ASPNET user. Could you help me? Thanks in advance!

    ASP.NET asp-net csharp cryptography help tutorial

  • OCSP support in MS development technologies?
    P pelos

    hi forum, I would like to validate X.509 public-key certificates in my C# application using the OSCP protocol. Do you know if there is a Microsoft API or library for client side OCSP? Thanks in advance.

    C# csharp json question

  • Problem verifying a signed XML document
    P pelos

    Hello, i have developed a web service where the client sends to the server a signed xml document signed with "Infopath". When the server receives the document it is impossible fot him to valiadate the signatures. Here is my code: (doc is a XmlDocument) XmlNodeList nodeList = doc.GetElementsByTagName("Signature"); SignedXml[] signatures = new SignedXml[nodeList.Count]; for(int i = 0; i < nodeList.Count; i++) { signatures[i] = new SignedXml(); signatures[i].LoadXml((XmlElement)nodeList[i]); if (!signatures[i].CheckSignature()) validSignatures--; } The xml document has been signed with a valid X509 certificate. thank you for your help!:)

    C# help sysadmin cryptography xml

  • SerializationException when deserialize an object
    P pelos

    hello, i have solved partially my problem: -- The problem with the signedData was the conversion from byte array to string: i was converting the byte array (the serialized object) into a UTF8 string instead an Unicode string. So, the solution was to use "System.Text.Encoding.Unicode.GetString()" -- but now, I have another problem. When the client tries to deserialize the struct it gets the following message exception: System.IO.FileNotFoundException: File or assembly name WEBSERVICE, or one of its dependencies, was not found. I have develop a testing Console Application that serializes an object, signs it and verifies it with SignedData, and finally, deserializes it and it works well. So, I think it is a WebServices problem. It sounds like client can not find the serialized object class or the namespace where it is contained but this is rare for me because the client can instanciate that class. thank you one more time:-D

    C# question sysadmin json announcement

  • SerializationException when deserialize an object
    P pelos

    hello, I think I have found what is the problem... but I do not know the solution. The problem is that I am using CAPICOM.SignedData. The process is as follows: 1.- Serialize the struct. 2.- Convert the byte array into a string via System.Text.Encoding.UTF8.GetString() method. 3.- sign the data (the string) with SignedData.sign() method and return the result (a string with a PKCS#7 structure) to the client. 4.- The client verifies the signed data and extracts the SignedData content (a string) which is the serialized struct. 5.- Finally, the client tries to deserialize the struct and it throws the exception. I think the problem is the SignedData operations because without them I can serialize and deserialize the structs without any problem. Any suggestions? thank you.

    C# question sysadmin json announcement

  • SerializationException when deserialize an object
    P pelos

    hello, "Create a seperate assembly u can both reference from the service and the client (i tend to like give that a fixed version number, not the auto one)." Could you give me a reference (article, tutorial, book...) to learn how to do it? Thank you.

    C# question sysadmin json announcement

  • SerializationException when deserialize an object
    P pelos

    hello, I have developed a web service. The server (web service)serializes an object (a struct) via BinaryFormatter and then returns it to the client. The client receives the serializated object and tries to deserialize it. This throws the following exception: System.Runtime.Serialization.SerializationException: Bynary stream does not contain a valid BinaryHeader, 0 possible causes, invalid stream or object version change between serialization and deserialization. Here is the code: serialization: MemoryStream ms = new MemoryStream(); BinaryFormatter bf = new BinaryFormatter(); bf.Serialize(ms,myStruct); byte[] bArray = ms.GetBuffer(); ms.Close(); deserialization: MemoryStream ms = new MemoryStream(bArray); BinaryFormatter bf =new BinaryFormatter(); ms.Position = 0; myStruct struct =(myStruct)bf.Deserialize(ms); ms.Close(); Do you know what is happening? thank you.

    C# question sysadmin json announcement

  • conceptual question about cryptography and CAPICOM
    P pelos

    thank you, Heath. if i dont use CAPICOM, how can i create a CMS/PKCS#7 (SignedData) structure? I think there is not a PKCS#7 structure in the .NET class library. ahhh! I think that the response to my question (how is the association between a public-key certificate and the signing private key) was the PKCS#12 structure, wasn't it? thanks.

    C# question cryptography

  • conceptual question about cryptography and CAPICOM
    P pelos

    hello, I am trying to sign data with a CAPICOM.SignedData object. The SignedData object has got a method called Sign() which performs the operation and this method has got a parameter called Signer which (according to the CAPICOM reference) "must have access to the private key of the certificate used to sign". I had understood that a public key certificate contains the subject's public key. so, I think that "the private key of the certificate used to sign" means that the certificate does not contain the subject's private key but that is associated with it. My questions are: 1. how is this association? 2. where is stored the private key? 3. how can I obtain a signing private key? thanks in advance:-D

    C# question cryptography

  • Initialization in web services
    P pelos

    hello, My Web Service accesses to a MS SQL database to store and retrieve data from it. but to store data, first I must to create programatacally the database and the tables. My question is what is the best way to do this? where is the best place to put the code which do this? In the beginning of each Web method (if the database and the tables do not exist, of course) or there is a common place to create or to initialize data, structures, systems, connections, etc.? thanks in advance.

    C# question database wcf learning

  • store a c# byte array
    P pelos

    ok. thank you. that was the problem! but ... another question: if the maxium size of a varbinary is 8000, how could i store an object with a greater lenght (for example, a file)? thank you. bye.

    Database database csharp sysadmin data-structures help

  • store a c# byte array
    P pelos

    hello forum, i want to store c# objects in a MS SQL database. I think the best way is to serialize the object to a byte array but i have problems to insert a c# byte array into the database... First, the equivalent type of datum in MS SQL is the binary or varbinary type, isn´t it? well, my code: MyObject mo = new MyObject(); MemoryStream ms= new MemoryStream(); BinaryFormatter bf = new BinaryFormatter(); b.Serialize(ms,mo); SqlConnection sc = new SqlConnection("server=localhost;uid=sa;pwd=;database=myDB"); sc.Open(); SqlDataAdapter sda = new SqlDataAdapter("select * from myTable",sc); DataSet ds = new DataSet(); ad.Fill(ds,"tableFile"); DataTable dt = ds.Tables["tableFile"]; DataRow dr = dt.NewRow(); dr["object"] = ms.GetBuffer(); //object is binary or varbinary // and GetBuffer() returns a byte[] dt.Rows.Add(dbRow); SqlCommandBuilder scb = new SqlCommandBuilder(sda); sda.Update(ds, "tableFile"); The instruction: dr["object"] = ms.GetBuffer(); throws the message exception "String or binary data would be truncated" could you help me, please? thanks in advance.

    Database database csharp sysadmin data-structures help

  • convert XML X.509Certificates
    P pelos

    ok. i'll try to do it without CryptoAPI. thank you.

    C# security cryptography xml question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups