CredentialAttribute Class
Specifies the user name and password for ASP.NET sites that require basic authentication or Windows authentication. This class cannot be inherited.
Assembly: Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)
System::Attribute
Microsoft.VisualStudio.TestTools.UnitTesting.Web::CredentialAttribute
| Name | Description | |
|---|---|---|
![]() | CredentialAttribute(String^, String^) | Initializes a new instance of the CredentialAttribute class with a user name and password needed to access the test Web site. |
![]() | CredentialAttribute(String^, String^, String^) | Initializes a new instance of the CredentialAttribute class with a user name, password and domain needed to access the test Web site. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object^) | (Inherited from Attribute.) |
![]() | GetHashCode() | (Inherited from Attribute.) |
![]() | GetType() | (Inherited from Object.) |
![]() | IsDefaultAttribute() | (Inherited from Attribute.) |
![]() | Match(Object^) | (Inherited from Attribute.) |
![]() | ToString() | (Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() | _Attribute::GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) | (Inherited from Attribute.) |
![]() ![]() | _Attribute::GetTypeInfo(UInt32, UInt32, IntPtr) | (Inherited from Attribute.) |
![]() ![]() | _Attribute::GetTypeInfoCount(UInt32) | (Inherited from Attribute.) |
![]() ![]() | _Attribute::Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) | (Inherited from Attribute.) |
If a site uses Windows Authentication, the supplied credentials will override the logged in user's credentials.
This attribute targets methods. Only one instance of this attribute may be applied to a method.
Caution |
|---|
The password is stored in plain text in source code and in the compiled assembly. Restrict access to the source code and assembly to help protect this sensitive information. |
For more information about how to use attributes, see Extending Metadata Using Attributes.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.




