Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Error when calling WebService
c_cousens
#1 Posted : Tuesday, March 31, 2015 12:41:09 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/31/2015(UTC)
Posts: 2
Location: South Africa

Was thanked: 1 time(s) in 1 post(s)
Hello,

I'm getting the following error when declaring variables which are from my WebService. This occurs on the first line of my declarations:

// Declare Variables
----> svc_Authentication.AuthenticationClient client = new svc_Authentication.AuthenticationClient();
svc_Authentication.AuthenticateRequest ar = new svc_Authentication.AuthenticateRequest();
svc_Authentication.AuthenticateResponse res = new svc_Authentication.AuthenticateResponse();

"System.InvalidOperationException: Could not find default endpoint element that references contract 'svc_Authentication.IAuthentication' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element."

This function returns a GUID of an ID and a blank one if the function fails.

My test is as follows

public void tst_Authenticate()
{

clsMobileAPis aa = new clsMobileAPis();
Guid guidToken = aa.strAuthenticate_SOAP();
Assert.AreNotEqual(guidToken, Guid.Empty);

}

Please help or is there any more info I can give to help get this resolved?

Please Note: The application runs 100% perfectly if I run it, it's just the NCrunch and the test that fails.

Thanks,

Chris
c_cousens
#2 Posted : Tuesday, March 31, 2015 12:44:47 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/31/2015(UTC)
Posts: 2
Location: South Africa

Was thanked: 1 time(s) in 1 post(s)
Resolved by copying and pasting the endpoints in to the Unit Test project's app.config.
1 user thanked c_cousens for this useful post.
Remco on 3/31/2015(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.027 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download