Problem to obtain client IP on web service

One server with Windows 2003, hosting the web service using .Net Framework 2.0, with IP 10.0.2.50 and host name ServerTransaction.Other server with Windows 2003, hosting a web application using .Net Framework 2.0, that consuming the web service on ServerTransaction, with IP 10.0.2.51 and host name ServerApplication.Many other computers on the local network (IPs: 10.0.2.80, 10.0.2.81, 10.0.2.82, ...) acessing the web application on ServerApplication.

On the code of the web service I've tried to use HttpContext.Current.Request.UserHostAddress or HttpContext.Current.Request.ServerVariables("REMOTE_ADDR") or HttpContext.Current.Request.ServerVariables("HTTP_X_FORWARDED_FORR"), but always I can only get the IP of ServerApplication (10.0.2.51).

More Related Resource Links

Hi,I have hosted a wcf service over IIS with Windows Authentication. All the users are able to access the WCF service Url from their machine. The problem is that some of the user are able to consume the webservice method while few of them when try to consume the service ,the error is thrown connection - reset error.I have tried to go through the IIS log also but it did'nt helped.Can any one help me regarding this. What settings I need to check/change to solve the proble.Thanks,AKB

I have deployed a WCF duplex service on IIS7 that gets the client's IP address and based on that if the IP address repeats, the client is not given access to service. The problem is that when I deploy it on IIS7 and try to access it from another PC on LAN,
it identifies the new PC having the same IP address as the one that the service is deployed in(just for testing purpose, I am returning the retrieved IP address to client), and So, I am not able to access the service from another PC.

I've created WCF durable service (service class marked as DurableService) with SQL persistent provider. The client invokes the service method marked as DurableOperation(CanCreateInstance:=True), after this - service successfully creates
entry in the InstanceData table in sql database. Inside the service I can access the token id by using

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Configuration;
using System.Data.SqlClient;
using System.Data;
/// <summary>
/// Summary description for GetCurrentReportVersion
/// </summary>
[WebService(Namespace = "http://localhost/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, u

Smart client applications are responsive and promote interactivity with the user. In this article, we continue building a smart client application using NHibernate for data access and Rhino Service Bus for reliable communication with the server.

Smart client applications are responsive and promote interactivity with the user. In this article, we start the processes of planning and building a smart client application using NHibernate for data access and Rhino Service Bus for reliable communication with the server.

Does anyone know of a C# code sample demonstrating WCF REST services and console test client with OperationContracts (GET and POST) implementing mutiple paramaters using BASIC authentication? Also, perhaps, using Fiddler as a test client as well? I have searched high and low for something like this, but have not had any success.

I have a web service that is accessed by a windows forms application and receives updates like facility name, address, image etc. Everything works fine except the image data is not being passed to the windows app. I am saving the images in database on both sides, so when I pull it from the server I use the following code

if (!reader.IsDBNull(floorPlanOrdinal))

facility.FloorPlan = (

byte[])reader["FloorPlan"];

I can see the facility.FloorPlan Dimentions as 103840 when I debug this method which means that the data is pulled from the database fine.

On the forms side though the dimentions become 0, all other values pass fine except this. Here is the facility property in the web service on server side.

Hello,
i am trying to connect sql server 2005 express using c#.net 3.5.
my connection string is
"Server=.\SQLExpress;AttachDbFilename=C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\db_naren.mdf;Database=db_naren; Trusted_Connection=Yes;"
this is working fine when i am connecting to sql server from the local machine.
When i am trying to connect from someother machine to server it is giving error like
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
i added previliges in add new administrator on SQL Server 2005 Surface Area Configuration . and i made changes on
SQL Server 2005 Surface Area Configuration page, on
Database Engine --> Remote Connections -->Local and remote connections -->
Using both TCP/IP and named pipelines.
still same error i am getting from client machine i am using connection string as
"Server=MyServer\SQLExpress;AttachDbFilename=C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\db_naren.mdf;Database=db_nare; Trusted_Connection=Yes;"
is there any thing i need to do to connect from client machine to server?please

Hi,
I have consumed an external webservice in my client application using WCF. And every thing works great in my Dev box(XP with IIS5.1)
But when the same application is moved to Prod server(Win Server 2003 with IIS6.0) it fails. Below is the exception caught:
There was no endpoint listening at http://MyExternalWebServiceUrlWithSessionId could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
And the InnerException is: Unable to connect to the remote server
My Config file has the below settings:<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="Default_Binding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCoun

I have a .net client that consumes an operation on a java based web service that appears to work accept for an issue with passing Boolean values back to the service in the soap
message. Any member of the complex type that are defined as Boolean in the service contract will not be present in the soap message generated from the client even though they are set in the code.
Sample Client Code:
UpdateChecklistItemStatusPortTypeClient
proxy =
new
UpdateChecklistItemStatusPortTypeClient();
updateChecklistItemStatusReq
request = new
updateChecklistItemStatusReq();
request.ouid =
"P000122112";
request.applicationId =
"00000032";
request.adminFunction =
"ADMA";
request.checklistItemTypeCode =
"UHSTRN";
request.ceebCode =
"052046";
request.transcriptTerm =
"FINAL";
request.transcriptScores =
true;
updateChecklistItemStatusRsp
response = new
updateChecklistItemStatusRsp();
response = proxy.UpdateChecklistItemStatusOp(request);
Client Soap Message Generated:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

Hi all, I was wondering what is the best way to detect client disconnect in the middle of an async web service call.
I'm asusming that if a client disconnects while the server is still processing the async web method call, an exception will be thrown. First, I wonder if someone can confirm that this is the right assumption.
If that's the case, then I was wondering where should I set up the SEH block to catch this exception. My gut tells me to set up the SEH block in side the delegate funciton, but I might be wrong. Also, what kind of an exception would I be getting if the client disconnects?
Finally, if the SEH is set up in the delegate, what happens if a client disconnects in the tiny window before or after the delegate gets called?
If someone can shed some light here I'd really appreciate it!
Thanks,
- K.