Answer Questions
TruePsion Retrieving the Attribute from an XML document using VB.NET XML DOM
Hi All, I'm a little new to XML so please excuse me if this is too easy. I've created a simple function that loads a XML document using MSXML.DOMDocument and then reads the data within using MSXML.IXMLDOMNodeList. So far so good. I can return MSXML.DOMNodeType.NODE_ELEMENT and NODE_TEXT but I can’t return NODE_ATTRIBUTE . It just ignores it dispite it being in the XML file. Please can anyone tell me what I should be doing Regards Pete Thanks guys, I think I've got enough there to work on. Cheers Pete That’s great thank you very much. So working through a document that has attributes and elements how d ...Show All
Aleksandr Tokarev InnerXml property generates blank namespaces
Hi, I've got some problem while generating some Xml code with the InnerXml property. After doing "myNode.InnerXml = ..... ", my Xml code has som blank "xmlns" attributes in the node added by this way. Here's an example : XmlElement destNode = doc.CreateElement( "destination" , XPath .JOB_NAMESPACE); XmlAttribute typeAttr = doc.CreateAttribute( "xsi" , "type" , XPath .SCHEMA_NAMESPACE); typeAttr.Value = BROADCAST_OUTPUT_TYPE; destNode.Attributes.Append(typeAttr); destNode.InnerXml = "<listenAddress type=\"string\">Automatic</listenAddress>" + "<listenPort type=\"uint\">" + bOutput.Port ...Show All
qjay Custom serialization seems to be ignored
Hello, I am trying to use the ISerialization interface to customize how a class is serialized, to be able to open it with another application. This is my getObjectData method: public void GetObjectData(SerializationInfo info, StreamingContext context) { string s = System.Reflection.Assembly.GetExecutingAssembly().FullName; s = s.Replace("96wellShuttleSW","SerReader"); info.FullTypeName = s; info.AddValue("author", author); info.AddValue("authorProfile",authorProfile); info.AddValue("lastModifier", lastModifier); info.AddValue("lastModified", lastModified); info.AddValue("wells", wells); info.AddValue("fileSettings", fileSet ...Show All
Asday Finalizer
What is the core differnce betwenn destructor and Finalize() I took the question to mean "What is the difference between C#'s destructor and the .Net Finalize() method " To which the correct answer is "There is none". You have described the difference between the C++ destructor and a .Net Finalize(), which may well have been the OP's question! There is no difference - the "~" is just syntactic sugar. Actually, there are big differences. .NET does not offer destructors in the same sense as a C++ or Delphi destructor. .NET uses garbage collection, which means that for the most part, memory recapture and cleanup is a non-deterministic process - which is cou ...Show All
Crashone Generating random numbers and Retreaving them in other forms in C#
I admit it, this probably has been answered half a google times before in other threads, but I have not been able to find exactly what I'm looking for. I'm trying to make a rpg (hence the need for a number generator). But, I need to be able to have the spread of the nembers to be between 1 and 20, for example. Then, I need to call these numbers latter on. Obviously I'm learning the language and trying to modernize myself (I've only worked with QBASIC beore!) Can anyone help Oh yeah, I should mention that a psudorandom number would suffice. I didn't read the thread to a T, but the stuff there looks inefficient. James Curran's shuffle technique described above is the standard way of generating permutations of random numbe ...Show All
drew_p Multiple async calls to 2 different web service methods
Hi all I have a web service, one of the methods takes around 5-10 mins to execute, so I call this asynchronously, which is fine, however, I want to call another method on the web service called GetStatus every 5 seconds or so in order to obtain the status of the initial method call. How can this be achieved Thanks Kev Alex DeJarnatt - MSFT wrote: C ould you be more specific in your question It sounds like you're on the right track calling the long-running method asynchronously. If you'd like more information about that, see this article: http://msdn2.microsoft.com/en-us/library/tz4bkcx2.aspx Once you do that, your GetStatus method calls will be normal synchronous web service calls. than ...Show All
InquiringMinds SOAP Attachements Interop (c# <-> java)
Hello, I have a requirement to implement WebServices Client in C# and WebServices Server in Java(webSphere). The application involves uploading attachments. Preliminary research suggest I use MTOM, but the webSphere app server I am going to be using does not support MTOM. I have to restrict my ideas towards either MIME or DIME. Please suggest best approach with the mentioned constraints...any sample code with the interop(C# <-> Java) would be appreciated. Thanks in advance. Cheers, Sridhar. Thanks Nikhil. I am fine with the .Net end. The issue is on the web Sphere end. My client would not like to use 3rd party libs/jars for MTOM support since its not warrentied by IBM.... I am looking at a solution using either MIME/DIME. Have ...Show All
qjay C# Regular Expressions confusion
Hi everyone, I'm writing a client for the Cyan Chat protocol (http://cho.cyan.com/chat) and all of the usernames are sent to the client as: X[username]|^1Text The X prefixing the username is a colour code. Currently I can print out what users say in my richTextBox, but I need a regular expression to find and locate all usernames between brackets. I have the code to colour the names, I just need a regex to find them. I spent most of yesterday searching for Regex help, and testing it, but nothing that I've tried has seemed to work. I'm hoping someone here will have some expertise with Regular expressions and can tell me how to do this. Thanks in advance, Darryl I'm not a pro with Regex although I use it. ...Show All
Denis Gomes How does the .NET FCL work?
Does the .NET framework function off of Win32 API methods or something Sure, C# and .NET languages use .NET, but how does .NET do what it does Yea, but how does it actually function C++ the language itself doesn't have a webclient class or things like that, how does the webclient class and other .NET classes actually work What is the BCL I googled it btw, there were no relevant results... Thanks. So basically .NET libary uses Win32 library code for the most part Base Class Library - class like FileSystemWatcher, File, Directory - the classes in the .NET Framework classes have been made from scratch using all possible resources available, however C++ connects to the net and so on. Im sure TaylorMichael will ...Show All
Alanu file upload to https server not working
i am sending a file to a https server and i am not getting back the same results as iexplorer is, or the same page. my page has an error that its displays, which is "Error: Cannot find bean: "UploadBean" in any scope" i captured the stream from iexplorer and my app and its the same thing being sent. any ideas here is the file that i am sending using multipart-form content type StringBuilder^ sData = gcnew StringBuilder(); sData->Append("--" + sBoundary); sData->Append("\r\n"); sData->Append("Content-Disposition: form-data; name=\"firstTime\""); sData->Append("\r\n\r\n"); sData->Append("F"); sData->Append("\r\n"); sData->Append("--" + sBoundary); sData->Append("\r\n"); sData->Append("Content-D ...Show All
NetPochi FtpWebRequest - Access to IBM AS/400 FTP Server - 501 Character (/) not allowed in object name.
Hello everybody I'm trying to communicate with an AS/400 FTP Server. As a first try I just execute the WebRequestMethods.Ftp.ListDirectory method, which translates to the NLST FTP command. Doing the same accessing a Microsoft FTP Server or a UNIX FTP Server works fin. This is the code to get the listing: Dim Uri As System.Uri = New System.Uri(listUrl) Dim listRequest As FtpWebRequest = CType (WebRequest.Create(Uri), FtpWebRequest) listRequest.Credentials = New System.Net.NetworkCredential(User, Password)listRequest.Method = WebRequestMethods.Ftp.ListDirectory listRequest.KeepAlive = False listRequest.UseBinary = False listRequest.UsePassive = False Dim listResponse As FtpWebResponse = CType (listRe ...Show All
Jonathan Abbott System.net.mail problem
Hi everyone, I have a little problem using the system.net.mail namespace implemented in the following code: Private Sub Envio_Correo( ByVal ruta As String ) 'Creando la instancia del mensaje Dim correo As new MailMessage correo.From = New MailAddress( "b98123839@usmp.edu.pe" ) correo.To.Add( "amonasiq@usmp.edu.pe" ) correo.Subject = "Archivo de Confirmacion de matricula" correo.Body = "Se adjunto archivo de confirmacion de matricula de su respectiva facultad" correo.IsBodyHtml = False 'correo.Attachments.Add(New Attachment(ruta)) correo.Priority = MailPriority.Normal 'Crando la instancia del SMTP cliente Dim smtp As New SmtpClient smtp.Host = "134.5. ...Show All
priyanka.dash Insert fails due to nulls
I'm getting the following exception when I try to insert new records into a SQL Server Express table. I'm not passing a value for the primary key. I just converted this DB from Access and Access auto-generated the key for me. Will SQL not do this like Access did What's confusing me more is that the code works fine on a version of the db/app running on my local pc using a duplicate of the server db. Can't understand why it would fail on the server but work on my pc. I listed the function being called below as well. Select Command being auto-generated in function: INSERT INTO Carrier (CarrierId, CarrierName) VALUES ( , ) Exception Details: System.Data.OleDb.OleDbException: The statement has been terminated. Cannot insert the value NULL into ...Show All
Reb3lzrr prorgamFilesPath
I'm a bit new to C# So here my problem. I am developing on XP-64bit, there is a 'Program Files' folder and 'Program Files (x86)'. The problem: I had developed this program with a Button on a 32-bit version so it automatically points to 'Program Files' but now that I'm on 64-bit version the program that the Button executes is in 'Program Files (x86)'. Is there any way for the button to search both 'Program Files' folders Hmm, Does every 64 bit machine has both folders side by side Sorry I have never used 64 bit computer :( but hope to do it in coming months :D. Hmm I dont know how to distinguish between to paths upon detecting is it running on 64 bit or 32 bit machine but I think you should get fine re ...Show All
Puybaret jean-claude Cannot Add Web reference
Hi, When ever I try to add the following web reference in my application http://www.messagevista.com/subscribers/gatewayApi.asmx It will be given following Error message The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF Please help....... Regards, Dmp Hi, Thanks everybody, Basically I am getting this error meaasage whenever I try to add any third party Web Reference. I cannot understand what's the problem of my system. Thanks & Regards Dmp Hi I am technical support agent of MessageVista Communication. I ran into your concern on this forum. We have never had such a problem in our .NET applications. Could you please contact us a ...Show All
