Answer Questions
smithers Socket, detect message boundaries for objects - working code?
Hi, I'm stuck with a problem that is bugging me for days. I'm custom serializing objects and sending them across async TCP sockets. However, I have a problem deserializing messages when the receive is split up in different packet sizes and I just can't figure out how to get it right. The problem is, that all works fine for a couple messages but then the header size is read incorrectly (I'm sending a header for each messages that tells the length ...Show All
Ever BackgroundWorker can it be named?
While trying to solve a VSTO threading issue, I had to identify the threads that were running. When I look at the background worker thread (System.ComponentModel.BackgroundWorker) using this property: System.Threading.Thread.CurrentThread.Name it reports string.empty. My guess is this is a request for the next version...but is there a way to name the background worker thread There is no support for specifying a thread name. Backg ...Show All
mirzahat Server as form - how to call methods on the form etc.
Hi all, I am trying to write a music player (hosted in a winform) that can be controlled using Remoting over TCP/IP from different applications (e.g. asp.net, pocketpc etc.) The problem I have been unable to solve is how to get my remote object (instantiated on server as singlecall) to call methods on the server winform which hosts e.g. the mediaplayer activex control. For example, I want to do soemthing like the following: 1. Cl ...Show All
Rigs78 Validating a Client
Can anyone tell me if it is possible (and if so, how do I do it) for a remote server object to validate that the client making a remote call is a specific application or component I am trying to create a remote server that will provide potentially sensitive information (such as encryption keys) to applications. The application would use the information internally without revealing it to the end user. However, I want to ensure that a ...Show All
Schorschi FtpWebRequest re-sending USER and PASS commands half way through download loop
Well, the title says it all really: I'm using FtpWebRequest to download multiple files as follows: private string GetFile(Uri uri) { string un = Misc.ReadRegKey("ParserFtpUsername"); string pwd = Misc.ReadRegKey("ParserFtpPwd"); string file; NetworkCredential cred = new NetworkCredential(un, pwd); WebProxy pxy = new WebProxy(); pxy.UseDefaultCredentials = true; FtpWebRequest wr = (FtpWebRequest)We ...Show All
Pat Long Delay on first call to web service
As a learning experience, I've written a Windows Forms app which accesses the xmethods StockQuote web service: http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl (I'm using .NET 2.0 and Visual Studio 2005.) The (synchronous) calls to the getQuote method of the service take place in the DoWork handler of a BackgroundWorker. It takes 10 seconds or more for the first call to getQuote to complete; all subsequen ...Show All
Duncan1 Customizing SettingsProvider
There is a custom provider inherited from SettingsProvider. It is specified in the attribute as it's shown in the example (and perhaps to be initialized by reflection). It is a RegistrySettingsProvider, but it is slightly different from the one which has been introduced in msdn. [SettingsProviderAttribute(typeof(MyNamespace.RegistrySettingsProvider))] internal sealed partial class Settings : ApplicationSettingsBase { ...} The dif ...Show All
Interdit Expire Cookie URL in Passport Authentication
Hi, I want to setup passport authentication on my web application. I was able to signin in to the application, but can't sign out. If i click on signout button and again went to default page then i can see sign in button. What is the reason behind this While creating applicaton i have specified Expire cookie URL to some page, but that page doesn't exist in the application. If this is the reason, what cookie deletion code i should write in this ...Show All
BitFlipper MDX + .NET Framework 2.0 + VCS Express Edition + Win XP x64
Hi, For any CS code that uses managed D3D : everytime I try to compile an app. w/VCS Express Edition under the 64-bit edition of Win XP, the app. compiles ok but as soon as it is executed an exception message appears telling that the app. is not a real 32-bit native one. As far as I'm concerned, after installing .NET Framework 2.0 under a x64 OS, both versions -32 bits and 64 bits- are installed on the machine. So, it seems that, by d ...Show All
pharries Multithreading, MsgBox causes an Error
Hello, This has probably come up before but for the life of me I could not find an answer anywhere....I've created a program in Visual Basic .Net 2003 that starts multithreaded sub using system.threading. The function works great until I put in a MsgBox("Test") anywhere in the thread. When I use this one line of code, the thread itself will execute fine and return 0 when it closes, but when I exit the applicati ...Show All
momark Discard changes made to datatable columns of a Dataset?
Hello, I have a windows form with several text boxes. OnLoad, I use a DataAdapter which calls a SQL sproc to retrieve it's info. The sproc returns has 3 select statements so when all is said and done, the dataset ends up with 3 tables. (table, table1 and table2) Next I use databindings.add for each of the textboxes and bind them to the appropriate column in the appropriate tables. The textboxes are readonly by default and I have an Edit ...Show All
Terrence Chan Strange behavior: Data Access .Net 2.0
My AccessDataSource object is returning empty rows. I can't beleive I'm having this problem with such easy code. protected void Page_Load( object sender, EventArgs e) { AccessDataSource ds = new AccessDataSource (); DataList list = new DataList (); ds.SelectCommand = "SELECT * FROM Members" ; ds.DataFile = "~/App_Data/CORE_Members.mdb" ; list.DataSource = ds; list.DataBind(); dynPanel.Controls.Add(ds ...Show All
Yuri de Jager How to get system specs (processor, memory etc...) in C#?
Hello, I would like to know how to find the specs of the current running system such as the memory amount and processor speed in C# Mateusz I don't know if this will help, but it may be a place to start. Try looking for info on the functionality in the System.Management dll. I know this is how you get the processor ID: private string GetProcessorID() { string sCpuInfo = String.Empty; bool bSuccess ...Show All
ScottLogic creating Sockets
Hi buddies, I wonder how easy to create a socket with out connecting to RemoteEndPoint in sockets My idea is to create a “dummy” socket of an existing socket. I wrote code like, System.Net.IPAddress ConnServerIP = IPAddress.Parse(s_myLinOldIP.Substring(0,s_myLinOldIP.IndexOf(":"))); int listenPort = int.Parse(s_myLinOldIP.Substring(s_myLinOldIP.I ...Show All
the_pheniks block connections
I was wondering if there is a way to scan all the connections and block certain IP addys. Ive seen one program that does this in C#. Ive tried messing with socket and a tcplistner and i couldnt get it to work. I would love any advice u guys have to share. well basicly i want a system that any IP address i have on the blocklist no matter what port it will be closed or not allowed to connect so lets say i block g ...Show All
