Apr012010

free autologin web control for automatic login during development purposes

Published by Pete Celliers at 11:55 PM under c#

When we are in the process of development it could be quite a pain to login hundreds of times during the day

The following control would ease this process for you

1) download the dll

2) copy the dll into your bin directory

3) drag and drop the Dll onto your toolbox (when viewing a aspx file, press ctrl-alt-X)

4) Then drag and drop the control from the toolbox onto your login page (where you want to be able to quickly login by selecting a user)

Download the dll here

 



[KickIt] [Digg] [del.icio.us] [Facebook] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Post RSSRSS comment feed 2 Responses

Mar232010

a project with that name is already opened in the solution

Published by Pete Celliers at 1:38 PM under Errors

The following message a project with that name is already opened in the solution when you try to add -> existing project ... to your solution.
dependency : AnkhSvn

This is an problem with AnkhSvn for which the following work around works well:

be careful and please backup/make a copy of your solution file before proceeding:

open your solution file with notepad or similar and search for the reference to the existing project:
(mine looked as follows)

Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GraspTest", "GraspTest\GraspTest.csproj", "{28F01283-3324-4E3C-A1FE-C256F29130A6}"
EndProject

Just delete this entry and try again.

 



[KickIt] [Digg] [del.icio.us] [Facebook] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Post RSSRSS comment feed 0 Responses

Mar132010

understanding css blocks

Published by Pete Celliers at 9:14 PM under

The following shows how paragraphs and divs break the flow of text:

1. freetxt

paragraph 2.1 - display: block

freetxt
2. freetxt
division 1.1 with default block display
freetxt
The following shows how paragraphs and divs can be "display: inline" the keep the flow of text:
(carefully see how the red lines break the flow - they are setup as "display: block" )

freetext
division [display:inline]
freetext

paragraph [display:inline]

freetext
division [display:inline]

paragraph [display:inline]

division [display:inline]

paragraph [display:inline]

division [display:block]

paragraph [display:inline]

division [display:inline]
freetext

paragraph [display:inline]

paragraph [display:block]

division [display:inline]
freetext

paragraph [display:inline]

division [display:inline]
The following shows how floating divs work (DIV1 created before DIV2 etc)

left floats:
DIV1 [float: left]
DIV2 [float: left]
DIV3 [float: left]
DIV4 [float: left]

right floats:
DIV1 [float: right]
DIV2 [float: right]
DIV3 [float: right]
DIV4 [float: right]

mixed floats in diffrent orders:
DIV1 [float: left]
DIV2 [float: right]
DIV3 [float: left]
DIV4 [float: right]
DIV1 [float: right]
DIV2 [float: left]
DIV3 [float: right]
DIV4 [float: left]

not all floating:
DIV1 [float: left]
DIV2 [float: right]
DIV3 [float: none]
DIV4 [float: left or none] .. on a new line due to DIV3 not floating

too many mixed floats for 1 line:
DIV1 [float: left]
DIV2 [float: right]
DIV3 [float: left]
DIV4 [float: right]
DIV5 [float: left]
DIV6 [float: right]
DIV7 [float: left]
DIV8 [float: right]
DIV9 [float: left]
DIV10 [float: right]

Floats breaks (Clear: ....):
DIV1 [float: left]
DIV2 [float: right]
DIV3 [float: left; clear: right]
DIV4 [float: right]
DIV5 [float: left]

Floats breaks (Clear: ....):
DIV1 [float: left]
DIV2 [float: right]
DIV3 [float: left; clear: left]
DIV4 [float: right]
DIV5 [float: left]

Floats breaks (Clear: ....):
DIV1 [float: left]
DIV2 [float: right]
DIV3 [float: right; clear: right]
DIV4 [float: right]
DIV5 [float: left]

Floats breaks (Clear: ....): see
DIV1 [float: left]
DIV2 [float: right]

DIV3 [float: right; clear: left]

 

DIV4 [float: right]
DIV5 [float: left]

see http://www.w3.org/TR/REC-CSS1/ for more on CSS



[KickIt] [Digg] [del.icio.us] [Facebook] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Post RSSRSS comment feed 0 Responses

Mar092010

Source control with SVN

Published by Pete Celliers at 9:45 AM under

Some additional notes on SVN:

running it as a server:

Please follow below to troubleshoot the following errors:

