Exception thrown
-
using System; using System.Configuration; using System.Web.UI.WebControls; using System.Security.Principal; using System.Xml; using Itools.Encryption; using System.Web; using System.Text; using System.Text.RegularExpressions; namespace Ashwin.DAL { /// <summary> /// Summary description for Util /// </summary> public class Util { //Design users //adriaanse.a //allinsmith.w private static readonly string whoami = "ashwin.k";//For testing - for cop ["westring.bd"] private const string encKey = "KFn2oZAwJHWFRbSXoaSlYjl5TADpyyt53rowhbVwH/M="; private const string encVector = "nb2dZEGWnzg8R1GZAuUkUQ=="; private static System.Collections.ICollection appSettings = ConfigurationManager.AppSettings; private static System.Configuration.ConnectionStringSettingsCollection connStrings = ConfigurationManager.ConnectionStrings; /// <summary> /// Returns the username without the domain of the current logged in user. /// </summary> /// <param name="User">Current logged in user, example CN\ashwin.k</param> /// <returns>Returns the username without the domain of the current logged in user. </returns> public static string GetSimpleUsername(IPrincipal User) { //setup user array to split username into domain and username #if DEBUG return whoami; #endif string[] user; // define which character is seperating fields char[] splitter = { '\\' }; //perform split user = User.Identity.Name.Split(splitter); //check to see if no domain exists for user if (user.Length < 2) { return user[0]; } else { return user[1]; } } /// <summary> /// Method to make sure that user's inputs are not malicious /// </summary> /// <param name="text">User's Input</param> /// <param name="maxLength">Maximum length of input</param> /// <returns>The cleaned up version of the input</returns> public static string InputText(string text, int maxLength) { text = text.Trim(); if (string.IsNullOrEmpty(text)) return string.Empty; if (text.Length > maxLength) text = text.Substring(0, maxLeng
-
using System; using System.Configuration; using System.Web.UI.WebControls; using System.Security.Principal; using System.Xml; using Itools.Encryption; using System.Web; using System.Text; using System.Text.RegularExpressions; namespace Ashwin.DAL { /// <summary> /// Summary description for Util /// </summary> public class Util { //Design users //adriaanse.a //allinsmith.w private static readonly string whoami = "ashwin.k";//For testing - for cop ["westring.bd"] private const string encKey = "KFn2oZAwJHWFRbSXoaSlYjl5TADpyyt53rowhbVwH/M="; private const string encVector = "nb2dZEGWnzg8R1GZAuUkUQ=="; private static System.Collections.ICollection appSettings = ConfigurationManager.AppSettings; private static System.Configuration.ConnectionStringSettingsCollection connStrings = ConfigurationManager.ConnectionStrings; /// <summary> /// Returns the username without the domain of the current logged in user. /// </summary> /// <param name="User">Current logged in user, example CN\ashwin.k</param> /// <returns>Returns the username without the domain of the current logged in user. </returns> public static string GetSimpleUsername(IPrincipal User) { //setup user array to split username into domain and username #if DEBUG return whoami; #endif string[] user; // define which character is seperating fields char[] splitter = { '\\' }; //perform split user = User.Identity.Name.Split(splitter); //check to see if no domain exists for user if (user.Length < 2) { return user[0]; } else { return user[1]; } } /// <summary> /// Method to make sure that user's inputs are not malicious /// </summary> /// <param name="text">User's Input</param> /// <param name="maxLength">Maximum length of input</param> /// <returns>The cleaned up version of the input</returns> public static string InputText(string text, int maxLength) { text = text.Trim(); if (string.IsNullOrEmpty(text)) return string.Empty; if (text.Length > maxLength) text = text.Substring(0, maxLeng
-
using System; using System.Configuration; using System.Web.UI.WebControls; using System.Security.Principal; using System.Xml; using Itools.Encryption; using System.Web; using System.Text; using System.Text.RegularExpressions; namespace Ashwin.DAL { /// <summary> /// Summary description for Util /// </summary> public class Util { //Design users //adriaanse.a //allinsmith.w private static readonly string whoami = "ashwin.k";//For testing - for cop ["westring.bd"] private const string encKey = "KFn2oZAwJHWFRbSXoaSlYjl5TADpyyt53rowhbVwH/M="; private const string encVector = "nb2dZEGWnzg8R1GZAuUkUQ=="; private static System.Collections.ICollection appSettings = ConfigurationManager.AppSettings; private static System.Configuration.ConnectionStringSettingsCollection connStrings = ConfigurationManager.ConnectionStrings; /// <summary> /// Returns the username without the domain of the current logged in user. /// </summary> /// <param name="User">Current logged in user, example CN\ashwin.k</param> /// <returns>Returns the username without the domain of the current logged in user. </returns> public static string GetSimpleUsername(IPrincipal User) { //setup user array to split username into domain and username #if DEBUG return whoami; #endif string[] user; // define which character is seperating fields char[] splitter = { '\\' }; //perform split user = User.Identity.Name.Split(splitter); //check to see if no domain exists for user if (user.Length < 2) { return user[0]; } else { return user[1]; } } /// <summary> /// Method to make sure that user's inputs are not malicious /// </summary> /// <param name="text">User's Input</param> /// <param name="maxLength">Maximum length of input</param> /// <returns>The cleaned up version of the input</returns> public static string InputText(string text, int maxLength) { text = text.Trim(); if (string.IsNullOrEmpty(text)) return string.Empty; if (text.Length > maxLength) text = text.Substring(0, maxLeng
No one is going to read this unformatted drivel. Please format any code, as per CP guidelines, and only include what is relevant. And no, not all of this is relevant to your issue.
I know the language. I've read a book. - _Madmatt
-
using System; using System.Configuration; using System.Web.UI.WebControls; using System.Security.Principal; using System.Xml; using Itools.Encryption; using System.Web; using System.Text; using System.Text.RegularExpressions; namespace Ashwin.DAL { /// <summary> /// Summary description for Util /// </summary> public class Util { //Design users //adriaanse.a //allinsmith.w private static readonly string whoami = "ashwin.k";//For testing - for cop ["westring.bd"] private const string encKey = "KFn2oZAwJHWFRbSXoaSlYjl5TADpyyt53rowhbVwH/M="; private const string encVector = "nb2dZEGWnzg8R1GZAuUkUQ=="; private static System.Collections.ICollection appSettings = ConfigurationManager.AppSettings; private static System.Configuration.ConnectionStringSettingsCollection connStrings = ConfigurationManager.ConnectionStrings; /// <summary> /// Returns the username without the domain of the current logged in user. /// </summary> /// <param name="User">Current logged in user, example CN\ashwin.k</param> /// <returns>Returns the username without the domain of the current logged in user. </returns> public static string GetSimpleUsername(IPrincipal User) { //setup user array to split username into domain and username #if DEBUG return whoami; #endif string[] user; // define which character is seperating fields char[] splitter = { '\\' }; //perform split user = User.Identity.Name.Split(splitter); //check to see if no domain exists for user if (user.Length < 2) { return user[0]; } else { return user[1]; } } /// <summary> /// Method to make sure that user's inputs are not malicious /// </summary> /// <param name="text">User's Input</param> /// <param name="maxLength">Maximum length of input</param> /// <returns>The cleaned up version of the input</returns> public static string InputText(string text, int maxLength) { text = text.Trim(); if (string.IsNullOrEmpty(text)) return string.Empty; if (text.Length > maxLength) text = text.Substring(0, maxLeng
Enter your code between "code block" :)
-
using System; using System.Configuration; using System.Web.UI.WebControls; using System.Security.Principal; using System.Xml; using Itools.Encryption; using System.Web; using System.Text; using System.Text.RegularExpressions; namespace Ashwin.DAL { /// <summary> /// Summary description for Util /// </summary> public class Util { //Design users //adriaanse.a //allinsmith.w private static readonly string whoami = "ashwin.k";//For testing - for cop ["westring.bd"] private const string encKey = "KFn2oZAwJHWFRbSXoaSlYjl5TADpyyt53rowhbVwH/M="; private const string encVector = "nb2dZEGWnzg8R1GZAuUkUQ=="; private static System.Collections.ICollection appSettings = ConfigurationManager.AppSettings; private static System.Configuration.ConnectionStringSettingsCollection connStrings = ConfigurationManager.ConnectionStrings; /// <summary> /// Returns the username without the domain of the current logged in user. /// </summary> /// <param name="User">Current logged in user, example CN\ashwin.k</param> /// <returns>Returns the username without the domain of the current logged in user. </returns> public static string GetSimpleUsername(IPrincipal User) { //setup user array to split username into domain and username #if DEBUG return whoami; #endif string[] user; // define which character is seperating fields char[] splitter = { '\\' }; //perform split user = User.Identity.Name.Split(splitter); //check to see if no domain exists for user if (user.Length < 2) { return user[0]; } else { return user[1]; } } /// <summary> /// Method to make sure that user's inputs are not malicious /// </summary> /// <param name="text">User's Input</param> /// <param name="maxLength">Maximum length of input</param> /// <returns>The cleaned up version of the input</returns> public static string InputText(string text, int maxLength) { text = text.Trim(); if (string.IsNullOrEmpty(text)) return string.Empty; if (text.Length > maxLength) text = text.Substring(0, maxLeng
using System;
using System.Configuration;
using System.Web.UI.WebControls;
using System.Security.Principal;
using System.Xml;
using Itools.Encryption;
using System.Web;
using System.Text;
using System.Text.RegularExpressions;namespace Ashwin.DAL
{
/// <summary>
/// Summary description for Util
/// </summary>
public class Util
{
//Design users
//adriaanse.a
//allinsmith.w
private static readonly string whoami = "ashwin.k";//For testing - for cop ["westring.bd"]
private const string encKey = "KFn2oZAwJHWFRbSXoaSlYjl5TADpyyt53rowhbVwH/M=";
private const string encVector = "nb2dZEGWnzg8R1GZAuUkUQ==";
private static System.Collections.ICollection appSettings = ConfigurationManager.AppSettings;
private static System.Configuration.ConnectionStringSettingsCollection connStrings = ConfigurationManager.ConnectionStrings;/// <summary> /// Returns the username without the domain of the current logged in user. /// </summary> /// <param name="User">Current logged in user, example CN\\ashwin.k</param> /// <returns>Returns the username without the domain of the current logged in user. </returns> public static string GetSimpleUsername(IPrincipal User) { //setup user array to split username into domain and username
#if DEBUG
return whoami;
#endif
string[] user;// define which character is seperating fields char\[\] splitter = { '\\\\' }; //perform split user = User.Identity.Name.Split(splitter); //check to see if no domain exists for user if (user.Length < 2) { return user\[0\]; } else { return user\[1\]; } } /// <summary> /// Method to make sure that user's inputs are not malicious /// </summary> /// <param name="text">User's Input</param> /// <param name="maxLength">Maximum length of input</param> /// <returns>The cleaned up version of the input</returns> public static string InputText(string text, int maxLength) { text = text.Trim(); if (string.IsNullOrEmpty(text)) return string.Empty; if (text.Length > maxLen
-
using System;
using System.Configuration;
using System.Web.UI.WebControls;
using System.Security.Principal;
using System.Xml;
using Itools.Encryption;
using System.Web;
using System.Text;
using System.Text.RegularExpressions;namespace Ashwin.DAL
{
/// <summary>
/// Summary description for Util
/// </summary>
public class Util
{
//Design users
//adriaanse.a
//allinsmith.w
private static readonly string whoami = "ashwin.k";//For testing - for cop ["westring.bd"]
private const string encKey = "KFn2oZAwJHWFRbSXoaSlYjl5TADpyyt53rowhbVwH/M=";
private const string encVector = "nb2dZEGWnzg8R1GZAuUkUQ==";
private static System.Collections.ICollection appSettings = ConfigurationManager.AppSettings;
private static System.Configuration.ConnectionStringSettingsCollection connStrings = ConfigurationManager.ConnectionStrings;/// <summary> /// Returns the username without the domain of the current logged in user. /// </summary> /// <param name="User">Current logged in user, example CN\\ashwin.k</param> /// <returns>Returns the username without the domain of the current logged in user. </returns> public static string GetSimpleUsername(IPrincipal User) { //setup user array to split username into domain and username
#if DEBUG
return whoami;
#endif
string[] user;// define which character is seperating fields char\[\] splitter = { '\\\\' }; //perform split user = User.Identity.Name.Split(splitter); //check to see if no domain exists for user if (user.Length < 2) { return user\[0\]; } else { return user\[1\]; } } /// <summary> /// Method to make sure that user's inputs are not malicious /// </summary> /// <param name="text">User's Input</param> /// <param name="maxLength">Maximum length of input</param> /// <returns>The cleaned up version of the input</returns> public static string InputText(string text, int maxLength) { text = text.Trim(); if (string.IsNullOrEmpty(text)) return string.Empty; if (text.Length > maxLen
Why? You have done nothing to help the OP learn the proper etiquette here. You have also added more useless space to the forum since not all of this code directly pertains to the question.
I know the language. I've read a book. - _Madmatt