MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
According to your description, you say you have problem in the login control, could you tell us the detailed error message?
Best Regards,
Eric Du
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
21 Points
244 Posts
login control
Mar 05, 2018 07:18 PM|SaeedP|LINK
Hello
I've defined user name and password for admin in web.cofig :
and place a login control on the my admin page:
but it isn't working.
Can you please inform me where is wrong in my code?
thanks
Saeed
Contributor
6730 Points
2715 Posts
Re: login control
Mar 06, 2018 03:25 AM|Eric Du|LINK
Hi SaeedP,
According to your description, you say not working, if you meet some error message or exception message?
About how to implement it, here are someone who meet the similar issue as you, please check:
ASP.NET - Login Control with Credentials in web.config file:
https://stackoverflow.com/questions/1544348/asp-net-login-control-with-credentials-in-web-config-file
how to set login control to compare the credentials stored in web.config?
https://stackoverflow.com/questions/4143098/how-to-set-login-control-to-compare-the-credentials-stored-in-web-config
Best Regards,
Eric Du
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
21 Points
244 Posts
Re: login control
Mar 06, 2018 09:36 PM|SaeedP|LINK
I see no error. But the code nothing happens. The web.config code works.
My problem is login control.
Contributor
5961 Points
2466 Posts
Re: login control
Mar 07, 2018 12:41 AM|KathyW|LINK
Your password is not SHA1, it's plain text. Replace "SHA1" with "Clear".
After that, what do you mean "nothing happens"? What do you do, what to you expect to happen, and what happens?
Contributor
6730 Points
2715 Posts
Re: login control
Mar 07, 2018 09:20 AM|Eric Du|LINK
Hi Saeedp,
According to your description, you say you have problem in the login control, could you tell us the detailed error message?
Best Regards,
Eric Du
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
21 Points
244 Posts
Re: login control
Mar 07, 2018 02:35 PM|SaeedP|LINK
It errors this code:
Contributor
5961 Points
2466 Posts
Re: login control
Mar 07, 2018 09:36 PM|KathyW|LINK
And what is the error? https://msdn.microsoft.com/en-us/library/ka5ffkce%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396 would say you need parameters in that call, not just ().