when trying to view the https repository
OPTIONS of 'https://localhost/svn/.....' could not connect to server (https://localhost)


it seems that your localhost SVN server is not running.

try creating a service as follow:
click on "start" -> "run" -> type "cmd"

type the following - but change the paths as necessary:
sc create "svnservice" binPath= "\"C:\Program Files (x86)\VisualSVN Server\bin\svnserve.exe\" --service -r c:\Users\tempuser\Documents\SVNRepositories" DisplayName= "Subversion SVN service"  start= auto

you should see the following

[SC] CreateService SUCCESS

then simply start is as follows:

sc start "svnservice"

now you can access your repositories again with the following URL:

svn://localhost/myrepository

 



[KickIt] [Digg] [del.icio.us] [Facebook] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Post RSSRSS comment feed 0 Responses

Mar022010

create a folder if not exists

Published by Pete Celliers at 5:21 PM under c#

    string filename = @"c:\here\there\where\myname.txt";

    string dir = Path.GetDirectoryName(filename);
    if (!System.IO.Directory.Exists(dir))
        System.IO.Directory.CreateDirectory(dir);

 



[KickIt] [Digg] [del.icio.us] [Facebook] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Post RSSRSS comment feed 0 Responses

Mar022010

useful exceptions in c#

Published by Pete Celliers at 5:15 PM under

   

mscorlib

 

AbandonedMutexException

The exception that is thrown when one thread acquires a System.Threading.Mutex object that another thread has abandoned by exiting without releasing it.

AccessViolationException

The exception that is thrown when there is an attempt to read or write protected memory.

AmbiguousMatchException

The exception that is thrown when binding to a member results in more than one member matching the binding criteria. This class cannot be inherited.

AppDomainUnloadedException

The exception that is thrown when an attempt is made to access an unloaded application domain.

ApplicationException

The exception that is thrown when a non-fatal application error occurs.

ArgumentException

The exception that is thrown when one of the arguments provided to a method is not valid.

ArgumentNullException

The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method that does not accept it as a valid argument.

ArgumentOutOfRangeException

The exception that is thrown when the value of an argument is outside the allowable range of values as defined by the invoked method.

ArithmeticException

The exception that is thrown for errors in an arithmetic, casting, or conversion operation.

ArrayTypeMismatchException

The exception that is thrown when an attempt is made to store an element of the wrong type within an array.

ASSERT

 

BadImageFormatException

The exception that is thrown when the file image of a DLL or an executable program is invalid.

CannotUnloadAppDomainException

The exception that is thrown when an attempt to unload an application domain fails.

COMException

The exception that is thrown when an unrecognized HRESULT is returned from a COM method call.

ContextMarshalException

The exception that is thrown when an attempt to marshal an object across a context boundary fails.

CryptographicException

The exception that is thrown when an error occurs during a cryptographic operation.

CryptographicUnexpectedOperationException

The exception that is thrown when an unexpected operation occurs during a cryptographic operation.

CustomAttributeFormatException

The exception that is thrown when the binary format of a custom attribute is invalid.

DataMisalignedException

The exception that is thrown when a unit of data is read from or written to an address that is not a multiple of the data size. This class cannot be inherited.

DecoderFallbackException

The exception that is thrown when a decoder fallback operation fails. This class cannot be inherited.

DirectoryNotFoundException

The exception that is thrown when part of a file or directory cannot be found.

DivideByZeroException

The exception that is thrown when there is an attempt to divide an integral or decimal value by zero.

DllNotFoundException

The exception that is thrown when a DLL specified in a DLL import cannot be found.

DriveNotFoundException

The exception that is thrown when trying to access a drive or share that is not available.

DuplicateWaitObjectException

The exception that is thrown when an object appears more than once in an array of synchronization objects.

EncoderFallbackException

The exception that is thrown when an encoder fallback operation fails. This class cannot be inherited.

EndOfStreamException

The exception that is thrown when reading is attempted past the end of a stream.

EntryPointNotFoundException

The exception that is thrown when an attempt to load a class fails due to the absence of an entry method.

ExecutionEngineException

The exception that is thrown when there is an internal error in the execution engine of the common language runtime. This class cannot be inherited.

ExternalException

The base exception type for all COM interop exceptions and structured exception handling (SEH) exceptions.

FieldAccessException

The exception that is thrown when there is an invalid attempt to access a private or protected field inside a class.

FileLoadException

The exception that is thrown when a managed assembly is found but cannot be loaded.

FileNotFoundException

The exception that is thrown when an attempt to access a file that does not exist on disk fails.

FormatException

The exception that is thrown when the format of an argument does not meet the parameter specifications of the invoked method.

HostProtectionException

The exception that is thrown when a denied host resource is detected.

IdentityNotMappedException

Represents an exception for a principal whose identity could not be mapped to a known identity.

IndexOutOfRangeException

The exception that is thrown when an attempt is made to access an element of an array with an index that is outside the bounds of the array. This class cannot be inherited.

InsufficientMemoryException

The exception that is thrown when a check for sufficient available memory fails. This class cannot be inherited.

InvalidCastException

The exception that is thrown for invalid casting or explicit conversion.

InvalidComObjectException

The exception thrown when an invalid COM object is used.

InvalidFilterCriteriaException

The exception that is thrown in System.Type.FindMembers(System.Reflection.MemberTypes, System.Reflection.BindingFlags, System.Reflection.MemberFilter, System.Object) when the filter criteria is not valid for the type of filter you are using.

InvalidOleVariantTypeException

The exception thrown by the marshaler when it encounters an argument of a variant type that can not be marshaled to managed code.

InvalidOperationException

The exception that is thrown when a method call is invalid for the object's current state.

InvalidProgramException

The exception that is thrown when a program contains invalid Microsoft intermediate language (MSIL) or metadata. Generally this indicates a bug in the compiler that generated the program.

IOException

The exception that is thrown when an I/O error occurs.

IsolatedStorageException

The exception that is thrown when an operation in isolated storage fails.

KeyNotFoundException

The exception that is thrown when the key specified for accessing an element in a collection does not match any key in the collection.

MarshalDirectiveException

The exception that is thrown by the marshaler when it encounters a System.Runtime.InteropServices.MarshalAsAttribute it does not support.

MemberAccessException

The exception that is thrown when an attempt to access a class member fails.

MetadataException

 

MethodAccessException

The exception that is thrown when there is an invalid attempt to access a private or protected method inside a class.

MissingFieldException

The exception that is thrown when there is an attempt to dynamically access a field that does not exist.

MissingManifestResourceException

The exception thrown if the main assembly does not contain the resources for the neutral culture, and they are required because of a missing appropriate satellite assembly.

MissingMemberException

The exception that is thrown when there is an attempt to dynamically access a class member that does not exist.

MissingMethodException

The exception that is thrown when there is an attempt to dynamically access a method that does not exist.

MissingSatelliteAssemblyException

The exception that is thrown when the satellite assembly for the resources of the neutral culture is missing.

MulticastNotSupportedException

The exception that is thrown when there is an attempt to combine two delegates based on the System.Delegate type instead of the System.MulticastDelegate type. This class cannot be inherited.

NotFiniteNumberException

The exception that is thrown when a floating-point value is positive infinity, negative infinity, or Not-a-Number (NaN).

NotImplementedException

The exception that is thrown when a requested method or operation is not implemented.

NotSupportedException

The exception that is thrown when an invoked method is not supported, or when there is an attempt to read, seek, or write to a stream that does not support the invoked functionality.

NullReferenceException

The exception that is thrown when there is an attempt to dereference a null object reference.

ObjectDisposedException

The exception that is thrown when an operation is performed on a disposed object.

OperationCanceledException

The exception that is thrown in a thread upon cancellation of an operation that the thread was executing.

OutOfMemoryException

The exception that is thrown when there is not enough memory to continue the execution of a program.

OverflowException

The exception that is thrown when an arithmetic, casting, or conversion operation in a checked context results in an overflow.

PathTooLongException

The exception that is thrown when a pathname or filename is longer than the system-defined maximum length.

PlatformNotSupportedException

The exception that is thrown when a feature does not run on a particular platform.

PolicyException

The exception that is thrown when policy forbids code to run.

PrivilegeNotHeldException

The exception that is thrown when a method in the System.Security.AccessControl namespace attempts to enable a privilege that it does not have.

RankException

The exception that is thrown when an array with the wrong number of dimensions is passed to a method.

ReflectionTypeLoadException

The exception that is thrown by the System.Reflection.Module.GetTypes method if any of the classes in a module cannot be loaded. This class cannot be inherited.

RemotingException

The exception that is thrown when something has gone wrong during remoting.

RemotingTimeoutException

The exception that is thrown when the server or the client cannot be reached for a previously specified period of time.

RuntimeWrappedException

Wraps an exception that does not derive from the System.Exception class. This class cannot be inherited.

SafeArrayRankMismatchException

The exception thrown when the rank of an incoming SAFEARRAY does not match the rank specified in the managed signature.

SafeArrayTypeMismatchException

The exception thrown when the type of the incoming SAFEARRAY does not match the type specified in the managed signature.

SecurityException

The exception that is thrown when a security error is detected.

SEHException

Represents Structured Exception Handler (SEH) errors.

SerializationException

The exception thrown when an error occurs during serialization or deserialization.

ServerException

The exception that is thrown to communicate errors to the client when the client connects to non-.NET Framework applications that cannot throw exceptions.

StackOverflowException

The exception that is thrown when the execution stack overflows because it contains too many nested method calls. This class cannot be inherited.

SynchronizationLockException

The exception that is thrown when a method requires the caller to own the lock on a given Monitor, and the method is invoked by a caller that does not own that lock.

SystemException

Defines the base class for predefined exceptions in the System namespace.

TargetException

Represents the exception that is thrown when an attempt is made to invoke an invalid target.

TargetInvocationException

The exception that is thrown by methods invoked through reflection. This class cannot be inherited.

TargetParameterCountException

The exception that is thrown when the number of parameters for an invocation does not match the number expected. This class cannot be inherited.

ThreadAbortException

The exception that is thrown when a call is made to the System.Threading.Thread.Abort(System.Object) method. This class cannot be inherited.

ThreadInterruptedException

The exception that is thrown when a System.Threading.Thread is interrupted while it is in a waiting state.

ThreadStartException

The exception that is thrown when a failure occurs in a managed thread after the underlying operating system thread has been started, but before the thread is ready to execute user code.

ThreadStateException

The exception that is thrown when a System.Threading.Thread is in an invalid System.Threading.Thread.ThreadState for the method call.

TimeoutException

The exception that is thrown when the time allotted for a process or operation has expired.

TypeInitializationException

The exception that is thrown as a wrapper around the exception thrown by the class initializer. This class cannot be inherited.

TypeLoadException

The exception that is thrown when type-loading failures occur.

TypeUnloadedException

The exception that is thrown when there is an attempt to access an unloaded class.

UnauthorizedAccessException

The exception that is thrown when the operating system denies access because of an I/O error or a specific type of security error.

VerificationException

The exception that is thrown when the security policy requires code to be type safe and the verification process is unable to verify that the code is type safe.

WaitHandleCannotBeOpenedException

The exception that is thrown when an attempt is made to open a system mutex or semaphore that does not exist.

XmlSyntaxException

The exception that is thrown when there is a syntax error in XML parsing. This class cannot be inherited.

   

System

 

AuthenticationException

The exception that is thrown when authentication fails for an authentication stream.

CheckoutException

The exception that is thrown when an attempt to check out a file that is checked into a source code management program is canceled or fails.

ConfigurationException

The exception that is thrown when a configuration system error has occurred.

CookieException

The exception that is thrown when an error is made adding a System.Net.Cookie to a System.Net.CookieContainer.

HttpListenerException

The exception that is thrown when an error occurs processing an HTTP request.

InternalBufferOverflowException

The exception thrown when the internal buffer overflows.

InternalException

 

InvalidAsynchronousStateException

Thrown when a thread on which an operation should execute no longer exists or has no message loop.

InvalidCredentialException

The exception that is thrown when authentication fails for an authentication stream and cannot be retried.

InvalidDataException

The exception that is thrown when a data stream is in an invalid format.

InvalidEnumArgumentException

The exception thrown when using invalid arguments that are enumerators.

LicenseException

Represents the exception thrown when a component cannot be granted a license.

NetworkInformationException

The exception that is thrown when an error occurs while retrieving network information.

PingException

The exception that is thrown when a System.Net.NetworkInformation.Ping.Send or System.Net.NetworkInformation.Ping.SendAsync method calls a method that throws an exception.

ProtocolViolationException

The exception that is thrown when an error is made while using a network protocol.

SemaphoreFullException

The exception that is thrown when the System.Threading.Semaphore.Release method is called on a semaphore whose count is already at the maximum.

SettingsPropertyIsReadOnlyException

Provides an exception for read-only System.Configuration.SettingsProperty objects.

SettingsPropertyNotFoundException

Provides an exception for System.Configuration.SettingsProperty objects that are not found.

SettingsPropertyWrongTypeException

Provides an exception that is thrown when an invalid type is used with a System.Configuration.SettingsProperty object.

SmtpException

Represents the exception that is thrown when the System.Net.Mail.SmtpClient is not able to complete a System.Net.Mail.SmtpClient.Send or System.Net.Mail.SmtpClient.SendAsync operation.

SmtpFailedRecipientException

Represents the exception that is thrown when the System.Net.Mail.SmtpClient is not able to complete a System.Net.Mail.SmtpClient.Send or System.Net.Mail.SmtpClient.SendAsync operation to a particular recipient.

SmtpFailedRecipientsException

The exception that is thrown when e-mail is sent using an System.Net.Mail.SmtpClient and cannot be delivered to all recipients.

SocketException

The exception that is thrown when a socket error occurs.

UriFormatException

The exception that is thrown when an invalid Uniform Resource Identifier (URI) is detected.

WarningException

Specifies an exception that is handled as a warning instead of an error.

WebException

The exception that is thrown when an error occurs while accessing the network through a pluggable protocol.

Win32Exception

Throws an exception for a Win32 error code.

   

System.Configuration

 

ConfigurationErrorsException

The current value is not one of the System.Web.Configuration.PagesSection.EnableSessionState values.

ProviderException

The exception that is thrown when a configuration provider error has occurred. This exception class is also used by providers to throw exceptions when internal errors occur within the provider that do not map to other pre-existing exception classes.

   

System.Core

 

AssertionException

 

AssumptionException

 

EventLogException

Represents the base class for all the exceptions that are thrown when an error occurs while reading event log related information.

EventLogInvalidDataException

Represents the exception thrown when an event provider publishes invalid data in an event.

EventLogNotFoundException

Represents the exception that is thrown when a requested event log (usually specified by the name of the event log or the path to the event log file) does not exist.

EventLogProviderDisabledException

Represents the exception that is thrown when a specified event provider name references a disabled event provider. A disabled event provider cannot publish events.

EventLogReadingException

Represents an exception that is thrown when an error occurred while reading, querying, or subscribing to the events in an event log.

InstanceNotFoundException

The exception thrown to indicate that no instances are returned by a provider.

InstrumentationBaseException

Represents the base provider-related exception.

InstrumentationException

Represents a provider-related exception.

InvalidTimeZoneException

The exception that is thrown when time zone information is invalid.

InvariantException

 

LockRecursionException

The exception that is thrown when recursive entry into a lock is not compatible with the recursion policy for the lock.

PostconditionException

 

PreconditionException

 

SystemCore_EnumerableDebugViewEmptyException

 

TimeZoneNotFoundException

The exception that is thrown when a time zone cannot be found.

   

System.Data

 

ConstraintException

Represents the exception that is thrown when attempting an action that violates a constraint.

DataException

Represents the exception that is thrown when errors are generated using ADO.NET components.

DBConcurrencyException

The exception that is thrown by the System.Data.Common.DataAdapter during an insert, update, or delete operation if the number of rows affected equals zero.

DbException

The base class for all exceptions thrown on behalf of the data source.

DeletedRowInaccessibleException

Represents the exception that is thrown when an action is tried on a System.Data.DataRow that has been deleted.

DuplicateNameException

Represents the exception that is thrown when a duplicate database object name is encountered during an add operation in a System.Data.DataSet -related object.

EvaluateException

Represents the exception that is thrown when the System.Data.DataColumn.Expression property of a System.Data.DataColumn cannot be evaluated.

InRowChangingEventException

Represents the exception that is thrown when you call the System.Data.DataRow.EndEdit method within the System.Data.DataTable.RowChanging event.

InvalidConstraintException

Represents the exception that is thrown when incorrectly trying to create or access a relation.

InvalidExpressionException

Represents the exception that is thrown when you try to add a System.Data.DataColumn that contains an invalid System.Data.DataColumn.Expression to a System.Data.DataColumnCollection.

InvalidUdtException

Thrown when SQL Server or the ADO.NET System.Data.SqlClient provider detects an invalid user-defined type (UDT).

MissingPrimaryKeyException

Represents the exception that is thrown when you try to access a row in a table that has no primary key.

ModuleLoadException

 

ModuleLoadExceptionHandlerException

 

NoNullAllowedException

Represents the exception that is thrown when you try to insert a null value into a column where System.Data.DataColumn.AllowDBNull is set to false.

OdbcException

The exception that is generated when a warning or error is returned by an ODBC data source. This class cannot be inherited.

OleDbException

The exception that is thrown when the underlying provider returns a warning or error for an OLE DB data source. This class cannot be inherited.

OperationAbortedException

This exception is thrown when an ongoing operation is aborted by the user.

ReadOnlyException

Represents the exception that is thrown when you try to change the value of a read-only column.

RowNotInTableException

Represents the exception that is thrown when you try to perform an operation on a System.Data.DataRow that is not in a System.Data.DataTable.

SqlAlreadyFilledException

The System.Data.SqlTypes.SqlAlreadyFilledException class is not intended for use as a stand-alone component, but as a class from which other classes derive standard functionality.

SqlException

The exception that is thrown when SQL Server returns a warning or error. This class cannot be inherited.

SqlNotFilledException

The System.Data.SqlTypes.SqlNotFilledException class is not intended for use as a stand-alone component, but as a class from which other classes derive standard functionality.

SqlNullValueException

The exception that is thrown when the Value property of a System.Data.SqlTypes structure is set to null.

SqlTruncateException

The exception that is thrown when you set a value into a System.Data.SqlTypes structure would truncate that value.

SqlTypeException

The base exception class for the System.Data.SqlTypes.

StrongTypingException

The exception that is thrown by a strongly typed System.Data.DataSet when the user accesses a DBNull value.

SyntaxErrorException

Represents the exception that is thrown when the System.Data.DataColumn.Expression property of a System.Data.DataColumn contains a syntax error.

TypedDataSetGeneratorException

The exception that is thrown when a name conflict occurs while generating a strongly typed System.Data.DataSet.

VersionNotFoundException

Represents the exception that is thrown when you try to return a version of a System.Data.DataRow that has been deleted.

   

System.Data.Entity

 

EntityCommandCompilationException

Represents errors that occur during command compilation; when a command tree could not be produced to represent the command text.

EntityCommandExecutionException

Represents errors that occur when the underlying storage provider could not execute the specified command. This exception usually wraps a provider-specific exception.

EntityException

Represents Entity Framework-related errors that occur in the EntityClient namespace. The EntityException is the base class for all Entity Framework exceptions thrown by the EntityClient.

EntitySqlException

Represents errors that occur when parsing Entity SQL command text. This exception is thrown when syntactic or semantic rules are violated.

InternalMappingException

 

InvalidCommandTreeException

The exception that is thrown to indicate that a command tree is invalid.

MappingException

The exception that is thrown when mapping related service requests fail.

MetadataException

The exception that is thrown when metadata related service requests fails.

ObjectNotFoundException

The exception that is thrown when an object is not present.

OptimisticConcurrencyException

The exception that is thrown when an optimistic concurrency violation occurs.

ProviderIncompatibleException

The exception that is thrown when the underlying data provider is incompatible with the Entity Framework.

UpdateException

The exception that is thrown when modifications to object instances cannot be persisted to the data store.

   

System.Data.Linq

 

ChangeConflictException

Thrown when an update fails because database values have been updated since the client last read them.

DuplicateKeyException

Thrown when an attempt is made to add an object to the identity cache by using a key that is already being used.

ForeignKeyReferenceAlreadyHasValueException

Represents errors that occur when an attempt is made to change a foreign key when the entity is already loaded.

   

System.Data.Services

 

DataServiceException

Represents an instance of the System.Data.Services.DataServiceException class with a specified message that describes the error.

   

System.Web

 

DatabaseNotEnabledForNotificationException

The exception that is thrown when a SQL Server database is not enabled to support dependencies associated with the System.Web.Caching.SqlCacheDependency class. This class cannot be inherited.

HostingEnvironmentException

 

HttpCompileException

The exception that is thrown when a compiler error occurs.

HttpException

Describes an exception that occurred during the processing of HTTP requests.

HttpParseException

The exception that is thrown when a parse error occurs.

HttpRequestValidationException

The exception that is thrown when a potentially malicious input string is received from the client as part of the request data. This class cannot be inherited.

HttpUnhandledException

The exception that is thrown when a generic exception occurs.

MembershipCreateUserException

The exception that is thrown when a user is not successfully created by a membership provider.

MembershipPasswordException

The exception that is thrown when a password cannot be retrieved from the password store.

SqlExecutionException

Defines a class for SQL execution exceptions in the System.Web.Management namespace.

TableNotEnabledForNotificationException

The exception that is thrown when a System.Web.Caching.SqlCacheDependency class is used against a database table that is not enabled for change notifications.

ViewStateException

Represents the exception that is thrown when the view state cannot be loaded or validated. This class cannot be inherited.

   

System.Web.Services

 

InvalidContentTypeException

 

InvalidDocumentContentsException

 

SoapException

Represents the exception that is thrown when an XML Web service method is called over SOAP and an exception occurs.

SoapHeaderException

The SOAP representation of a server error.

   

System.Xml

 

UpaException

 

XmlException

Returns detailed information about the last exception.

XmlSchemaException

Returns detailed information about the schema exception.

XmlSchemaInferenceException

Returns information about errors encountered by the System.Xml.Schema.XmlSchemaInference class while inferring a schema from an XML document.

XmlSchemaValidationException

Represents the exception thrown when XML Schema Definition Language (XSD) schema validation errors and warnings are encountered in an XML document being validated.

XPathException

Provides the exception thrown when an error occurs while processing an XPath expression.

XsltCompileException

The exception that is thrown by the Load method when an error is found in the XSLT style sheet.

XsltException

The exception that is thrown when an error occurs while processing an XSLT transformation.

 



[KickIt] [Digg] [del.icio.us] [Facebook] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Post RSSRSS comment feed 0 Responses

Mar022010

running shell commands from within c#

Published by Pete Celliers at 1:45 PM under c#

run shell commands:

 

        private static void RunCommand(string cmdname)
        {
            System.Diagnostics.Process p = new System.Diagnostics.Process();
            p.StartInfo.FileName = cmdname;
            p.Start();
        }

 

call it with the following command:

            RunCommand("cmd");  // opens a shell command prompt window



[KickIt] [Digg] [del.icio.us] [Facebook] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Post RSSRSS comment feed 0 Responses

Mar022010

Shortcut commands for consoles

Published by Pete Celliers at 1:39 PM under

Shortcut commands for consoles:

 

AD Domains and Trusts

 

 

domain.msc

   
Active Directory Management admgmt.msc
   
AD Sites and Services dssite.msc
   
AD Users and Computers dsa.msc
   
ADSI Edit adsiedit.msc
   
Authorization manager azman.msc
   
Certification Authority Management certsrv.msc
   
Certificate Templates certtmpl.msc
   
Cluster Administrator cluadmin.exe
   
Computer Management compmgmt.msc
   
Component Services comexp.msc
   
Configure Your Server cys.exe
   
Device Manager devmgmt.msc
   
DHCP Management dhcpmgmt.msc
   
Disk Defragmenter dfrg.msc
   
Disk Manager diskmgmt.msc
   
Distributed File System dfsgui.msc
   
DNS Management dnsmgmt.msc
   
Event Viewer eventvwr.msc
   
Indexing Service Management ciadv.msc
   
IP Address Manage ipaddrmgmt.msc
   
Licensing Manager llsmgr.exe
   
Local Certificates Management certmgr.msc
   
Local Group Policy Editor gpedit.msc
   
Local Security Settings Manager secpol.msc
   
Local Users and Groups Manager lusrmgr.msc
   
Network Load balancing nlbmgr.exe
   
Performance Monitor perfmon.msc
   
PKI Viewer pkiview.msc
   
Public Key Management pkmgmt.msc
   
QoS Control Management acssnap.msc
   
Remote Desktops tsmmc.msc
   
Remote Storage Administration rsadmin.msc
   
Removable Storage  ntmsmgr.msc
   
Removable Storage Operator Requests ntmsoprq.msc
   
Routing and Remote Access Manager rrasmgmt.msc
   
Resultant Set of Policy rsop.msc
   
Schema management schmmgmt.msc
   
Services Management services.msc
   
Shared Folders fsmgmt.msc
   
SID Security Migration sidwalk.msc
   
Telephony Management tapimgmt.msc
   
Terminal Server Configuration tscc.msc
   
Terminal Server Licensing  licmgr.exe
   
Terminal Server Manager tsadmin.exe
   
UDDI Services Management uddi.msc
   
Windows Management Instrumentation wmimgmt.msc
   
WINS Server manager winsmgmt.msc


[KickIt] [Digg] [del.icio.us] [Facebook] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Post RSSRSS comment feed 0 Responses

Mar012010

working with local databases in asp.net

Published by Pete Celliers at 5:56 PM under c# | SQL SERVER

make sure to copy the database in the APP_Folder

use the following connection string as template:

<add name="GuestbookConnectionString1" connectionString="Data Source=.\SQLEXPRESS; AttachDBFilename=|DataDirectory|\Guestbook.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"
   providerName="System.Data.SqlClient" />

 

 



[KickIt] [Digg] [del.icio.us] [Facebook] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Post RSSRSS comment feed 0 Responses

Mar012010

Sandcastle simplified (building CHM help files for .Net documentation)

Published by Pete Celliers at 4:38 PM under c#

step 1: download sandcastle from one of these 2 locations:

http://sandcastle.codeplex.com/releases/view/13873
http://www.microsoft.com/downloads/details.aspx?familyid=E82EA71D-DA89-42EE-A715-696E3A4873B2&displaylang=en

step 2: Do a straightforward installation

step 3: in visual studio, right-click on your project -> properties -> build -> scroll down and check "XML documentation file"

step 4: build your project

step 5: Run SandcastleGUI, find this under:
C:\Program Files\Sandcastle\Examples\generic 
C:\Program Files (x86)\Sandcastle\Examples\generic    (or for 64bit apps)

step 6: Add your assembly (the dll file which is normally in your application's "bin\debug" folder)

step 7: Also add the XML file which should normally be in your application's "bin\debug" folder)

step 8: Pick any name for your project (I picked "MyTestProject")

step 9: Click "build"

step 10: Locate your project under: (simply just find it that you know where it is)
C:\Program Files\Sandcastle\Examples
C:\Program Files (x86)\Sandcastle\Examples   (64bit)

step 11: Open a command prompt by:
click "Start" -> "run"  and type "cmd" <enter>

step 12: change your directory to where your product output reside:
(e.g. "cd  C:\Program Files\Sandcastle\Examples\MyTestProject\vs2005\chm" )
(where the "MyTestProject.hhc" file is located in my case)

step 13:  Convert the file:
"C:\Program Files\HTML Help Workshop\hhc.exe"  MyTestProject
"C:\Program Files (x86)\HTML Help Workshop\hhc.exe"  MyTestProject    (64 bit)

step 14: you should now have a MyTestProject.chm file



[KickIt] [Digg] [del.icio.us] [Facebook] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Post RSSRSS comment feed 0 Responses

Feb222010

IE view source not working

Published by Pete Celliers at 2:45 PM under Errors

For some reason this sometimes happen when your browsing history becomes too large.

Simply click "tools", "Delete Browsing History"

or shortcut to this ...... control shift delete 

 



[KickIt] [Digg] [del.icio.us] [Facebook] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Post RSSRSS comment feed 0 Responses

Feb222010

asp.net sitemap navigation simplified

Published by Pete Celliers at 2:30 PM under

First you create a Web.sitemap file (similar to below)
(I save mine in my App_Data Folder -right click add new ASP.Net Folder -> App_Data)

    <?xml encoding="utf-8" version="1.0" ?>
    <sitemap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
  <siteMapNode title="Main" description="login" url="~/login.aspx" roles="*" >
    <siteMapNode title="Admin" description="here" url="~/Admin/home.aspx" >
        <siteMapNode title="Reports" description="reports" url="~/Admin/Reports.aspx" />
    </siteMapNode>
      <siteMapNode title="Lab" description="here" url="~/lab/home.aspx" roles="lab" />
      <siteMapNode ...... />
      <siteMapNode ...... />
  </siteMapNode>
</sitemap>

Please note how I have nested the Reports under the Admin tab.

 

If you use a SiteMapDataSource the first thing you probably want to do is to add the ShowStartingNode="false"element to the tag.
In my case it would prevent showing the "Main" menu item (which I don't want - and you probably too)
The following tag should be on the page where you want the Menu (probably your master page)

  <asp:SiteMapDataSource ShowStartingNode="false" runat="server" 
ID="sitemapdatasource1" SiteMapProvider="default" />

Make sure you set Orientation element in your "asp:Menu" tag to "Horizontal.

Also try to set the "StaticEnableDefaultPopOutImage" element in your "asp:Menu" tag to ="false"   (this will stop the tips that point out which menus are expandable)

 Thus my tag looks as follows:

<asp:Menu ID="mnuMain" runat="server" DataSourceID="sitemapdatasource1"
 StaticEnableDefaultPopOutImage="false" Orientation="Horizontal" >


[KickIt] [Digg] [del.icio.us] [Facebook] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Post RSSRSS comment feed 0 Responses

Feb062010

static XML serialization class

Published by Pete Celliers at 2:13 PM under

//include the following:
using System.Xml.Serialization;

public static void Save(object StoorObject, string filename)
{
XmlSerializer
XS = new XmlSerializer(StoorObject.GetType());System.IO.StreamWriter SW = new System.IO.StreamWriter(filename);
XS.Serialize(SW, StoorObject);
SW.Close();
}

public static object Load(object StoorObject, string filename)
{
XmlSerializer XS = new XmlSerializer(StoorObject.GetType());
System.IO.StreamReader SW = new System.IO.StreamReader(filename);
object
o = XS.Deserialize(SW);
SW.Close();
return
o;
}

 



[KickIt] [Digg] [del.icio.us] [Facebook] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Post RSSRSS comment feed 0 Responses

Jan052010

Simple File Read to String and Write String To File C# Methods

Published by Pete Celliers at 1:20 AM under c#

using System.IO;

        public static string LoadFromFile(string filename)
        {
            StreamReader streamReader = new StreamReader(filename);
            string text = streamReader.ReadToEnd();
            streamReader.Close();
            return text;
        }

 

 

        public static void WriteToFile(string filename, string text)
        {
            StreamWriter streamWriter = new StreamWriter(File.Create(filename));
            streamWriter.Write(text);
            streamWriter.Close();
        }
 



[KickIt] [Digg] [del.icio.us] [Facebook] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Post RSSRSS comment feed 0 Responses

Dec142009

WorkFlow

Published by Pete Celliers at 9:39 AM under

Article removed ...

[KickIt] [Digg] [del.icio.us] [Facebook] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Post RSSRSS comment feed 0 Responses