C
Carlton858
I am using NUnitASP and I have run into problem "faking" user
credentials. In my ASP.Net/C# application, I have turned off
anonymous access to the web app and I allowing Windows groups to
handle the permissions to the app. Things are working perfectly, i.e.
only user groups that are allowed can log into the app and see what
they are supposed to, when the users enter their credentials through
IE.
It is when I try to enter the credentials programmatically with
NUnitASP that I cannot set the credentials. In most cases, using
System.Net.CredentialCache.DefaultCredentials would be fine and this
works as expected. However, I want to test other roles besides my own
in the app and this is where I need to use the
System.Net.NetworkCredential class.
For some reason I do not understand, I cannot pass a username,
password and domain to this class and have these values detected as
valid credentials. Has anyone used NUnitASP? If so, can you please
share some sample code showing how this works? If you have not used
NUnitASP, but are familiar with the System.Net.NetworkCredential
class, again I could use some coaching on how to use this class.
Thank you in advance for your help.
Carlton
credentials. In my ASP.Net/C# application, I have turned off
anonymous access to the web app and I allowing Windows groups to
handle the permissions to the app. Things are working perfectly, i.e.
only user groups that are allowed can log into the app and see what
they are supposed to, when the users enter their credentials through
IE.
It is when I try to enter the credentials programmatically with
NUnitASP that I cannot set the credentials. In most cases, using
System.Net.CredentialCache.DefaultCredentials would be fine and this
works as expected. However, I want to test other roles besides my own
in the app and this is where I need to use the
System.Net.NetworkCredential class.
For some reason I do not understand, I cannot pass a username,
password and domain to this class and have these values detected as
valid credentials. Has anyone used NUnitASP? If so, can you please
share some sample code showing how this works? If you have not used
NUnitASP, but are familiar with the System.Net.NetworkCredential
class, again I could use some coaching on how to use this class.
Thank you in advance for your help.
Carlton