DbConnectionStringCommon.cs 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598
  1. //------------------------------------------------------------------------------
  2. // <copyright file="DbConnectionStringBuilder.cs" company="Microsoft">
  3. // Copyright (c) Microsoft Corporation. All rights reserved.
  4. // </copyright>
  5. // <owner current="true" primary="true">[....]</owner>
  6. // <owner current="true" primary="false">[....]</owner>
  7. //------------------------------------------------------------------------------
  8. using System;
  9. using System.Collections;
  10. using System.Collections.Generic;
  11. using System.ComponentModel;
  12. using System.Data;
  13. using System.Data.Common;
  14. using System.Diagnostics;
  15. using System.Globalization;
  16. using System.Runtime.Serialization;
  17. using System.Security.Permissions;
  18. using System.Text;
  19. using System.Text.RegularExpressions;
  20. using System.Data.SqlClient;
  21. namespace System.Data.Common {
  22. /*
  23. internal sealed class NamedConnectionStringConverter : StringConverter {
  24. public NamedConnectionStringConverter() {
  25. }
  26. public override bool GetStandardValuesSupported(ITypeDescriptorContext context) {
  27. return true;
  28. }
  29. public override bool GetStandardValuesExclusive(ITypeDescriptorContext context) {
  30. // Although theoretically this could be true, some people may want to just type in a name
  31. return false;
  32. }
  33. public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) {
  34. StandardValuesCollection standardValues = null;
  35. if (null != context) {
  36. DbConnectionStringBuilder instance = (context.Instance as DbConnectionStringBuilder);
  37. if (null != instance) {
  38. string myProviderName = instance.GetType().Namespace;
  39. List<string> myConnectionNames = new List<string>();
  40. foreach(System.Configuration.ConnectionStringSetting setting in System.Configuration.ConfigurationManager.ConnectionStrings) {
  41. if (myProviderName.EndsWith(setting.ProviderName)) {
  42. myConnectionNames.Add(setting.ConnectionName);
  43. }
  44. }
  45. standardValues = new StandardValuesCollection(myConnectionNames);
  46. }
  47. }
  48. return standardValues;
  49. }
  50. }
  51. */
  52. internal class DbConnectionStringBuilderDescriptor : PropertyDescriptor {
  53. private Type _componentType;
  54. private Type _propertyType;
  55. private bool _isReadOnly;
  56. private bool _refreshOnChange;
  57. internal DbConnectionStringBuilderDescriptor(string propertyName, Type componentType, Type propertyType, bool isReadOnly, Attribute[] attributes) : base(propertyName, attributes) {
  58. //Bid.Trace("<comm.DbConnectionStringBuilderDescriptor|INFO> propertyName='%ls', propertyType='%ls'\n", propertyName, propertyType.Name);
  59. _componentType = componentType;
  60. _propertyType = propertyType;
  61. _isReadOnly = isReadOnly;
  62. }
  63. internal bool RefreshOnChange {
  64. get {
  65. return _refreshOnChange;
  66. }
  67. set {
  68. _refreshOnChange = value;
  69. }
  70. }
  71. public override Type ComponentType {
  72. get {
  73. return _componentType;
  74. }
  75. }
  76. public override bool IsReadOnly {
  77. get {
  78. return _isReadOnly;
  79. }
  80. }
  81. public override Type PropertyType {
  82. get {
  83. return _propertyType;
  84. }
  85. }
  86. public override bool CanResetValue(object component) {
  87. DbConnectionStringBuilder builder = (component as DbConnectionStringBuilder);
  88. return ((null != builder) && builder.ShouldSerialize(DisplayName));
  89. }
  90. public override object GetValue(object component) {
  91. DbConnectionStringBuilder builder = (component as DbConnectionStringBuilder);
  92. if (null != builder) {
  93. object value;
  94. if (builder.TryGetValue(DisplayName, out value)) {
  95. return value;
  96. }
  97. }
  98. return null;
  99. }
  100. public override void ResetValue(object component) {
  101. DbConnectionStringBuilder builder = (component as DbConnectionStringBuilder);
  102. if (null != builder) {
  103. builder.Remove(DisplayName);
  104. if (RefreshOnChange) {
  105. builder.ClearPropertyDescriptors();
  106. }
  107. }
  108. }
  109. public override void SetValue(object component, object value) {
  110. DbConnectionStringBuilder builder = (component as DbConnectionStringBuilder);
  111. if (null != builder) {
  112. // via the editor, empty string does a defacto Reset
  113. if ((typeof(string) == PropertyType) && String.Empty.Equals(value)) {
  114. value = null;
  115. }
  116. builder[DisplayName] = value;
  117. if (RefreshOnChange) {
  118. builder.ClearPropertyDescriptors();
  119. }
  120. }
  121. }
  122. public override bool ShouldSerializeValue(object component) {
  123. DbConnectionStringBuilder builder = (component as DbConnectionStringBuilder);
  124. return ((null != builder) && builder.ShouldSerialize(DisplayName));
  125. }
  126. }
  127. [Serializable()]
  128. internal sealed class ReadOnlyCollection<T> : System.Collections.ICollection, ICollection<T> {
  129. private T[] _items;
  130. internal ReadOnlyCollection(T[] items) {
  131. _items = items;
  132. #if DEBUG
  133. for(int i = 0; i < items.Length; ++i) {
  134. Debug.Assert(null != items[i], "null item");
  135. }
  136. #endif
  137. }
  138. public void CopyTo(T[] array, int arrayIndex) {
  139. Array.Copy(_items, 0, array, arrayIndex, _items.Length);
  140. }
  141. void System.Collections.ICollection.CopyTo(Array array, int arrayIndex) {
  142. Array.Copy(_items, 0, array, arrayIndex, _items.Length);
  143. }
  144. IEnumerator<T> IEnumerable<T>.GetEnumerator() {
  145. return new Enumerator<T>(_items);
  146. }
  147. public System.Collections.IEnumerator GetEnumerator() {
  148. return new Enumerator<T>(_items);
  149. }
  150. bool System.Collections.ICollection.IsSynchronized {
  151. get { return false; }
  152. }
  153. Object System.Collections.ICollection.SyncRoot {
  154. get { return _items; }
  155. }
  156. bool ICollection<T>.IsReadOnly {
  157. get { return true;}
  158. }
  159. void ICollection<T>.Add(T value) {
  160. throw new NotSupportedException();
  161. }
  162. void ICollection<T>.Clear() {
  163. throw new NotSupportedException();
  164. }
  165. bool ICollection<T>.Contains(T value) {
  166. return Array.IndexOf(_items, value) >= 0;
  167. }
  168. bool ICollection<T>.Remove(T value) {
  169. throw new NotSupportedException();
  170. }
  171. public int Count {
  172. get { return _items.Length; }
  173. }
  174. [Serializable()]
  175. internal struct Enumerator<K> : IEnumerator<K>, System.Collections.IEnumerator { // based on List<T>.Enumerator
  176. private K[] _items;
  177. private int _index;
  178. internal Enumerator(K[] items) {
  179. _items = items;
  180. _index = -1;
  181. }
  182. public void Dispose() {
  183. }
  184. public bool MoveNext() {
  185. return (++_index < _items.Length);
  186. }
  187. public K Current {
  188. get {
  189. return _items[_index];
  190. }
  191. }
  192. Object System.Collections.IEnumerator.Current {
  193. get {
  194. return _items[_index];
  195. }
  196. }
  197. void System.Collections.IEnumerator.Reset() {
  198. _index = -1;
  199. }
  200. }
  201. }
  202. internal static class DbConnectionStringBuilderUtil {
  203. internal static bool ConvertToBoolean(object value) {
  204. Debug.Assert(null != value, "ConvertToBoolean(null)");
  205. string svalue = (value as string);
  206. if (null != svalue) {
  207. if (StringComparer.OrdinalIgnoreCase.Equals(svalue, "true") || StringComparer.OrdinalIgnoreCase.Equals(svalue, "yes"))
  208. return true;
  209. else if (StringComparer.OrdinalIgnoreCase.Equals(svalue, "false") || StringComparer.OrdinalIgnoreCase.Equals(svalue, "no"))
  210. return false;
  211. else {
  212. string tmp = svalue.Trim(); // Remove leading & trailing white space.
  213. if (StringComparer.OrdinalIgnoreCase.Equals(tmp, "true") || StringComparer.OrdinalIgnoreCase.Equals(tmp, "yes"))
  214. return true;
  215. else if (StringComparer.OrdinalIgnoreCase.Equals(tmp, "false") || StringComparer.OrdinalIgnoreCase.Equals(tmp, "no"))
  216. return false;
  217. }
  218. return Boolean.Parse(svalue);
  219. }
  220. try {
  221. return ((IConvertible)value).ToBoolean(CultureInfo.InvariantCulture);
  222. }
  223. catch(InvalidCastException e) {
  224. throw ADP.ConvertFailed(value.GetType(), typeof(Boolean), e);
  225. }
  226. }
  227. internal static bool ConvertToIntegratedSecurity(object value) {
  228. Debug.Assert(null != value, "ConvertToIntegratedSecurity(null)");
  229. string svalue = (value as string);
  230. if (null != svalue) {
  231. if (StringComparer.OrdinalIgnoreCase.Equals(svalue, "sspi") || StringComparer.OrdinalIgnoreCase.Equals(svalue, "true") || StringComparer.OrdinalIgnoreCase.Equals(svalue, "yes"))
  232. return true;
  233. else if (StringComparer.OrdinalIgnoreCase.Equals(svalue, "false") || StringComparer.OrdinalIgnoreCase.Equals(svalue, "no"))
  234. return false;
  235. else {
  236. string tmp = svalue.Trim(); // Remove leading & trailing white space.
  237. if (StringComparer.OrdinalIgnoreCase.Equals(tmp, "sspi") || StringComparer.OrdinalIgnoreCase.Equals(tmp, "true") || StringComparer.OrdinalIgnoreCase.Equals(tmp, "yes"))
  238. return true;
  239. else if (StringComparer.OrdinalIgnoreCase.Equals(tmp, "false") || StringComparer.OrdinalIgnoreCase.Equals(tmp, "no"))
  240. return false;
  241. }
  242. return Boolean.Parse(svalue);
  243. }
  244. try {
  245. return ((IConvertible)value).ToBoolean(CultureInfo.InvariantCulture);
  246. }
  247. catch(InvalidCastException e) {
  248. throw ADP.ConvertFailed(value.GetType(), typeof(Boolean), e);
  249. }
  250. }
  251. internal static int ConvertToInt32(object value) {
  252. try {
  253. return ((IConvertible)value).ToInt32(CultureInfo.InvariantCulture);
  254. }
  255. catch(InvalidCastException e) {
  256. throw ADP.ConvertFailed(value.GetType(), typeof(Int32), e);
  257. }
  258. }
  259. internal static string ConvertToString(object value) {
  260. try {
  261. return ((IConvertible)value).ToString(CultureInfo.InvariantCulture);
  262. }
  263. catch(InvalidCastException e) {
  264. throw ADP.ConvertFailed(value.GetType(), typeof(String), e);
  265. }
  266. }
  267. const string ApplicationIntentReadWriteString = "ReadWrite";
  268. const string ApplicationIntentReadOnlyString = "ReadOnly";
  269. internal static bool TryConvertToApplicationIntent(string value, out ApplicationIntent result) {
  270. Debug.Assert(Enum.GetNames(typeof(ApplicationIntent)).Length == 2, "ApplicationIntent enum has changed, update needed");
  271. Debug.Assert(null != value, "TryConvertToApplicationIntent(null,...)");
  272. if (StringComparer.OrdinalIgnoreCase.Equals(value, ApplicationIntentReadOnlyString)) {
  273. result = ApplicationIntent.ReadOnly;
  274. return true;
  275. }
  276. else if (StringComparer.OrdinalIgnoreCase.Equals(value, ApplicationIntentReadWriteString)) {
  277. result = ApplicationIntent.ReadWrite;
  278. return true;
  279. }
  280. else {
  281. result = DbConnectionStringDefaults.ApplicationIntent;
  282. return false;
  283. }
  284. }
  285. internal static bool IsValidApplicationIntentValue(ApplicationIntent value) {
  286. Debug.Assert(Enum.GetNames(typeof(ApplicationIntent)).Length == 2, "ApplicationIntent enum has changed, update needed");
  287. return value == ApplicationIntent.ReadOnly || value == ApplicationIntent.ReadWrite;
  288. }
  289. internal static string ApplicationIntentToString(ApplicationIntent value) {
  290. Debug.Assert(IsValidApplicationIntentValue(value));
  291. if (value == ApplicationIntent.ReadOnly) {
  292. return ApplicationIntentReadOnlyString;
  293. }
  294. else {
  295. return ApplicationIntentReadWriteString;
  296. }
  297. }
  298. /// <summary>
  299. /// This method attempts to convert the given value tp ApplicationIntent enum. The algorithm is:
  300. /// * if the value is from type string, it will be matched against ApplicationIntent enum names only, using ordinal, case-insensitive comparer
  301. /// * if the value is from type ApplicationIntent, it will be used as is
  302. /// * if the value is from integral type (SByte, Int16, Int32, Int64, Byte, UInt16, UInt32, or UInt64), it will be converted to enum
  303. /// * if the value is another enum or any other type, it will be blocked with an appropriate ArgumentException
  304. ///
  305. /// in any case above, if the conerted value is out of valid range, the method raises ArgumentOutOfRangeException.
  306. /// </summary>
  307. /// <returns>applicaiton intent value in the valid range</returns>
  308. internal static ApplicationIntent ConvertToApplicationIntent(string keyword, object value) {
  309. Debug.Assert(null != value, "ConvertToApplicationIntent(null)");
  310. string sValue = (value as string);
  311. ApplicationIntent result;
  312. if (null != sValue) {
  313. // We could use Enum.TryParse<ApplicationIntent> here, but it accepts value combinations like
  314. // "ReadOnly, ReadWrite" which are unwelcome here
  315. // Also, Enum.TryParse is 100x slower than plain StringComparer.OrdinalIgnoreCase.Equals method.
  316. if (TryConvertToApplicationIntent(sValue, out result)) {
  317. return result;
  318. }
  319. // try again after remove leading & trailing whitespaces.
  320. sValue = sValue.Trim();
  321. if (TryConvertToApplicationIntent(sValue, out result)) {
  322. return result;
  323. }
  324. // string values must be valid
  325. throw ADP.InvalidConnectionOptionValue(keyword);
  326. }
  327. else {
  328. // the value is not string, try other options
  329. ApplicationIntent eValue;
  330. if (value is ApplicationIntent) {
  331. // quick path for the most common case
  332. eValue = (ApplicationIntent)value;
  333. }
  334. else if (value.GetType().IsEnum) {
  335. // explicitly block scenarios in which user tries to use wrong enum types, like:
  336. // builder["ApplicationIntent"] = EnvironmentVariableTarget.Process;
  337. // workaround: explicitly cast non-ApplicationIntent enums to int
  338. throw ADP.ConvertFailed(value.GetType(), typeof(ApplicationIntent), null);
  339. }
  340. else {
  341. try {
  342. // Enum.ToObject allows only integral and enum values (enums are blocked above), rasing ArgumentException for the rest
  343. eValue = (ApplicationIntent)Enum.ToObject(typeof(ApplicationIntent), value);
  344. }
  345. catch (ArgumentException e) {
  346. // to be consistent with the messages we send in case of wrong type usage, replace
  347. // the error with our exception, and keep the original one as inner one for troubleshooting
  348. throw ADP.ConvertFailed(value.GetType(), typeof(ApplicationIntent), e);
  349. }
  350. }
  351. // ensure value is in valid range
  352. if (IsValidApplicationIntentValue(eValue)) {
  353. return eValue;
  354. }
  355. else {
  356. throw ADP.InvalidEnumerationValue(typeof(ApplicationIntent), (int)eValue);
  357. }
  358. }
  359. }
  360. }
  361. internal static class DbConnectionStringDefaults {
  362. // all
  363. // internal const string NamedConnection = "";
  364. // Odbc
  365. internal const string Driver = "";
  366. internal const string Dsn = "";
  367. // OleDb
  368. internal const bool AdoNetPooler = false;
  369. internal const string FileName = "";
  370. internal const int OleDbServices = ~(/*DBPROPVAL_OS_AGR_AFTERSESSION*/0x00000008 | /*DBPROPVAL_OS_CLIENTCURSOR*/0x00000004); // -13
  371. internal const string Provider = "";
  372. // OracleClient
  373. internal const bool Unicode = false;
  374. internal const bool OmitOracleConnectionName = false;
  375. // SqlClient
  376. internal const ApplicationIntent ApplicationIntent = System.Data.SqlClient.ApplicationIntent.ReadWrite;
  377. internal const string ApplicationName = ".Net SqlClient Data Provider";
  378. internal const bool AsynchronousProcessing = false;
  379. internal const string AttachDBFilename = "";
  380. internal const int ConnectTimeout = 15;
  381. internal const bool ConnectionReset = true;
  382. internal const bool ContextConnection = false;
  383. internal const string CurrentLanguage = "";
  384. internal const string DataSource = "";
  385. internal const bool Encrypt = false;
  386. internal const bool Enlist = true;
  387. internal const string FailoverPartner = "";
  388. internal const string InitialCatalog = "";
  389. internal const bool IntegratedSecurity = false;
  390. internal const int LoadBalanceTimeout = 0; // default of 0 means don't use
  391. internal const bool MultipleActiveResultSets = false;
  392. internal const bool MultiSubnetFailover = false;
  393. internal const int MaxPoolSize = 100;
  394. internal const int MinPoolSize = 0;
  395. internal const string NetworkLibrary = "";
  396. internal const int PacketSize = 8000;
  397. internal const string Password = "";
  398. internal const bool PersistSecurityInfo = false;
  399. internal const bool Pooling = true;
  400. internal const bool TrustServerCertificate = false;
  401. internal const string TypeSystemVersion = "Latest";
  402. internal const string UserID = "";
  403. internal const bool UserInstance = false;
  404. internal const bool Replication = false;
  405. internal const string WorkstationID = "";
  406. internal const string TransactionBinding = "Implicit Unbind";
  407. internal const int ConnectRetryCount = 1;
  408. internal const int ConnectRetryInterval = 10;
  409. }
  410. internal static class DbConnectionOptionKeywords {
  411. // Odbc
  412. internal const string Driver = "driver";
  413. internal const string Pwd = "pwd";
  414. internal const string UID = "uid";
  415. // OleDb
  416. internal const string DataProvider = "data provider";
  417. internal const string ExtendedProperties = "extended properties";
  418. internal const string FileName = "file name";
  419. internal const string Provider = "provider";
  420. internal const string RemoteProvider = "remote provider";
  421. // common keywords (OleDb, OracleClient, SqlClient)
  422. internal const string Password = "password";
  423. internal const string UserID = "user id";
  424. }
  425. internal static class DbConnectionStringKeywords {
  426. // all
  427. // internal const string NamedConnection = "Named Connection";
  428. // Odbc
  429. internal const string Driver = "Driver";
  430. internal const string Dsn = "Dsn";
  431. internal const string FileDsn = "FileDsn";
  432. internal const string SaveFile = "SaveFile";
  433. // OleDb
  434. internal const string FileName = "File Name";
  435. internal const string OleDbServices = "OLE DB Services";
  436. internal const string Provider = "Provider";
  437. // OracleClient
  438. internal const string Unicode = "Unicode";
  439. internal const string OmitOracleConnectionName = "Omit Oracle Connection Name";
  440. // SqlClient
  441. internal const string ApplicationIntent = "ApplicationIntent";
  442. internal const string ApplicationName = "Application Name";
  443. internal const string AsynchronousProcessing = "Asynchronous Processing";
  444. internal const string AttachDBFilename = "AttachDbFilename";
  445. internal const string ConnectTimeout = "Connect Timeout";
  446. internal const string ConnectionReset = "Connection Reset";
  447. internal const string ContextConnection = "Context Connection";
  448. internal const string CurrentLanguage = "Current Language";
  449. internal const string Encrypt = "Encrypt";
  450. internal const string FailoverPartner = "Failover Partner";
  451. internal const string InitialCatalog = "Initial Catalog";
  452. internal const string MultipleActiveResultSets = "MultipleActiveResultSets";
  453. internal const string MultiSubnetFailover = "MultiSubnetFailover";
  454. internal const string NetworkLibrary = "Network Library";
  455. internal const string PacketSize = "Packet Size";
  456. internal const string Replication = "Replication";
  457. internal const string TransactionBinding = "Transaction Binding";
  458. internal const string TrustServerCertificate = "TrustServerCertificate";
  459. internal const string TypeSystemVersion = "Type System Version";
  460. internal const string UserInstance = "User Instance";
  461. internal const string WorkstationID = "Workstation ID";
  462. internal const string ConnectRetryCount = "ConnectRetryCount";
  463. internal const string ConnectRetryInterval = "ConnectRetryInterval";
  464. // common keywords (OleDb, OracleClient, SqlClient)
  465. internal const string DataSource = "Data Source";
  466. internal const string IntegratedSecurity = "Integrated Security";
  467. internal const string Password = "Password";
  468. internal const string PersistSecurityInfo = "Persist Security Info";
  469. internal const string UserID = "User ID";
  470. // managed pooling (OracleClient, SqlClient)
  471. internal const string Enlist = "Enlist";
  472. internal const string LoadBalanceTimeout = "Load Balance Timeout";
  473. internal const string MaxPoolSize = "Max Pool Size";
  474. internal const string Pooling = "Pooling";
  475. internal const string MinPoolSize = "Min Pool Size";
  476. }
  477. internal static class DbConnectionStringSynonyms {
  478. //internal const string AsynchronousProcessing = Async;
  479. internal const string Async = "async";
  480. //internal const string ApplicationName = APP;
  481. internal const string APP = "app";
  482. //internal const string AttachDBFilename = EXTENDEDPROPERTIES+","+INITIALFILENAME;
  483. internal const string EXTENDEDPROPERTIES = "extended properties";
  484. internal const string INITIALFILENAME = "initial file name";
  485. //internal const string ConnectTimeout = CONNECTIONTIMEOUT+","+TIMEOUT;
  486. internal const string CONNECTIONTIMEOUT = "connection timeout";
  487. internal const string TIMEOUT = "timeout";
  488. //internal const string CurrentLanguage = LANGUAGE;
  489. internal const string LANGUAGE = "language";
  490. //internal const string OraDataSource = SERVER;
  491. //internal const string SqlDataSource = ADDR+","+ADDRESS+","+SERVER+","+NETWORKADDRESS;
  492. internal const string ADDR = "addr";
  493. internal const string ADDRESS = "address";
  494. internal const string SERVER = "server";
  495. internal const string NETWORKADDRESS = "network address";
  496. //internal const string InitialCatalog = DATABASE;
  497. internal const string DATABASE = "database";
  498. //internal const string IntegratedSecurity = TRUSTEDCONNECTION;
  499. internal const string TRUSTEDCONNECTION = "trusted_connection"; // underscore introduced in everett
  500. //internal const string LoadBalanceTimeout = ConnectionLifetime;
  501. internal const string ConnectionLifetime = "connection lifetime";
  502. //internal const string NetworkLibrary = NET+","+NETWORK;
  503. internal const string NET = "net";
  504. internal const string NETWORK = "network";
  505. internal const string WorkaroundOracleBug914652 = "Workaround Oracle Bug 914652";
  506. //internal const string Password = Pwd;
  507. internal const string Pwd = "pwd";
  508. //internal const string PersistSecurityInfo = PERSISTSECURITYINFO;
  509. internal const string PERSISTSECURITYINFO = "persistsecurityinfo";
  510. //internal const string UserID = UID+","+User;
  511. internal const string UID = "uid";
  512. internal const string User = "user";
  513. //internal const string WorkstationID = WSID;
  514. internal const string WSID = "wsid";
  515. }
  516. }