473,778 Members | 5,590 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I access a web service on another machine on different domains

Ian
Can anyone help

I have a web server on the internet with and ASP.NET application on it, the
application is set to allow Anonymous Access and Integrated Windows. The
Web.config is set to use Forms authentication. On the server side, where
the web server is I have set IIS to disable Anonymous access and allow
Integrated Windows. I have sync'd both the APSNET account on the web
servers and application server so that access will be granted to the web
service without the need for impersonation. However, it does not work !!!

I have identified that if I set the credentials for the web service it will
work, but this involves hard-coding as follows.

' Set the client-side credentials using the Credentials property.
Dim credentials = New NetworkCredenti al("ASPNET", "password")
oAuth.Credentia ls = Credentials

Can anyone help???
Nov 17 '05 #1
4 2699
Ian,

When a web service is protected passing credentials to it is how you are
supposed to connect to it.

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Ian" <el*****@accure ad.com> wrote in message
news:uQ******** ******@tk2msftn gp13.phx.gbl...
Can anyone help

I have a web server on the internet with and ASP.NET application on it, the application is set to allow Anonymous Access and Integrated Windows. The
Web.config is set to use Forms authentication. On the server side, where
the web server is I have set IIS to disable Anonymous access and allow
Integrated Windows. I have sync'd both the APSNET account on the web
servers and application server so that access will be granted to the web
service without the need for impersonation. However, it does not work !!!

I have identified that if I set the credentials for the web service it will work, but this involves hard-coding as follows.

' Set the client-side credentials using the Credentials property.
Dim credentials = New NetworkCredenti al("ASPNET", "password")
oAuth.Credentia ls = Credentials

Can anyone help???

Nov 17 '05 #2
Are you setting the credentials on the Web client?

If you're running a Fat Client app (Windows Forms App) you can automatically
retrieve the default credentials of the logged in user like this:

oService.Creden tials = CredentialCache .DefaultCredent ials;

This will pass the logged in user's credentials to the Web server. From the
browser this obviously won't work though. There you would have to prompt
explicitly out of the code for username and password.

+++ Rick ---

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/wwHelp
----------------------------------
Making waves on the Web
"Ian" <el*****@accure ad.com> wrote in message
news:uQ******** ******@tk2msftn gp13.phx.gbl...
Can anyone help

I have a web server on the internet with and ASP.NET application on it, the application is set to allow Anonymous Access and Integrated Windows. The
Web.config is set to use Forms authentication. On the server side, where
the web server is I have set IIS to disable Anonymous access and allow
Integrated Windows. I have sync'd both the APSNET account on the web
servers and application server so that access will be granted to the web
service without the need for impersonation. However, it does not work !!!

I have identified that if I set the credentials for the web service it will work, but this involves hard-coding as follows.

' Set the client-side credentials using the Credentials property.
Dim credentials = New NetworkCredenti al("ASPNET", "password")
oAuth.Credentia ls = Credentials

Can anyone help???

Nov 17 '05 #3
Ian
The setup is as follows

2x IIS5 W2K Advanced Server (NLB)
Firewall
1x IIS5 W2K Application Server
1x SQL Server Database

The Logon application is housed on the web servers as an ASP.NET
application, this has a reference to the web service on the Application
server via port 80 on the firewall. In turn the Application server has a
Serviced Component used for talking to the database housing the appropriate
authorisation for database access.

I have tried using oService.Creden tials =
CredentialCache .DefaultCredent ials, in the knowledge that the ASP.NET worker
process runs as the ASPNET local account, therefore should the default
credentials not be populated with those of the ASPNET account?

The alternative to this is to create a new NetworkCredenti al, hard coding
the user name, password and domain....this is not really considered as an
option !

Are you therefore saying that only a Windows Form App can populate the
CredentialCache .DefaultCredent ials ???

Regards
Ian

"Rick Strahl [MVP]" <ri********@hot mail.com> wrote in message
news:uW******** ******@tk2msftn gp13.phx.gbl...
Are you setting the credentials on the Web client?

If you're running a Fat Client app (Windows Forms App) you can automatically retrieve the default credentials of the logged in user like this:

