Sybux
asked on
WCF service application - Get computer name
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.X mlWriterTr aceListene r"
initializeData= "mystack.e2e" />
</listeners>
</source>
</sources>
</system.diagnostics>
but there is no trace file.
</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.X
initializeData= "mystack.e2e" />
</listeners>
</source>
</sources>
</system.diagnostics>
but there is no trace file.
ASKER
I've found my problem.
I'm using the following code :
HttpContext.Current.Reques t.ServerVa riables("R EMOTE_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.
I'm using the following code :
HttpContext.Current.Reques
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.
ASKER
The question is not answer. So keep it open or close but I don't agree to split answer as it is not !
ASKER
The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFa
Do you know how to activate th debug function easyly ?