Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using MyProject.ServiceReferences.Authentication;
- namespace MyProject
- {
- public class MyClass : IMyClass
- {
- public string userName;
- public string password;
- Authentication auth;
- public MyClass()
- {
- userName = "user";
- password = "pass";
- auth = new Authentication(); //invalid operation error !! An unhandled exception of type 'System.InvalidOperationException' occurred in System.ServiceModel.dll
- }
- public LoginResponse Login()
- {
- LoginRequest loginRequest = new LoginRequest(userName, password);
- LoginResponse loginResponse = auth.login(loginRequest);
- return loginResponse;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement