Showing posts with label address. Show all posts
Showing posts with label address. Show all posts

Saturday, March 31, 2012

Web Server IP

Is there a simple way to obtain the IIS Server IP address (not the clients
using) with C# in ASP.NET? Our web servers are simple with only one IP. In
Classic ASP there was a one liner that would give it to you in a string
format...."Michael @. SGMS" <MichaelSGMS@.discussions.microsoft.comwrote in message
news:0E5480A1-7EF2-4838-9A32-E18E984A1231@.microsoft.com...

Quote:

Originally Posted by

Is there a simple way to obtain the IIS Server IP address (not the clients
using) with C# in ASP.NET? Our web servers are simple with only one IP.
In
Classic ASP there was a one liner that would give it to you in a string
format....


HttpContext.Current.Request.ServerVariables["LOCAL_ADDR"].ToString();

Monday, March 26, 2012

Web service address is changed

Hi,
I had a web server contained a web service.
We had to change the web server computer; so all client proxies must point
to new web server. My understanding is we have to compile all client
applications again.
We will probably change the address of web server in future again.
Is there any way that client applications programatically change the address
of web service in the proxy? I am thinking to have the address in
app.config, so we don't have to compile all client application any time that
we change the address of web server.
Thanks,
AlanHi Alan:
In the Solution Explorer window, highlight the reference to the web
service under the Web References node, then view the properties.
Change the URL Behavior property from Static to Dynamic.
The web service proxy will now read the URL from web.config. Looking
in web.config you should see the IDE made an entry looking like:
<add key="WebApp.localhost.Service1"
value=http://server/WebService/Service1.asmx
/>
Now you can change the endpoint without a recompile.
HTH,
Scott
http://www.OdeToCode.com/blogs/scott/
On Mon, 8 Nov 2004 23:46:18 -0500, "A.M" <nospam1@.online.nospam>
wrote:

>Hi,
>
>I had a web server contained a web service.
>We had to change the web server computer; so all client proxies must point
>to new web server. My understanding is we have to compile all client
>applications again.
>We will probably change the address of web server in future again.
>
>Is there any way that client applications programatically change the addres
s
>of web service in the proxy? I am thinking to have the address in
>app.config, so we don't have to compile all client application any time tha
t
>we change the address of web server.
>
>Thanks,
>Alan
>
>
Thanks for Scott's suggestion.
Hi Alan,
As Scott has mentioned, we can dynamically change the webservice's client
proxy class's target url(asmx file's url). We can dig into the client proxy
class(WSDL.EXE generate for us)'s code, you'll find the class is something
like:
public class MyService :
System.Web.Services.Protocols.SoapHttpClientProtocol {
/// <remarks/>
public MyService() {
this.Url = "http://sha-schang-01/myservice/myservice.asmx";
}
.....
And the "Url" property is just the one we need to update when the
webservice's deployment server changed.
Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Web service address is changed

Hi,

I had a web server contained a web service.

We had to change the web server computer; so all client proxies must point
to new web server. My understanding is we have to compile all client
applications again.

We will probably change the address of web server in future again.

Is there any way that client applications programatically change the address
of web service in the proxy? I am thinking to have the address in
app.config, so we don't have to compile all client application any time that
we change the address of web server.

Thanks,

AlanHi Alan:

In the Solution Explorer window, highlight the reference to the web
service under the Web References node, then view the properties.
Change the URL Behavior property from Static to Dynamic.

The web service proxy will now read the URL from web.config. Looking
in web.config you should see the IDE made an entry looking like:

<add key="WebApp.localhost.Service1"
value=http://server/WebService/Service1.asmx
/
Now you can change the endpoint without a recompile.

HTH,

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Mon, 8 Nov 2004 23:46:18 -0500, "A.M" <nospam1@.online.nospam>
wrote:

>Hi,
>
>I had a web server contained a web service.
>We had to change the web server computer; so all client proxies must point
>to new web server. My understanding is we have to compile all client
>applications again.
>We will probably change the address of web server in future again.
>
>Is there any way that client applications programatically change the address
>of web service in the proxy? I am thinking to have the address in
>app.config, so we don't have to compile all client application any time that
>we change the address of web server.
>
>Thanks,
>Alan
Thanks for Scott's suggestion.

Hi Alan,

As Scott has mentioned, we can dynamically change the webservice's client
proxy class's target url(asmx file's url). We can dig into the client proxy
class(WSDL.EXE generate for us)'s code, you'll find the class is something
like:

