View Complete Post
I'm having problems to obtain the client IP on web service. Here's my scenario:
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).
Any idea or tip?
Thanks and sorry for my bad english.
We have a process that loads multiple dll assemblies each of which contains multiple service interfaces hosted by one or more actual services. Some of our components need to be able to call other services internally. Of course I do
not want the overhead of marshalling / opening a channel / etc.
Since services can be singletons or created each time, I am trying to find a way to get the service or interface through the wcf architecture that handles this.
Does anyone know of a way?
I got a WCF service hosted inside the SharePoint 2010 following this article http://answers.oreilly.com/topic/1404-how-to-customize-wcf-services-in-sharepoint-2010/
Everything was going great until I wanted to increase the MaxReceivedMessageSize however there is no configuration file for this service.
I tried to add a configuration file to be deployed along with the svc service in the same directory inside the ISAPI mapped folder but I get this error:
The service '/_vti_bin/epcc/messagesarchive/contactssearcher.svc' cannot be activated due to an exception during compilation. The exception message is: Could not find a base address that matches scheme http for the endpoint with binding BasicHttpBinding.
Registered base address schemes are ..
Here is my configuration,
<service name="WCFServices.ContactsSearcher.ContactsSearcher" behaviorConfiguration="ContactsSearcherBehavior">
Recently, I tried to get my Web Service class to inherit from a custom base class that inherits from System.Web.Services.WebMethod instead of the System.Web.Services.WebMethod directly.
However, I've been getting Error 500.
Public Class Service1 Inherits BaseClass <System.Web.Services.WebMethod()> _ Public Function GetSessionID() As String GetSessionID = Me.Session.SessionID End FunctionEnd Class
public class BaseClass Inherits System.Web.Services.WebService public property Property1 as string public property Property2 as stringEnd Class
Please kindly assist.
Thank you in advance.
Convert WSDL file to asmx
I have got wsdl file and
based on wsdl I am trying to create asmx
Wsdl file holding some credential
user id and password it is working fine when I used SOAP UI tools
In same manner when I am creating web method like bellow given scarch code
public string getHierarchy()
Service serviceProxy = new
UsernameToken userToken = new
//SoapContext requestContext =
smartForms objSmartForms = new smartForms();//Object of
objSmartForms.getHierarchy("TLANTIC",out strRegion);//invoking Method
I have a question which might be a beginner's question in .Net.
I have a webservice whose webmethod has to call a window's service and get
back the results.
What is the best way to implement this scenario.
I am adding reference to this windows service as an exe and i could not figure out a
way call its methods from webservice.
Please help me with a speedy reply
Thanks in advance