开发者

Identify server that made call to web service

I am working within an intranet environment. We have both a production and development sharepoint server (WSS 3).

We have a 3rd party workflow 开发者_StackOverflow社区product which runs on top of sharepoint. It is installed on both the production and development sharepoint servers. The workflow product can call web services I have written which are hosted on our web server.

How would I have the web services determine which sharepoint server made the call to the web service, be it the production or development server?

I would then use this information to retrieve server specific information from web.config or database etc.

Currently the site hosting web services is setup to allow anonymous access so code such as

System.Web.HttpContext.Current.User.Identity.Name;

returns an empty string. If windows authenticaion is used it returns the identity of the currently logged in user, which is no use in identifying the server the call was made from.

I need a push in the right direction to address what I believe is probably a common scenario please.


Try System.Web.HttpContext.Current.Request.UserHostName

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