473,890 Members | 5,876 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# WinService Or Web Service OR Remoting to Socket Client

3 New Member
Its been a month and a half now. I have tried to get my WSSF web service to reference a class library that IS a Socket Client. The Socket Client in question runs fine when called by a testing exe. But when a web service tries to use it or a windows service or even if I try to "remote it up" in a windows service to a remoting client I get nothing..It just doesnt connect. Once again the socket client is fine(OK honestly theres a problem iterating [reading] large files [the connection closes on the second time trying to read in the file] but thats another problem).
I suppose, unless someone is kind enough to point me in the right direction to get this to work.. I'm just looking to confirm that the desired goal is a feasible design. Web service references a class library which just happens to be a socket client. Its just passing in some XML request... the socket turns that into bytes and does its little dance and returns ta-da xml. Which in the WSSF we "would have' turned into the response object and returned to the client. As afore cited were now down to bare bones of pushing the request xml into a SQL table and having a windows service on the server "look for' that row and pass it to the (referenced) socket client. Suprise suprise that doesn't even work. We tried having the web service do a "Process.st art. on an Exe that runs the socket client to no avail.! RIGHT now I'm about to try that scenario (Call an Exe that references the Socket Client) for the SQL Server/Windows Service HACK that didn't work last night .. I've done some complex stuff in trying to get this to work. Missed out on the details of the WSSF that another developer completed as I worked on the REAL Mechanics of this and its still not working. Making us both look like crap....Is it sounding like network settings or application security to anyone else besides me.?. I'm not a network guy...
Nov 30 '07 #1
3 2096
ChristianProgrammer
3 New Member
H E L P Please any advise is greatly appreciated !!!
Nov 30 '07 #2
Plater
7,872 Recognized Expert Expert
Are you being blocked by any firewall or domain services?

I don't see why what you're doing wouldn't work. It seems rather reasonable.

You make an http request to a service, it looks up in the SQL table for the request, and then returns the corrosponding xml data.
Sounds like a fairly decent way to do things?
Nov 30 '07 #3
ChristianProgrammer
3 New Member
I killed your response in THIS Response I hate the way these things re attach the previous reply...Anyway. ..I discovered that after removing the looping and calls to the app.config file AND by placing the actual Socket work in a method IN the WEB service that I could get it all to work. Web Service,,,Windo ws service even the last option of using SQL to look up the response/request style of accomplishing the goal.

So...something about having loops in the socket portion confused the Web Service and the other methods of invoking the socket client. I planned to loop on one socket three times when it failed and pop over to another socket if I had to. To accomplish the "Fail Safe" I had to do something similiar by trying socket method "A" three times and if it failed three times try the second socket "B". So I now have TWO socket methods in the Web Service. Again ANY loops of calls to the app.config file in one of these socket methods kills everything and the socket wont connect. Its an ugly hack but I got it to work. Thanks for the reply...Strange I didn't get an email when your reply was created....

I'm tempted to see if a Web service can just call the socket client as a class library with no looping or tricks in the socket class library, but I just want this done at this point....
Dec 19 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
1371
by: Vincent Finn | last post by:
Hi, I have a Windows service written in C# I want to access it from a C# app (or a C++ app for that matter) How can I do this? I tried referencing it but it fails telling me the it's not a valid Assembly or ActiveX (i.e. not a dll) I can't create an interop dll because that is disabled for services
2
7283
by: Fadi | last post by:
Backround: I am trying to figure out how to do the equivalant of a classic COM Local Server Singleton in .NET/C#. I created a coupld of simple Class Libs that exposes public interfaces and hosted them in a Windows Forms EXE. Create a Windows Forms client and both the Client and the Host EXEs configure the remoting protocols through respective .config files. Problem: I want to change the host from an Win Forms EXE to a Windows Service.
9
8680
by: Michael Lindsey | last post by:
I need to write a server app to send images to client GUIs that are outside of the server's domain. The client will have the file system path to the image but can not access the file system. I am trying to decide if I should use remoting vs. writing a server that uses networkstreams. I have read that networkstreams\tcp programming should be faster than remoting and is a better choice for what I am doing but that it is difficult to code.
8
1310
by: Grant Schenck | last post by:
Hello, I'm pretty new to C# and .NET. I've been tasked with creating an Internet Explorer toolbar. I implemented it and it works OK, however, because the toolbar has a notion of having to log into an account and do other time consuming initialization, the result is that IE takes around 5 seconds to start each time a browser window is opened.
3
2505
by: Fredric Ragnar | last post by:
Hi, I am making a prototype system with Remoting in the bottom of the system. An XML Web Service is using the remote object on an IIS to present data. I am using a TcpChannel for communicating between the XML Web Service and the host for the remote object. Within the host a port is defined and the channel registered. It starts listening for requests. The destination port is therefore clearly defined.
9
6030
by: Rotzooi | last post by:
Hi, I have a VB.NET Service application that's running fine under the Local System account. But for configuration purposes I don't want to be dependent on modifying the registry manually or using an seperate application (like I do now). I want to implement a system tray icon when someone logs on to the console. I've tried several samples but I can't get the icon to the system tray. I know there are some issues because the logged on...
8
1198
by: pigeonrandle | last post by:
Hi, I am writing a server application and would like to know what you experts think i should write it as. I would like (ie need) it to have a visual interface, hence the question, "Should i write it as a service and then provide another program that displays information on what's going on", or, "should i simply write it as a multi-threaded asynchronous socket beast GUI"?! I like the second option (mainly because it will involve less...
0
3406
by: Kristian Reukauff | last post by:
Hi I have a problem with the .Net-Securty-Functions. I've got a client and a server. When I try to register a channel at the server with this line: ChannelServices.RegisterChannel(chan, false); I get the following error - doesn't matter if I try it local from my machine or from a remote machine. (After the Errormessage is more text ;))
2
4417
by: senglory | last post by:
My WCF: public interface IWorkbookService { DataTable GetDownpayments(KeyValuePair<int, string> sgm); } class WorkbookService : IWorkbookService
0
9979
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
9823
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11234
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10463
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7170
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5854
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6049
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4681
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4275
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.