VS 2010 Stream Not Readable (Sockets)?

Jul 3, 2011

I have a Socket application that, when data is received (on the Server side) and the client is recognized, the data is passed onto its own socket and stream, and the previous socket and stream is discarded.

The data is serialized with a binary formatter before sending and deserialized on receiving the data.

[Code]...

View 8 Replies


ADVERTISEMENT

VS 2008 - Email Attachment Stream (File Not Readable)

Feb 23, 2010

I am trying to pass to a "SendEmail" class that I created an attachment from a stream.Here is my stream from the form:
Private Sub button_Email_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button_Email.Click
Dim myimagestream As MemoryStream = New MemoryStream()
myimage.Save(myimagestream, Drawing.Imaging.ImageFormat.Jpeg)
Dim se As New SendEmail
[Code] .....
All seems to go fine until I get the email and try to open the attachment. The file is not readable but it's not a zero byte file.

View 2 Replies

VS 2010 Make Shoutcast Stream Info Like The Stream Name

May 5, 2011

Im making a desktop player for a online web radio, and for the program I wanna make it show all the stream info. Like the stream name, and such. However I dont know how to do this? I looked everywhere

The server url is setup like this "[URL]" And it has all the stream info and that there. So is there a way I can get the info from there onto like say a label? Live updates btw.

View 1 Replies

Use In VS 2010 (using VB) To Make A Folder Completely Inaccessible (not Even Readable)

Mar 3, 2012

I was wondering which is the function / namespace I need to use in VS 2010 (using VB) to make a folder completely unaccesible (not even readable).

View 1 Replies

VS 2010 Async Sockets Causing UI Update?

Apr 9, 2011

I'm using .BeginConnect with an AsyncCallBack and for some odd reason when I try to add a string to a textbox using the sub below, from a routine within the socket, it just does not work. It's not stating an invoke is required either.Private Delegate Sub DelegateAddText(ByRef theText As String, ByRef AddReturn As Boolean, ByRef AddPrefix As Boolean) Public Sub AddText(ByRef theText As String, ByRef AddReturn As Boolean, ByRef AddPrefix As Boolean)

[Code]...

as a side note which would be more efficient ... Indexing sockets and passing indexes through routines, or spawning classes. I realize spawning may use more memory but is it faster than indexing?

View 2 Replies

Stream Read Return Length 0 While Stream Is Open And Has Valid Data In It?

May 25, 2012

