.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Throwing Validation Error

Posted By:      Posted Date: September 10, 2010    Points: 0   Category :Sql Server
Hi  While i am trying the access the excel file its throwing validation error.When i investigated the data type of all columns one column had a data type double-precision float[DT_R8] rather than Unicode string[DT_WSTR].Due to this my package is failling ,please advise me to resolve this issue.  

View Complete Post

More Related Resource Links

Localize framework message from xml validation error


I need to validate an XML through XSD. I am using XMLReader (with XmlReaderSettings and 

Validation_EventHandler to do it). Depend on users preference, I would like to change the output message generated by  Validation_EventHandler in french or english.

Any idea on how to perform this?





Error Handling: Throwing Custom Exception Types from a Managed COM+ Server Application


Exception handling semantics in .NET are based on type, so you can create custom exceptions that have their own properties and methods. In .NET, exceptions are first-class citizens, and since they're the built-in error handling mechanism, all .NET-compliant languages must support exceptions. In addition, COM+ services are available to .NET code as Enterprise Services, so you can leverage exceptions in your Enterprise Services design.In this article the author describes custom exceptions, throwing exceptions across COM interop boundaries, and working with Enterprise Services.

Bob DeRemer

MSDN Magazine March 2004

BDC Column validation error in DIP



I have created a content type which has a BDC column along with other columns.

This content type is used in a document library. When the user adds a new document of this content type the system is asking for the extra data required for this content type and I am using AJAX to store data in the BDC Column fields.

The adding process goes fine and I am able to check in the document

Now if I check out the document and open it to edit it, a message is shown on the top of the document saying ' Required Properties - To save to the server, correct the invalid or missing required properties' along with 'Edit Properties' button.

When I click on 'Edit Properties' DIP is opening up and the invalid column is not highlighted. After some trial and error I found out that the problem is with the BDC column. When the cut the data from BDC column and paste it again and click on 'Check Item' the error disappears and allows me to check in the document.


Did anyone face any problem like this before. If so please help me out

Also I am new to BDC so please bear with me if I am missing something obvious.



Rejected by custom validation error & ItemAdding



I believe this topic was discussed before in this forum, but I couldn't find it using the exact error I receive: "operation for file.doc was rejected by custom validation on the server"

When I try to add a new word document to my doc library, Word displays this error instead of my custom error message. I set properties.Cancel=true in ItemAdding of my EventHandler, because my validation fails. 

Is there any way to display user properties.ErrorMessage instead of this generic error message?


Binding of complex entity turns into validation error

consider classic example: Product and Category editing Product in dropdown Id of Category is selected - Category mapped as object with all fields empty except Id when submitting Product edit form - validation gives an error: "Category name is required" (I have Required attribute on Category Name property) How deal with such errors if I want to use built-in validation (if (!ModelState.IsValid))? Writing custom data binder which would fill all such id-only-objects with values from database comes to mind.upd: I did small research of mvc code and found out that validation happens before binding - so this solution would't work. Do you have any other solutions for this problem?

sslstream client certificate validation error

