on 08-18-2020 11:38 AM
Hi All,
I have created angular application. I am trying to connect to service layer
Service Layer Connection Code:
ServiceLayer_Login=(): Observable<any> =>
{
let jData = JSON.stringify({
CompanyDB: this.database,
UserName: this.username,
Password: this.password
});
let url=this.actionUrl+'/Login';
// let headers = new HttpHeaders({
// 'Content-Type': 'application/json'
// });
let options = {
// headers: headers,
withCredentials: true
}
return this._http.post(url,jData,options);
}
Now I am trying to get items data:
Items_DropDownValues = (): Observable<any> =>
{
let url=this.actionUrl+'/Items';
return this._http.get(url,{withCredentials:true});
}
But following popup will gets open, even i have called service layer first
If i entered credentials manually then it will work properly
I dont understand where i am wrong?
Please help me out
Thanks for your reply.
Yes item request has both cookies.
But i don't have any idea how to set cookie in subsequent request in Angular project
Do you have any code snippet.
It will great help for me
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
if you have a correct sessionId after calling login request, you should set the cookie for subsequent requests.
could you check that your item request has the two cookies B1SESSION and ROUTEID in the header ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
8 | |
7 | |
5 | |
4 | |
3 | |
2 | |
2 | |
2 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.