English 中文(简体)
WCF services and firewalls... Any issues?
原标题:

Simple issue. I m working on a proof-of-concept for an application with additional database connection, so I will create a WCF service to wrap around the database. Multi-user environments will get this service installed on a centralized server with a client application on their local system. These users will automatically have to deal with firewall issues, so this is acceptable.

But the single-user environments will have the service and client application running on a single system. The service host doesn t have a definite shape right now, but it s likely that it will be hosted within the application itself or as a Windows service.

Unfortunately, the client application is a WIN32 Delphi application which needs a simple way to access the service. Preferably, the single-user version should use the same technique to access the server as the multi-user version, which means that it behaves like a SOAP client, with a WSDL imported and converted to Delphi code.

Still not a problem, but I have to consider possible problems that we can encounter in this setup, with the most important issue: possible firewall that closed the connection port.

So, does anyone know about any firewall problems that can occur in this single-user environment?

最佳回答

You haven t mentioned which WCF channel you re using- I ll assume basicHttpBinding. Generally, if your local service is bound to 127.0.0.1 using self-hosting, and the on-box client accesses it that way, you should be fine. No firewalls I m aware of will screw with your loopback adapter. If you bind the service to the machine s IP though, you may subject yourself to firewall fun.

If you have WCF 3.5 available on the client on both ends (sorry, I don t know anything about Delphi), have a go with netNamedPipeBinding.

问题回答

You didn t mention which version of Delphi you use but I once had hard time making Delphi 2005 import a WCF service with basicHttpBinding. As the WSDL is split among many pages, the SOAP import wizard in Delphi wasn t capable of understanding it. I finally ended up writing an ASMX wrapper around the WCF service for Delphi clients.





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签