oService.Creden tials = CredentialCache .DefaultCredent ials;

This will pass the logged in user's credentials to the Web server. From the browser this obviously won't work though. There you would have to prompt
explicitly out of the code for username and password.

+++ Rick ---

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/wwHelp
----------------------------------
Making waves on the Web
"Ian" <el*****@accure ad.com> wrote in message
news:uQ******** ******@tk2msftn gp13.phx.gbl...
Can anyone help

I have a web server on the internet with and ASP.NET application on it,

the
application is set to allow Anonymous Access and Integrated Windows. The Web.config is set to use Forms authentication. On the server side, where the web server is I have set IIS to disable Anonymous access and allow
Integrated Windows. I have sync'd both the APSNET account on the web
servers and application server so that access will be granted to the web
service without the need for impersonation. However, it does not work !!!
I have identified that if I set the credentials for the web service it

will
work, but this involves hard-coding as follows.

' Set the client-side credentials using the Credentials property.
Dim credentials = New NetworkCredenti al("ASPNET", "password")
oAuth.Credentia ls = Credentials

Can anyone help???


Nov 17 '05 #4
Hi Lan,

By default, ASPNET is a local user account, which won't be trusted by
another machine in the domain.

To resolve this issue, we can perform the following steps:

1. Create a domain account on the web server and let aspnet_wp.exe run on
this account by modifying machine.config file.
2. Create a trust relationship from the application server to the web
server.
3. Modify the NTFS permission of the folder on the web service server, and
allow the folder to be accessed by the account in another domain.

Then, the web service can be accessed by the account in another domain. You
can check the following links to implement this:

315158 FIX: ASP.NET Does Not Work with the Default ASPNET Account on a
Domain
http://support.microsoft.com/?id=315158

228477 HOW TO: Determine Trust Relationship Configurations
http://support.microsoft.com/?id=228477

Hope this helps.

Best regards,
Lewis

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| From: "Ian" <el*****@accure ad.com>
| References: <uQ************ **@tk2msftngp13 .phx.gbl>
<uW************ **@tk2msftngp13 .phx.gbl>
| Subject: Re: How do I access a web service on another machine on
different domains
| Date: Thu, 14 Aug 2003 09:02:58 +0100
| Lines: 84
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
| Message-ID: <#J************ **@TK2MSFTNGP12 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: 212.137.21.132
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP12.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:1677 67
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| The setup is as follows
|
| 2x IIS5 W2K Advanced Server (NLB)
| Firewall
| 1x IIS5 W2K Application Server
| 1x SQL Server Database
|
| The Logon application is housed on the web servers as an ASP.NET
| application, this has a reference to the web service on the Application
| server via port 80 on the firewall. In turn the Application server has a
| Serviced Component used for talking to the database housing the
appropriate
| authorisation for database access.
|
| I have tried using oService.Creden tials =
| CredentialCache .DefaultCredent ials, in the knowledge that the ASP.NET
worker
| process runs as the ASPNET local account, therefore should the default
| credentials not be populated with those of the ASPNET account?
|
| The alternative to this is to create a new NetworkCredenti al, hard coding
| the user name, password and domain....this is not really considered as an
| option !
|
| Are you therefore saying that only a Windows Form App can populate the
| CredentialCache .DefaultCredent ials ???
|
| Regards
| Ian
|
| "Rick Strahl [MVP]" <ri********@hot mail.com> wrote in message
| news:uW******** ******@tk2msftn gp13.phx.gbl...
| > Are you setting the credentials on the Web client?
| >
| > If you're running a Fat Client app (Windows Forms App) you can
| automatically
| > retrieve the default credentials of the logged in user like this:
| >
| > oService.Creden tials = CredentialCache .DefaultCredent ials;
| >
| > This will pass the logged in user's credentials to the Web server. From
| the
| > browser this obviously won't work though. There you would have to prompt
| > explicitly out of the code for username and password.
| >
| > +++ Rick ---
| >
| > Rick Strahl
| > West Wind Technologies
| > http://www.west-wind.com/
| > http://www.west-wind.com/wwHelp
| > ----------------------------------
| > Making waves on the Web
| >
| >
| > "Ian" <el*****@accure ad.com> wrote in message
| > news:uQ******** ******@tk2msftn gp13.phx.gbl...
| > > Can anyone help
| > >
| > > I have a web server on the internet with and ASP.NET application on
it,
| > the
| > > application is set to allow Anonymous Access and Integrated Windows.
| The
| > > Web.config is set to use Forms authentication. On the server side,
| where
| > > the web server is I have set IIS to disable Anonymous access and allow
| > > Integrated Windows. I have sync'd both the APSNET account on the web
| > > servers and application server so that access will be granted to the
web
| > > service without the need for impersonation. However, it does not work
| !!!
| > >
| > > I have identified that if I set the credentials for the web service it
| > will
| > > work, but this involves hard-coding as follows.
| > >
| > > ' Set the client-side credentials using the Credentials property.
| > > Dim credentials = New NetworkCredenti al("ASPNET", "password")
| > > oAuth.Credentia ls = Credentials
| > >
| > > Can anyone help???
| > >
| > >
| >
| >
|
|
|

Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
17340
by: Ravi | last post by:
I am posting this message after reading all the previous posts with the above subject. I have a SQL2K named instance running on a Windows 2K machine under Local system Account and it uses SQL Server authentication. This Server is on a domain by itself. Let us call this M1. I am connecting to this server from an XP machine usinng Enterprise Manager. Let us call this machine M2. Since the client and server are on differentt domains when I...
1
1620
by: Glenn Davy | last post by:
Hi Can any one tell me what is meant if access appends a ";1" to the names of stored procedures? Note, that the ";1" isn't already part of the name of the procedures name as they exist in the database served from the MSDE2000 server, nor does it become part of the name, but it is how they appear it the access container window. Two different machines can browse the same database, server from the same machine and each see a different...
1
1360
by: barbaraJacob | last post by:
Hi everyone! Must deliver my project tomorrow....It's nearly finished. I've set up a website to be published in 3 different domains. - same webserver (I mean physically the same machine) - same .mdb - must display data on a page published on 3 different domains, with different look and feel - I use a dsn-less connection
1
2259
by: | last post by:
Hello, I have a problem when I try to do this on a aspx page.. Is there anything wrong with this approach? This is the javascript function <Script Language='JavaScript'> function OpenLink(Link){
3
5719
by: PromoteDirect | last post by:
Newsgroups: comp.lang.javascript Subject: access denied when trying to pass data between jsps Date: Thu, 09 Mar 2006 10:42:01 -0800 I have two jsp applications. One written with struts and one without. My struts based application uses window.open to open the first page of my non-struts application, the user goes through a number of screens and I then need to copy info from my non struts ap to fields of a form on my struts ap.
2
1070
by: Jaye | last post by:
I have facing a difficult problem about windows service I have created a windows Service and I have add some set/get method to return the value that caluate in background. And i have another window form application, in this, i would like to get back the value in the method that added in my windows service. Is it possible, if yes, how can i get it?
13
6655
by: dancer | last post by:
I have made a new post because when I try to respond to another, I get the error, "Article Rejected -- Ill-formed message id" This is in response to the advice of Juan Libre to install Net Framework Service Pack 1 in order to use ASP.net 1.1 and the net Framework 1.1 ------------------------------------------------------------------------------------------------ I found the following file, "svcpack.log" at C:\WINNT. It contains many...
7
7737
by: =?Utf-8?B?YWVzcGVy?= | last post by:
Is there such a thing as a single instance web service? Is it possible to have all calls to a web service share one property value by declaring it as static? I know web service should be stateless, but I am still trying to understand how instances of a web service are handled at the server side, if a unique instance is created for every call then should'nt any members declared as "static" be shared between instances? Any help is ...
5
5918
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, Is there an easier way to handle that? I used Javascript to handle this when our two domains are hosted on two different servers(on different networks) and our search engine marketing people don't like the javascript links since they think the links are not favorable to a search robot. Now our company is thinking about hosting these two domians on the same server, So I am wodering if there is any easy way to do that. Would you...
0
9629
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10298
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10069
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9923
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5500
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4033
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3627
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2865
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.