in an winForm app in VS2010 win 7 compiling to x86, I try to do what Alvas.Audio seems to work. See (c# ex: [URL] for reference.

Dim data() As Byte = wr.ReadData(second * i, second)

The result give me data.length()=0. I do not have any exception, I can read format from it and whatever reader I use I got this problem.EDIT : After some tests, it seems like the uncompressed file I create in the first step (in PCM format, with .wav extension) can not be recognized by the Alvas.audio library for the second step. I must miss something around Audio file markups or something alike.

Here is the code that might be the source (basically this is step 1):

Dim functOut As String = String.Empty
Dim wr As Alvas.Audio.IAudioReader = Nothing
Dim fs As IO.FileStream = Nothing

[code]....

How can I write the resulted stream to be sure I can read it again later?

View 1 Replies

VS 2010 Socket Using FTP Stream?

Jan 29, 2012

I am successfuly connecting to an FTP server and have no problems with uploading / downloading files and initiating general file transfers. However, when attempting to list the directory I get a strange exception and it seemed to just start happening of its own accord.

Cannot access a disposed object. Object name: 'System.Net.Sockets.NetworkStream'. This is confusing! I am certainly not manually disposing any of the connection of stream reader objects, nor am I disposing anything else in this entire sub routine. On setting breakpoints, it seems that the array list is filled correctly but then the error fires when the status code is 226 despite me clearly specifying that the while loop should not run under these circumstances. (226 is equal to FtpStatusCode.ClosingData)

View 6 Replies

VS 2010 Stream Video Over Lan?

May 22, 2011

I'm trying to find source code for vb.net(2010). i want to stream video file (picture and sound) from my computer(server) over lan to another computer(client). on the server side i open the video into "Windows media player controller". how i stream the picture and sound over lan network?

View 1 Replies

VS 2010 : Get A Memory Stream To A Textbox

Dec 15, 2011

im trying to get a memory stream to a textbox, the memory stream is of a .txt or .ini file that is extracted from a archive to a memory stream.Heres what ive got so far:

vb
Dim MSData As New System.IO.MemoryStream() Dim Infile As String = ComboBox10.SelectedValue 'The input archive Dim passww As String = TextBox1.Text 'Archive password Using extr As New SevenZipExtractor(Infile, passww) extr.ExtractFile("02.ini", MSData) End Using Dim sr As StreamReader = New StreamReader(MSData) Dim textSsS As String = sr.ReadToEnd() ini02.Text = textSsS

The problem is that ini02.text stays blank?

View 2 Replies

VS 2010 Capturing Rtmp Stream?

Jan 28, 2012

I am trying to capture a stream from a website into my vb.net application. I was able to do it before, but the site is now updated and I cannot play the file again!!!ere is the link:I tried using several methods. looked at the source, flash capture programs, even fiddler to check the requests, but it didn't work at all

View 1 Replies

VS 2010 Converting An Image To Stream?

Jun 23, 2010

How would I go about doing this? I plan to send the image over a network.

View 3 Replies

VS 2010 Force STREAM To Read

Mar 16, 2012

I was taking code called from an event and making a function of it

Public Function asyncPostMS(prefixes() As String, ms As MemoryStream) As Stream
Dim request As WebRequest = WebRequest.Create(prefixes(0))
request.Method = "POST"

[Code]....

Now when I call this using the new function the stream is already closed. How do I pass out a stream object from a function as an already "read" object.

Or do I need to create the stream outside the function?

View 5 Replies

VS 2010 Chart Control In Memory Stream?

Mar 29, 2011

is this possible to do in memory (so i can get rid of any disk IO)?:

If File.Exists("c:MyImage.png") Then
File.Delete("c:MyImage.png")
End If

[Code]....

This above code works great the first time then errors out on any successive attempts after that with the file being used by another process at the File.Delete line. The image is being generated for use as a mail attachment and i've only ever done it via a phyical file on the disk.

View 1 Replies

VS 2010 Encrypting A Serialized Object Or Stream?

Mar 7, 2011

Basically, I need to transmit data across a network from point A to point B using a Binary Serialization System. I'm doing this to make sure that the system can't have outside listeners read the data being sent easily and to keep results secure and confidential.What is an easy way that I can encrypt, say, a generic object? Would it be easiest to serialize it to file, read the bytes in, encrypt the bytes, then store the bytes in a serialized structure and send that across the stream and reverse the process?

Private Function EncryptClass(ByVal obj As Object) As Byte()
Dim key() As Byte = {52, 15, 85, 150,
45, 12, 78, 120,

[code].....

View 6 Replies

VS 2010 Listbox Stream Client Server

Mar 11, 2012

I created a dll for my host and client, but but does not work! where's the error?

[Code]....

View 4 Replies

VS 2010 Memory Stream Serialisation And Networkstreams?

Jul 28, 2011

Ok I have written this little Class that accepts a tcpclient as part of its constructor.

[Code]...

View 1 Replies

C# - .NET Make Xml More Readable?

Feb 26, 2009

Is there any way to take an xml string in .net and make it easyer to read? what i mean is can i convert this:

[Code]...

is there any built in class for this? as sql server 2005 seems to remove all formatting on xml to save space or some thing...

View 4 Replies

VS 2010 HTTPListener Of Large Memory Stream Vs File I/o

Feb 24, 2012

I have a user interface app that allows you to drag/drop in files - and it turns them into HttpListener request POST's to another EXECUTABLE that I have running - let's call it BACKEND1. BACKEND1 will be running on a SERVER when this gets ready for production use. Lots and lots of users running the UI - all dragging in files - all getting POST'ed to BACKEND1 - with the file included as a memory stream in the POST. BACKEND1 responds to the UI with a "sequential" file number assigned to the file centrally on the server.

On the SERVER is also running another EXECUTABLE - let's call it BACKEND2. It's job is to work with the DRAG'd in files. Both BACKEND1 and BACKEND2 sit on the same SERVER. At the moment I am writing the memory stream to DISK in BACKEND1 - and POSTing the FILENAME to BACKEND2 for it to work on. Would it be better to not write the file in BACKEND1 but instead include it in the POST to BACKEND2 - where it can be written to DISK? Is having LARGE HTTP REQUEST's a burden when sent between two EXECUTABLES on the same machine?

My primary goal is to have a really available BACKEND1 talking the the UI instances running out in the world. I'm concerned that doing the file i/o in BACKEND1 is "expensive" - and I don't care about the performance of BACKEND2 as much. just looking for opinions. I guess ultimately I'll have to bench mark this myself in a production environment to get a real answer.

View 1 Replies

VS 2010 Truncate Charachters HEX Data Stream (Serial)?

Sep 4, 2010

The RX data from the serial port is as follows:

FE FE FA E0 00 23 45 FD

I need to truncate everything else and just have positions 5, 6 and 7 output in the hex in a TEXTBOX. See below:

452300

Instead it will put the the whole steam in the textbox and it will be in decimal format, not hex.

View 3 Replies

Export .dat To Xml Or Readable File With Help Of .fmt

Feb 15, 2011

I downloaded a database from url... it was a zip archive. Anyway my question is, there are two files: virussignatures.dat and virussignatures.fmt. I've heard that I should extract the database as SQL by using BCP. The contents of virussignatures.fmt is: [code] I want to turn the virus signatures.dat to an XML or an understandable TXT.

View 1 Replies

Variable Readable From All Forms?

Feb 7, 2010

Variable readable from all forms?

View 14 Replies

VS 2010 HTTPListener Of Large Memory Stream Versus File I/o?

Sep 28, 2010

I have a user interface app that allows you to drag/drop in files - and it turns them into HttpListener request POST's to another EXECUTABLE that I have running - let's call it BACKEND1.BACKEND1 will be running on a SERVER when this gets ready for production use.Lots and lots of users running the UI - all dragging in files - all getting POST'ed to BACKEND1 - with the file included as a memory stream in the POST. BACKEND1 responds to the UI with a "sequential" file number assigned to the file centrally on the server.

On the SERVER is also running another EXECUTABLE - let's call it BACKEND2. It's job is to work with the DRAG'd in files.Both BACKEND1 and BACKEND2 sit on the same SERVER. At the moment I am writing the memory stream to DISK in BACKEND1 - and POSTing the FILENAME to BACKEND2 for it to work on.Would it be better to not write the file in BACKEND1 but instead include it in the POST to BACKEND2 - where it can be written to DISK?

Is having LARGE HTTP REQUEST's a burden when sent between two EXECUTABLES on the same machine?My primary goal is to have a really available BACKEND1 talking the the UI instances running out in the world. I'm concerned that doing the file i/o in BACKEND1 is "expensive" - and I don't care about the performance of BACKEND2 as much.

View 2 Replies

VS 2010 When The Client Closes Sockets The Server Closes As Well

Apr 9, 2012

I have a small problem with sockets (I'm new to sockets). Below is the code I'm using. The problem is that when the client closes, the server closes aswell. How do I stop it from doing that?

[Code]...

View 1 Replies

C# - Convert ASN.1 To Human-readable Format

Aug 9, 2010

I have ASN.1 format files. I have to convert into CSV(comma separated) format also readable one. Tell me the shortest way... Like Decoders etc.

View 1 Replies

Convert Bytes To Readable Text??

Jul 25, 2009

Is There Any Possible Way To Convert Bytes To Readable text?

View 6 Replies

Converting The Bytes() To A Readable Text?

Oct 6, 2010

I am having trouble converting the Bytes() to a readable text.

I will be receiving packets from a UDP Connection, but due to lack of connectivity issues, they have provided me a .mem file that i am assuming is the whole stream of the packet.

So for now, i am trying to read the file and i get a collection of bytes(). but i cannot convert it to readable text.

View 39 Replies

Decode The Reg_binary To Readable Ascii?

Jan 2, 2010

i have been working on VS 2008 for past 6 months and right now i am working on some little project which requires the value in reg_binary in XP to be decoded to readable string of the original form

View 2 Replies

VS 02 / 03 - Encrypted String Is Not Readable By The User

Sep 7, 2010

i came up to create my own because i need to encrypt 10character string and i want it to output also 10character string..security is not my concerned here..what i want is encrypted string is not readable by the user or is not obvious to user.. is this possible by the use of Xor method?..BTW,its better if the output is alphanumeric.

View 3 Replies

VS 2008 - Readable Date And Time

Oct 28, 2010

How do I turn this:

20101028094024.500000+060

into a readable date and time.

View 4 Replies

Crypto Stream To Memory Stream?

Nov 22, 2011

I have a problem with the cryptostream, if i write the stream to a memorystream the memory that the stream used is still alocated and i have no way of unalocating it.what am i missingdoing wrong? im using-using on the streams,readers and crypto stuffs so the framework should shut them all down right? i tryed calling .close and .dispose but nothing ,in fact i moved it all over I have provided the sub that im using for the encrytion im in .net 4.5 so there is a lil async stuff but i know thats not the problem coz i moved this code out of my main app(.net 4) for testing to see if i could fix the problem.[code...]

View 12 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved