I have a wcf service running on LAN server, use tcp/ip mode. Now I need to get every client info when the client send request connect the wcf service. Because it's all on LAN. I just need get the client MAC, IP , PC name. Is there any way to get these info ? thanks.
How Get Client IP. MAC. PC name use wcf4 (tcp/ip mode)
1.8k views Asked by qakmak At
2
There are 2 answers
0
Christos
On
You could try something like this:
var properties = OperationContext.Current.IncomingMessageProperties;
var endpointProperty = properties[RemoteEndpointMessageProperty.Name] as RemoteEndpointMessageProperty;
if (endpointProperty != null)
{
var ip = endpointProperty.Address;
}
For more information about OperationContext class, please have a look here.
Related Questions in C#
- How to call a C language function from x86 assembly code?
- What does: "char *argv[]" mean?
- User input sanitization program, which takes a specific amount of arguments and passes the execution to a bash script
- How to crop a BMP image in half using C
- How can I get the difference in minutes between two dates and hours?
- Why will this code compile although it defines two variables with the same name?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Why can't I use the file pointer after the first read attempt fails?
- #include Header files in C with definition too
- OpenCV2 on CLion
- What is causing the store latency in this program?
- How to refer to the filepath of test data in test sourcecode?
- 9 Digit Addresses in Hexadecimal System in MacOS
- My server TCP doesn't receive messages from the client in C
- Printing the characters obtained from the array s using printf?
Related Questions in WCF
- Migrate ASMX web method to WCF which accepts string array
- Handling WCF enums when client and server have different versions of enum
- Objective tools for monitoring WCF APIs for latency, failures, and breakdowns?
- ASP.NET Core Web api + WCF
- WCF Authentification Android App - Maui WCF Webservice Basic
- WCF to WCFCore - Help Menu
- Problem with hashtag (#) character in httpclient and WCF
- How to add REST API to a .NET Framework Solution with existing WCF Services?
- How to run WCF service in VSCODE
- Adding HTTP Headers using MessageInspector in WCF (VB.NET) Not Working
- The data returned by the WCF service contains special characters, causing an error when the client attempts to receive it!"
- How to configure rest api’s in WCF project , making it hybrid solution
- WCF + PostgresQL. Npqsql connection is not open
- CORS Error that is not fixed with usual solution
- .NET project hosted on IIS is timing out in 5 minutes but works fine on localhost
Related Questions in .NET-4.0
- How to establish 1:1 relationship with 2 composite keys in EF6 (not core)
- Windows Forms cloning buttons/forms keeps cloning many times
- Containerize a .net framework 4.5.1 mvc template app give error on permissions
- Changing .NET runtime at runtime
- Where does System.Security.Cryptography.RijndaelManaged..ctor() call come from (HASP-wrapped DLL)?
- Code analysis only shows CSxxx and IDExxx notes I see no CAxxx messages
- Local Reports in Visual Studio 2022
- Update Telerik.DataAccess.Core 2015.1.225.1 Assemblies to most recent nuget package
- Ps command not running under windows service
- NET Framework 4.0 breaks Com Interop - vb6 calling c# dll failing when changing target framework from 3.5 to 4.0 or higher
- Why is IHttpHandler's ProcessRequest method not getting the original URL in the context in .NET Framework?
- Sending email via Outlook365 from VB6/VB.net 4.0 application
- iTextSharp not protecting PDF with password
- System.IO.FileNotFoundException: Unable to load file or assembly Microsoft.SqlServer.Management.SqlParser
- Extract ECDSA non-exportable private key from x509 certificate
Related Questions in WCF-4
- Retry logic with multiple methods
- ASP.NET ExecutionTimeout no effect on IIS-hosted WCF service
- How to use Throttling and Fault Contract in WCF?
- Change <SOAPAction>""</SOAPAction> on request recieved in WCF
- How Get Client IP. MAC. PC name use wcf4 (tcp/ip mode)
- MSMQ + WCF - Immediately Move Messages to the Dead-Letter Queue
- Failed to launch application "WcfTestClient.exe"
- wcf fault exception not throwing/being caught properly
- Firing event in WCF (4.5) host
- WCF Duplex communication with InterSystems
- WCF Service Publishing and Fileless Activation : still create a .svc file
- WCF service with multiple webHttpBinding bindings fails in visual studio test client
- What are the possible cause for EndpointNotFoundException?
- WCF Common Parameters ClientMessageInspector, DispatchMessageInspector or alternative?
- Can I have a WCF application that has two endpoints. One with Windows Security and one without?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
http://msdn.microsoft.com/en-us/library/system.environment.machinename(v=vs.110).aspx for computer name
Get public/external IP address? for ip address
Reliable method to get machine's MAC address in C# for MAC
Please consider googleing before posting a question, I found these answers in 2 minutes.