Solved

WCF service application - Get computer name

Posted on 2010-08-27
7
794 Views
Last Modified: 2013-11-27
Hi all,

I've just started to write a Web Service application and I'd like to know how can I get (old) servervariables inside my method ?

I'd just want to know the computer name of the client (the IP is ok also) to process with it.

Thx.
Sybux
0
Comment
Question by:Sybux
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 18

Accepted Solution

by:
Anil Golamari earned 500 total points
ID: 33543356
0
 

Author Comment

by:Sybux
ID: 33543428
Thx, in fact, i'm already using the method descibed in your 2nd link but when I call my service from my application, I got this error message :

The server was unable to process the request due to an internal error.  For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.

Do you know how to activate th debug function easyly ?
0
 
LVL 18

Assisted Solution

by:Anil Golamari
Anil Golamari earned 500 total points
ID: 33543564
http://msdn.microsoft.com/en-us/library/ms732023.aspx

You can follow the steps in this link to get the log file and see what is causing the problem in the service
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

Author Comment

by:Sybux
ID: 33544062
I've added this :

     </system.web>
 
    <system.diagnostics>
      <trace autoflush="true" />
      <sources>
        <source name="System.ServiceModel"
                switchValue="Information, ActivityTracing, Error"
                propagateActivity="true">
          <listeners>
            <add name="sdt"
                type="System.Diagnostics.XmlWriterTraceListener"
                initializeData= "mystack.e2e" />
          </listeners>
        </source>
      </sources>
    </system.diagnostics>

but there is no trace file.
0
 

Author Comment

by:Sybux
ID: 33556121
I've found my problem.

I'm using the following code :

HttpContext.Current.Request.ServerVariables("REMOTE_HOST")

to get the remote_host value but HTTPCONTEXT is an empty object. It seems that it's not the good way to do or that I need to initiate it before.
0
 

Author Comment

by:Sybux
ID: 33724204
The question is not answer. So keep it open or close but I don't agree to split answer as it is not !
0

Featured Post

Create CentOS 7 Newton Packstack Running Keystone

A bug was filed against RDO for the installation of Keystone v3. This guide is designed to walk you through the configuration for using Keystone v3 with Packstack. You will accomplish this using various repos and the Answers file.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question