Hi,I have taken server and client program from MSDN2 for sslstream. in that code client certifiacte authetication is made false  i want to enable that and do the code i have done some modification to the code but is giving error "RemoteCertificateNotAvailable" and i think that its not getting the client certificate at server side.So please can any one help me to do client server program using sslstream in which client certificate also needs to be validated.I am attaching my modified code of MSDN2Server sideusing System;using System.Collections;using System.Net;using System.Net.Sockets;using System.Net.Security;using System.Security.Authentication;using System.Text;using System.Security.Cryptography.X509Certificates;using System.IO;namespace Examples.System.Net{    public sealed class SslTcpServer     {        static X509Certificate serverCertificate = null;        // The certificate parameter specifies the name of the file         // containing the machine certificate.        // The following method is invoked by the RemoteCertificateValidationDelegate.        public static bool ValidateClientCertificate(              object sender,              X509Certificate certificate,              X509Chain chain,              SslPolicyErrors sslPolicyErrors)        {            SslPolicyErrors errors = sslPolicyErrors;            if (errors != SslPolicyErrors.None)            {

External Backup keeps throwing error message

Hi all, I have been backing up the same 10 databases with differential backups on the daily biases for about a month and last night, one of the databases failed to back up with the following error messages: 112(error not found) [SQLSTATE 42000] (Error 3202) BACKUP DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013). The step failed. Would someone be able to let me know why this would happen just suddenly? Thank you

Validation Error

I have a strange validation error that I sure can't figure out. I'd ignore it, but I'm ending up with a ">" char as the first char rendered in the page. Anybody see anything wrong with this markup? The validation error seems to be on the very first "<table>" tag (in bold). Thanks!<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="DashboardII._Default" %><%@ Register Assembly="System.Web.DataVisualization, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %><asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"></asp:Content><asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"><div> <table> <tr> <td style="width:80%"> <asp:Chart ID="Chart1" runat="server" Height="296px" Width="700px" ImageLocation="~/TempImages/ChartPic_#SEQ(300,3)" Palette="BrightPastel" imagetype=&qu

XML Signature xsd and Validation Error: Wildcard '##any' allows element causes the content model t

Hello,I'm trying to generate WCF client from Customer's WCF Service which has XML Signature options enabled.When trying to generate client proxy using svcutil I get following errors: Microsoft (R) Service Model Metadata Tool [Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.2152] Copyright (c) Microsoft Corporation. All rights reserved. Attempting to download metadata from 'http://donex:51343/WebServices /Service.svc' using WS-Metadata Exchange or DISCO. Error: There was a validation error on a schema generated during export: Source: Line: 1 Column: 13464 Validation Error: Wildcard '##any' allows element 'http://www.w3.org/2000/09/ xmldsig#:HMACOutputLength', and causes the content model to become ambiguous. A content model must be formed such that during validation of an element informati on item sequence, the particle contained directly, indirectly or implicitly ther ein with which to attempt to validate each item in the sequence in turn can be u niquely determined without examining the content or attributes of that item, and without any information about the items in the remainder of the sequence. Error: There was a validation error on a schema generated during export: Source: Line: 1 Column: 14410 Validation Error: Wildcard '##any' allows element 'http://www.w3.org/2000/09/ xmldsig#:XPath', and cau

WebFaultException throwing a "not handled by user code" error and returning an HTTP 500 to the clien

I am trying to return a BadRequest and simple message when implentation throws an error in a WCF REST service, but the WebFaultExcption itself is throwing an exception and returning an HTTP 500 instead. Any ideas on why this might be happening? Here is a short code snippet: [WebDispatchFormatter] [WebHelp(Comment="Initiate an immediate or callback appoinment request")] [WebInvoke(UriTemplate = "InitiateContact", Method = Verbs.Post)] public string InitiateContact(AppointmentRqst rqst) {      string ret = string.Empty;      rqst.DeviceId = Helper.GetHttpAuthHdrDeviceId();      try      {          ret = impl.InitiateContact(rqst);      }      catch (Exception ex)      {          throw new WebFaultException<string>(ex.Message, HttpStatusCode.BadRequest);      }      return ret; }

An error has occurred while trying to access the license validation key file. Please reinstall SQL S

I'm getting this error following installing SQL 2008 on a Windows 2008 R2 OS when trying to open SQL studio, can anyone offer explanation why this is occurring ?  I have installed SQL 2008 SP1. I see many others have also had this issue but cannot find a documented solution and/or confirm reason as to why it occurs.

Profile page throwing an error after adding some "ask me about" tags

After adding some "ask me about" tags my profile page is throwing an error. To be more precise the AskMeAbout WebPart ist throwing a thread aborted exception and I don't understand the reason for this error. After removing the tags the sites works again. Some tags work but after trying some other tags the profile page is broken again. Unhandled exception caught during execution of Microsoft.SharePoint.Portal.PageBase::ErrorHandler(). Exception information: Exception information: Microsoft.SharePoint.WebPartPages.WebPartException: Thread was being aborted. ---> System.Threading.ThreadAbortException: Thread was being aborted. at Microsoft.SharePoint.Portal.WebControls.AskMeAboutWebPart.RenderValues(HtmlTextWriter writer, Int32 startIndex, Int32 endIndex) at Microsoft.SharePoint.Portal.WebControls.AskMeAboutWebPart.RenderWebPart(HtmlTextWriter writer) at Microsoft.SharePoint.WebPartPages.WebPart.Render(HtmlTextWriter writer) at Microsoft.SharePoint.WebPartPages.SPChrome.RenderPartContents(HtmlTextWriter output, WebPart part) - -- End of inner exception stack trace --- at Microsoft.SharePoint.WebPartPages.SPChrome.RenderPartContents(HtmlTextWriter output, WebPart part) at Microsoft.SharePoint.WebPartPages.SPChrome.RenderWebPart(HtmlTextWriter output, WebPart part) at Microsoft.SharePoint.WebPartPages.WebPartZone.RenderZoneCell(HtmlTex

List data validation failed error checking in dockument and uploading to library.

If I upload a document to the "vanilla" Document Library at the root site (I have not created sub sites yet, we are in the testing phase), the document does get uploaded but the following error appears: Error List data validation failed.   Troubleshoot issues with Microsoft SharePoint Foundation. Correlation ID: 0928c39a-f2d7-4ce6-8057-62cc01c6a951 Date and Time: 6/16/2010 5:27:58 PM Go back to site -------------------------------------------------------------------------- The doc has uploaded but is automatically checked out to me I am logged on as the ADMINISTRATOR Account Now if I try and discard the check out, it will fail as there is no original checked in version. If I try and click Check in, then the same error appears Help

Token-based server access validation failed with an infrastructure error

Hi We have a new Win 2008 Enterprise x64 server running SQL 2008When we try to connect to the server using Windows Authentication, from a user account which is a domain administrator, we get the following message:"Token-based server access validation failed with an infrastructure error"What needs to be configured here for this to work ?ThanksBruce

Validation.Error giving strange behavior

I'm seeing some weird behavior with the Validation.Error attached event. I have a textbox bound to an object that implements the IDataErrorInfo interface. The textbox subscribes to the Validation.Error event. What is weird is that when you put the text box into an invalid state, the Validation.Error event gets triggered twice. Under .NET 3.5, the first time ValidationErrorEventArgs.Action == Removed. The second time ValidationErrorEventArgs.Action == Added. Under .NET 4, it's reversed. The first time ValidationErrorEventArgs.Action == Added. The second time ValidationErrorEventArgs.Action == Removed. Why would it be called twice and why would it work differently under .NET 3.5 and .NET 4? I'm trying to implement a validation summary control similar to the one from ASP.NET. There is a solution here: http://codeblitz.wordpress.com/2009/05/12/wpf-validation-summary-control/ but it doesn't work under .NET 4 because in order for it work work, when you put a control into an invalid state, the last call to the Validation.Error event has to be with ValidationErrorEventArgs.Action == Added. Here is my code:   <Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:WpfApplicatio

AjaxToolkit's CascadingDropDown control is throwing Method Error 404 in Hybrid system environment (

Hi Experts, We have an Asp.net web application, which is deployed in shared hosting environment. On shared hosting environment initial request to this web application is handled by Linux server and then based on the requested page the Linux server is redirecting request to web server on windows OS. Now, in our web application, we have used ajaxToolkit's CascadingDropDown control to populate three levels of categories. In the hybrid system described above, the CascadingDropDown control is throwing Method Error 404. I would appreciate if some body can guide on how to resolve this issue. The sample of code snap shot is mentioned below. ********************************************************************* Aspx file. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ <asp:DropDownList ID="ddlMajorLevelCategory" runat="server" Width="250px" ToolTip="Select Major Level Category" TabIndex="1"                            SkinID="h6BlueArial"> </asp:DropDownList>   <ajaxToolkit:CascadingDropDown ID="ccMajorCategory" runat="server" TargetControlID="ddlMajorLevelCategory" Category="M" PromptText=&qu

Validation error: This property can not be set to a null value [updated with test case!]

Hi, In a dynamic data web application, I get a validation error on a non-null nvarchar(50) column in ListDetails.aspx, even though I have entered a value which should be accepted. The validation error is: "This property cannot be set to a null value.". I can not reproduce this on northwind/adventureworks. Any ideas? UPDATE: I have created a complete test case: http://printf.no/DynamicDataBugTest.zip (The archive was scanned with the latest AVG definitions before uploading to my private secure dedicated FreeBSD server) The test case contains: One Dynamic Data Web App project One MS SQL Server 2005 database backup which contains a single table with three columns One screenshot showing how the error manifests itself I am fairly convinced now that this is a reproducible DD bug. -Andreas
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend