CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.security Tags:
Item Type: NewsGroup Date Entered: 8/23/2005 4:09:58 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 46 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
nissan
Asp.Net User
Forward Credentials from ASP.NET Web-application to ASP.NET Web-Service8/23/2005 4:09:58 PM

0/0

Hi,
I don't have much knowledge about this. But, i have to get the person's UID and pwd who is logged into windows and pass this info along to a web service. Any ideas?
JawadKhan
Asp.Net User
Re: Forward Credentials from ASP.NET Web-application to ASP.NET Web-Service8/23/2005 4:52:17 PM

0/0

You have to add similiar code like this ...

//Create an instance of the CredentialCache class.
CredentialCache cache = new CredentialCache();

// Add a NetworkCredential instance to CredentialCache.
// Negotiate for NTLM or Kerberos authentication.
cache.Add( new Uri(myProxy.Url), "Negotiate", new NetworkCredential("UserName", "Password", "Domain"));

//Assign CredentialCache to the Web service Client Proxy(myProxy) Credetials property.
myProxy.Credentials = cache;

or Visual basic.Net
'Create an instance of the CredentialCache class.
Dim cache As CredentialCache = New CredentialCache()

'Add a NetworkCredential instance to CredentialCache.
'Negotiate for NTLM or Kerberos authentication.
cache.Add(New Uri(myProxy.Url), "Negotiate", New NetworkCredential("UserName", "Password", "Domain"))

'Assign CredentialCache to the Web service Client Proxy(myProxy) Credetials property.
myProxy.Credentials = cache

Use System.Net.CredentialCache.DefaultCredentials instead of  new NetworkCredential("UserName", "Password", "Domain") if you want to pass the currently logged in user credentials. Make sure you have anonymous access disabled in IIS.
ASP.Net Tips & Tricks - Jawad's Blog
nissan
Asp.Net User
Re: Forward Credentials from ASP.NET Web-application to ASP.NET Web-Service8/26/2005 9:21:48 PM

0/0

Could u please explain me more about this :
what is,  new Uri(myProxy.Url),  what are we doing here??
 
I want to use Integrated Security and log on to another external server and pass these credentials to a web service which is on the external server. what can i do to achieve that. Could u please let me know.
JawadKhan
Asp.Net User
Re: Forward Credentials from ASP.NET Web-application to ASP.NET Web-Service8/27/2005 1:54:37 AM

0/0

Hi Nissan,

   Here is a very Simple Example ....

    http://samples.gotdotnet.com/quickstart/aspplus/doc/secureservices.aspx


   Proxy class is the class which gets created when you add a WebReference to your Project i.e. client that is calling the WebService. You can also generate that class using wsdl tool.

Specifically look at the code NetWork credentials and username and password getting passed.

Since the Webservice is on external server and not in your domain you have to use the method as described in the example in the link rather then passing your current credentials.


ASP.Net Tips & Tricks - Jawad's Blog
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Mastering Web Services Security Authors: Bret Hartman, Donald J. Flinn, Konstantin Beznosov, Shirley Kawamoto, Pages: 436, Published: 2003
Microsoft Visual C# 2005 Unleashed Authors: Kevin Hoffman, Pages: 692, Published: 2006
Professional ASP.NET 2.0 Security, Membership, and Role Management Authors: Stefan Schackow, Pages: 611, Published: 2006
Sams Teach Yourself ASP.NET in 21 Days Authors: Chris Payne, Pages: 1104, Published: 2002
ASP.NET: Tips, Tutorials, and Code Authors: Scott Mitchell, Stephen Walther, Doug Seven, Donny Mack, Billy Anders, Adam Nathan, Dan Wahlin, Pages: 878, Published: 2001
Building Secure Microsoft ASP.NET Applications: Authentication, Authorization, and Secure Communication : Patterns & Practices Authors: Microsoft Corporation Staff, Drew Bird, Microsoft Corporation, Microsoft Corporation, Danielle Voeller Bird, Pages: 586, Published: 2003
ASP.NET in a Nutshell: In a Nutshell Authors: G. Andrew Duthie, Matthew MacDonald, Pages: 979, Published: 2003
ASP.NET: Your Visual Blueprint for Creating Web Applications on the .Net Framework Authors: Danny Ryan, Tommy Ryan, Pages: 320, Published: 2001
Inside ASP.NET Authors: Scott Worley, Pages: 704, Published: 2001
Beginning Expression Web Authors: Zak Ruvalcaba, Pages: 474, Published: 2007

Web:
microsoft.public.dotnet.security: Forward Credentials from ASP.NET ... Forward Credentials from ASP.NET Web-application to ASP.NET Web-Service? From: Sean Dowling (nyq2000_at_hotmail.com) Date: 06/22/04 ...
Forward Credentials from ASP.NET Web-application to ASP.NET Web ... Forward Credentials from ASP.NET Web-application to ASP.NET Web-Service. Last post 08-26-2005 9:54 PM by JawadKhan. 3 replies. Sort Posts: ...
ASP.NET and Struts: Web Application Architectures Introduction Overview of the Platforms Web Framework Parallels Framework Patterns Looking Forward Migrating Struts and J2EE Applications to ASP.NET ...
ASP.NET 1.1 - Extranet Exposing a Web Service - SecurityGuidanceShare Mar 8, 2007 ... If the partner application is an ASP.NET Web application, then it .... password to explicitly set the credentials for the Web service proxy. ...
Re: Passing credentials from ASP.NET website to webservice Jul 5, 2006 ... I have a problem with passing the default credentials from an ASP.NET web ... The EMM web applications access the MSCRM ... Web services ...
Call to webservice doesn't pass in credentials Call to webservice doesn't pass in credentials. I'm making a call to a webservice from my ASP.NET page. The web application has anonymous ...
Building Secure ASP.NET Applications: Authentication ... Configure the ASP.NET Web service to use Windows authentication. .... Web application to protect the Forms or Basic authentication credentials (both passed ...
How to pass security credentials to a WebService using Ajax? - ASP ... NET AJAX Networking and Web Services » How to pass security credentials to a ... 7: Find and Organize Part 2 - Building Federated Search applications ...
Microsoft: ASP.NET - Sharepoint Web Service Credentials Issue I have an ASP.NET application running on one of our servers, ... on this a bit and would I be setting the credentials right on the web service by calling: ...
CodeProject: ASP.NET Ver 1.1 Web Application and Windows ... Since ‘Windows Authentication’ uses the credentials of Windows users, ..... Re: Help me! asp.net web Application Authentication For SmartCard, member ...




Search This Site:










how to get a url variable and set it to a local variable

creating a batch job

search members by profile

can i change the size of the modules ?

new interesting problem istalling dnn 3.2

c# vs vb.net

when data provider for ms access ?

how to stop unauthorised access using web.config

how to use custome db with asp.net role management

multiple web.sitemaps

use activex to get username from client

siteconfiguration is not defined while recompiling assembly

help!! needed to multiply a specific number of a string character using function in c#

how can i open the starter kits

difference between two dates including minutes

funny coulour appearing on separator

gridviewadapter

3d array in vb.net?

cloning dnn sites

vwd express and class libraries

postback

looking for advanced user profiles module

turning off password reminder - dnn3.0.11

does the asp.net treeview control support in-node controls?

hierarchal data / multidimensional array

a couple of questions regarding linking data...

system.outofmemoryexception

solpart on 3.2.2 and witg ie / error: object expected

web form

threading problem

 
All Times Are GMT