Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: .NET1.1 WebService
Hi All,
We are trying to invoke a web service provided by a JAVA based application from a .NET based application.
This web service was already existed but recently authentication is made compulsory to invoke this service.
 
But we are facing following error saying authentication failed. Request does not reach the target application.
Connectivity is correctly established if target application disables the authentication. So rest of the code is fine.
 
Can anybody help is solving this issue please?
 
Following is the code that we are using to enable authentication with “Basic” 64bit encoding.
 
• .NET Framework 1.1
• IIS 6.0
• WINDOWS Server 2003
• Target URL is correct and is verified.
• User name and password is correctly configured.
objJAVAApplication.PreAuthenticate = true;
// getting application URL from Data Base
string JAVAApplicationUrl;
DOTNETApplicationDataAccessLayer.clsCommon objCmn = new DOTNETApplicationDataAccessLayer.clsCommon();
string urlSetting = objCmn.GetConfiguration("JAVAApplicationUrl");
if ((urlSetting != null)) 
{
MPAUrl = string.Concat(urlSetting, "");
}
else 
{
MPAUrl = "URL of JAVA applicaton which we are trying to connect”;
}
 
System.Net.CredentialCache myCredentials = new System.Net.CredentialCache();
NetworkCredential netCred = new NetworkCredential("UserName", "Password", "Domain");
myCredentials.Add(new Uri(JAVAApplicationUrl), "Basic", netCred);
objMPA.Credentials = myCredentials;
Posted 25-Dec-11 0:08am
Edited 25-Dec-11 0:10am
(no name)250.1K
v2
Comments
SAKryukov at 25-Dec-11 14:50pm
   
Well, do you have WSDL for a service? If you do, the answer is trivial, if you don't, the whole activity is not very effective, if it makes sense at all...
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 8,284
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,614
3 Maciej Los 4,989
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 25 Dec 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100