public class MyService :
System.Web.Services.Protocols.SoapHttpClientProtoc ol {

/// <remarks/>
public MyService() {
this.Url = "http://sha-schang-01/myservice/myservice.asmx";
}
......

And the "Url" property is just the one we need to update when the
webservice's deployment server changed.

Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Web service for IP address to Geographic location.

Hi
Does anyone know a Web service for IP address to Geographic location
resolution?

Thanks

P.S. I am in the UK, but I assume any good web service would be worldwide??Paul,
You can try this from VE:

http://www.eggheadcafe.com/articles/20051109.asp (near the bottom).

the url to the actual locator call is:

http://local.live.com/WiFiIPService/locate.ashx

If that returns you a location script over there on the other side of the
Pond,
then you are good to go.

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com

"Paul Aspinall" wrote:

> Hi
> Does anyone know a Web service for IP address to Geographic location
> resolution?
> Thanks
> P.S. I am in the UK, but I assume any good web service would be worldwide??
>

Web service for IP address to Geographic location

Hi
Does anyone know a Web service for IP address to Geographic location
resolution?
Thanks
P.S. I am in the UK, but I assume any good web service would be worldwide'Paul,
Have you checked this one
http://www.xmlwebservices.cc/index_Samples.htm
Regards - Octavio
"Paul Aspinall" <paul@.aspy.co.uk> escribi en el mensaje
news:jboPf.128660$YJ4.65100@.fe2.news.blueyonder.co.uk...
> Hi
> Does anyone know a Web service for IP address to Geographic location
> resolution?
> Thanks
> P.S. I am in the UK, but I assume any good web service would be
> worldwide'
>
Or you could write your own, its very easy to convert the ARIN, APNIC,
RIPENCC, LACNIC, from these assigned files
ftp://ftp.arin.net/pub/stats/arin/delegated-arin-latest
ftp://ftp.apnic.net/pub/apnic/stats...ed-apnic-latest
ftp://ftp.ripe.net/ripe/stats/delegated-ripencc-latest
ftp://ftp.lacnic.net/pub/stats/lacn...d-lacnic-latest
These update daily, you can store them in your database and then do a
search on them.
To store the IP Addresses convert them to decimal from dot-quad as
explained here: http://www.codeproject.com/useritems/NetCalc.asp
However if your after something more specific than resolving to a country,
you can just use maxmind.com or another similar service if your willing to
pay.
- Mark
On Wed, 08 Mar 2006 07:20:23 +0800, Octavio Hernandez
<octavio.hdez.NOSPAM@.gmail.com> wrote:

> Paul,
> Have you checked this one
> http://www.xmlwebservices.cc/index_Samples.htm
> Regards - Octavio
>
> "Paul Aspinall" <paul@.aspy.co.uk> escribi en el mensaje
> news:jboPf.128660$YJ4.65100@.fe2.news.blueyonder.co.uk...
>
Please take a look at this one.
http://www.fraudlabs.com/ip2location.aspx
You can also visit http://www.ip2location.com for more information.

Saturday, March 24, 2012

Web service for IP address to Geographic location.

Hi
Does anyone know a Web service for IP address to Geographic location
resolution?
Thanks
P.S. I am in the UK, but I assume any good web service would be worldwide'Paul,
You can try this from VE:
http://www.eggheadcafe.com/articles/20051109.asp (near the bottom).
the url to the actual locator call is:
http://local.live.com/WiFiIPService/locate.ashx
If that returns you a location script over there on the other side of the
Pond,
then you are good to go.
Peter
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Paul Aspinall" wrote:

> Hi
> Does anyone know a Web service for IP address to Geographic location
> resolution?
> Thanks
> P.S. I am in the UK, but I assume any good web service would be worldwide?
?
>
>

Monday, March 12, 2012

web services

If the database is on another domain, and is not a database server such as
SQL Server, MySql, or Oracle, or does not have a public IP address, or is
otherwise not available directly, that would be a good reason to do this. If
the database is on the same domain, or is a database server with a public IP
address, this would be a bad idea.
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
We got a sick zebra a hat,
you ultimate tuna.
"JIM.H." <JIMH@dotnet.itags.org.discussions.microsoft.com> wrote in message
news:84DAE478-E741-4399-B29E-F3B9A7C6D1DB@dotnet.itags.org.microsoft.com...
> Hello,
> I have an asp.net application developed by someone else and it seems it
> interacts with database through web services. What is the benefit of this?
> Any idea?
> Thanks,
>Hi Kevin,
Thanks for the reply. The asp.net application is on a web server for
internet users. Web server is a DMZ machine as far as I heard which is a
different domain then the SQL Server database in the domain. In this case,
can I go without web services? Can I make connection from DMZ to SQL Server
without web services, or I have to use web services?
Thanks for your help.
"Kevin Spencer" wrote:

> If the database is on another domain, and is not a database server such as
> SQL Server, MySql, or Oracle, or does not have a public IP address, or is
> otherwise not available directly, that would be a good reason to do this.
If
> the database is on the same domain, or is a database server with a public
IP
> address, this would be a bad idea.
> --
> HTH,
> Kevin Spencer
> Microsoft MVP
> ..Net Developer
> We got a sick zebra a hat,
> you ultimate tuna.
>
> "JIM.H." <JIMH@.discussions.microsoft.com> wrote in message
> news:84DAE478-E741-4399-B29E-F3B9A7C6D1DB@.microsoft.com...
>
>
Hi Jim,
SQL Server databases are usually connected to using TCP/IP, and have an IP
address (of the machine on which they reside) and port number (usually
1433). So, if the SQL Server can be accessed from the other domain (usually
this means that it has a public IP address), there is no need for a web
service. Otherwise, there is a need for some kind of service to connect to
it.
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
We got a sick zebra a hat,
you ultimate tuna.
"JIM.H." <JIMH@.discussions.microsoft.com> wrote in message
news:8E6BCE49-2D16-4739-8B10-387E8C920E6D@.microsoft.com...
> Hi Kevin,
> Thanks for the reply. The asp.net application is on a web server for
> internet users. Web server is a DMZ machine as far as I heard which is a
> different domain then the SQL Server database in the domain. In this case,
> can I go without web services? Can I make connection from DMZ to SQL
> Server
> without web services, or I have to use web services?
> Thanks for your help.
>
> "Kevin Spencer" wrote:
>