Archive for the ‘Exception’ Category
Operand type clash: nvarchar(max) is incompatible with image
This error usually occurs when you are adding / updating a record on the database table with image/binary columns, and the value of that image column is null and you did not specify the data type of the parameter.
To resolve this issue you need to explicitly specify the datatype of that image/binary column because the default data type of the Sql parameter is varchar(string)
An error occurred while validating. HRESULT = ’80004005′
Posted by: admin in .NET, Deployment, Exception on July 27th, 2010
An error occurred while validating. HRESULT = ’80004005′, this error just came up when I’m trying to organize my .Net Project files in my Solution, I removed some of the projects and just use the compiled dll in referencing to the main Project. However, this error has appeared during rebuilding the setup project and it took some of my time to find the solution or the cause.
So, what I did was I removed all References from the Target Primary Output project and added them and rebuilding it again ,
that’s it no more errors.
“Thank you for reporting this issue. We were able to reproduce the problem and have identified the root cause. The problem is caused by cross-solution project reference between Solution1 and Solution2. From the attached project, the project “WindowsFormApplication1” in Solution2 references a project that is not in Solution2 (it references ClassLibrary1 from Solution1). To fix the error, the workaround is to copy the ClassLibrary1 project to Solution2 and re-add the reference to ClassLibrary1 within its own solution.
Project-to-project references only works within the same solution. If you have to split into two solutions and split the code for your class library into two projects, you need to also split the project that references the class library into two projects (one for each solution) in order to avoid project references outside the current solution.
I hope this helps.
Candy Chiang
Program Manager – Visual Studio”
For more information and explanation about this error just click here
Error 1001. Exception occurred while initializing the installation. System.IO.FileNotFoundException
Posted by: admin in .NET, Deployment, Exception on June 22nd, 2010
This error occurs when the CustomActionData has a supplied value,
Example:
The value of the CustomActionData is /TARGETDIR=[TARGETDIR], what you need to do is to update it to /TARGETDIR=”[TARGETDIR]\”
Export to Excel with error Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046}
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154.
This error occurs when the Microsoft office has not installed in the target machine.
You can export the file to csv.
Could not load file or assembly ‘ADODB,Version’
Solution 1:
go to a machine that has this folder and copy it (or the adodb.dll file if you have the folder) to the machines that cannot find the adodb file
Go into this folder and into the primary interop folder
copy this folders contents to the GAC (c:\windows\assembly)
your app should find the adodb.dll now
The following text is not allowed in this context:
This exception occurs when there is an extra string / character outside the element of the schema,
example:

A Generic error occured in GDI+
Source Control:
If this exception occurred in DataGrid Control, check if the displayed data is large. This might be the caused of the exception.
Value does not fall within the expected range.
Problem:
Value does not fall within the expected range.
This problem appears when using the web browser control in .net
Cause
Check and validate the supplied urlString, this should be a valid path.
Create Custom Exception
To create a custom exception what you need to do is create a class that inherits from ApplicationException then implement the constructor of the class, see below on how to do it..
Public class MyException
Inherit ApplicationException
Public Sub New()
Mybase.New(“Your exception message here”)
End Sub
End Class