.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

NetDataContractSerialization throwing deserialization error

Posted By:      Posted Date: September 11, 2010    Points: 0   Category :WCF
hi, I have methods which return interface and some methods which accepts interface as parameters. I am trying to use Net DataContractSerializer but I am getting following error... The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:id. The InnerException message was 'Error in line 1 position 120. XML 'Element' 'http://tempuri.org/:id' does not contain expected attribute 'http://schemas.microsoft.com/2003/10/Serialization/:Type'. The deserializer has no knowledge of which type to deserialize. Check that the type being serialized has the same contract as the type being deserialized.'. Please see InnerException for more details. Please help me how to resolve this error.... If I use Netdatacontract attribute on Operation Contract, can i use DataContract and Datamember attribute on serializable class??? Thanks in advance...

View Complete Post

More Related Resource Links

Json Deserialization is giving error in IronPython



Have anyone tried json deserialization. When I tried:

>>> import json

>>> json.loads('["foo", {"bar":["baz", '"Test", 1.0, 2]}]')

I got following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files\IronPython 2.6 for .NET 4.0\Lib\json\__init__.py", line
 307, in loads
  File "C:\Program Files\IronPython 2.6 for .NET 4.0\Lib\json\scanner.py", line
42, in iterscan

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

Deserialization Error PropertyChangeEvent



I have a WebServiceHost which redrieves Data out of a . I have CommonDLL for all Properties. I used an ObjectBase Class with the inheritance in the common class. (with Implements InotifyPropertyChange and IDataErrorInfo). (This is Host side)

TheClient is a Web Padge which is showing data. Works fine. Except, if I do a ServiceReference update , I get a Compiler error: 

Public Property PropertyChangedEvent() As System.ComponentModel.PropertyChangedEventHandler Get Return Me.PropertyChangedEventField property 'PropertyChangedEvent' conflicts with a member implicitly declared for event 'PropertyChanged' in class 'ObjectBase'  in the Reference.vb

Now I was going to put more funcionallity to the Client ADD and UPDATE Data!

I recieving Now an Error Message while trying to add new Data:

 The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:Fahrz. The InnerException message was 'Error in line 1 position 369. 'Element' '_error' from namespace 'http://schemas.datacontract.org/.....Common' is not expected. Expecting element 'PropertyChangedEvent'.'. Please see InnerException for more details.

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

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; }

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

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

Throwing Validation Error

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.  

ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: An e

Need some help in figuring out this issue. The report I am trying to run returns over 14 million records when I get a count directly from the SQL server but I get an error after the report runs for a while. Below is the error message. Does SSRS have a limitation on the number of records? When I look at the memory utilization, it was at 79% utilization. Below is the server setup. Am not sure what else I can do to resolve this. Microsoft SQL Server 2008 (SP1) Processor : Intel Xeon CPU X5355 @ 2.66 GHz (2 procs)...64 bit Memory : 32 GB library!WindowsService_0!152c!09/09/2010-13:47:42:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: An error occurred within the report server database.  This may be due to a connection failure, timeout or low disk condition within the database., ; dbcleanup!WindowsService_0!152c!09/09/2010-13:47:42:: e ERROR: Sql Error in CleanOrphanedSnapshots: Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: An error occurred within the report server database.  This may be due to a connection failure, timeout or low disk condition within the database. ---> System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.    at System.Data.SqlClient.SqlConnection.O

Creating assembly throwing an error as system.directoryservices assembly is not in the SQL Server

Hi, I am trying to create an assembly (DLL file that created by C# ) which uses System.DirectoryServices assembly. When I try with following script Create ASSEMBLY Addresstype From 'C:\ActiDirectoryFunctions\ActiveDirectoryFunctions.dll' I am getting following Error Assembly 'ActiveDirectoryFunctions' references assembly 'system.directoryservices, version=, culture=neutral, publickeytoken=b03f5f7f11d50a3a.', which is not present in the current database. SQL Server attempted to locate and automatically load the referenced assembly from the same location where referring assembly came from, but that operation has failed (reason: 2(The system cannot find the file specified.)). Please load the referenced assembly into the current database and retry your request. From above error message, I learnt that System.DirectoryServices assembly is not in the SQL Server. I am using SQL SERVER 2005 SP2 and .Net Framework 3 is there in the machine How to manually add this assembly into this SQL Server Machine? Please let me know if you know Thank you, Raj Dreaming a world without any war in anywhere

ScriptResource.axd is throwing Server Error (500)


I have page that works ok on localhost, but it throws an error on server.  This pages was working ok before until I added additional grid to updatePanel.  Is there any limit how many grids you can have in updatePanel.  The error message is below. 

Message: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500
Line: 4723
Char: 21
Code: 0

Search Crawl status throwing error



We installed MOSS on our clients machine and Search has been problematic from the getgo.

When we have performed a forced restart on the osearch service (http://bruteforcesharepoint.blogspot.com/2009_04_01_archive.html), within the next couple of hours the crawler status wil be Error. But, search at this point is still working. Indexing basically stops and event errors are thrown in the event logs, but searching is still possible.

Here are the symptoms:

  • the Crawl status is 'Error'
  • /ssp/admin/_layouts/searchsspsettings.aspx (Search Settings page) is throwing a HTTP 403 error : The website declined to show this webpage.
  • I can still get to the Search Administration, and when I go to view the Content Sources or view the crawl logs specifically, I get the same 403 error.

When I try to 'Reset all crawled content', that is when Search dies. I get the message an exception error message.

When I try to stop the Office SharePoint Search service in Central Admin, it hangs in the Stopping state. It'll only come out of this if I go through the task manger and manually force the process to stop and then start it again using the stsadm -o osearch -action start -role index command then search starts again. And I have to reset the crawled content and perform a f

http://machinename:Portno/_vti_bin/lists.asmx throwing error


Hi All 

I am facing with this following error when i access http://machinename:Portno/_vti_bin/lists.asmx. [SharePoint server 2010], all other web services are accessible 


The top XML element 'string' from namespace 'http://schemas.microsoft.com/sharepoint/soap/' references distinct types Microsoft.SharePoint.SoapServer.SoapXml.SoapXmlElement and System.String. Use XML attributes to specify another XML name or namespace for the element or types.


Any help please.




winform throwing error while using .PDF printer as not as default printer.


My application having the printer functionality, using this user can print our reports in to .pdf format also. But if user doesn't selct the "Adobe PDF" as default printer then application giving the following error

 "Unable to find "Adobe PDF" resource files.

"C:\Documents and Settings\184625\Application Data\Adobe\Adobe PDF\Settings\test.joboptions"

Do you want to run the installer in repair mode?

It is working fine if user selected the "Adobe PDF" printer as default printer.can you please help me form this...

SharePoint Desinger is throwing error when trying to create a workflow in a site



Lately may be from only couple of days we are experiencing this issue. When we are trying to create a workflow on any SharePoint Site, or when I try to open an previously created workflow in SP designer, it is throwing me this error:

'The Server could not complete your request. Contact your Internet Service Provider or Web Server Administrator to make sure that the server has FrontPage Server Extensions or SharePoint Services installed'.

I was able to open or create workflows without any issue before and also there were no major changes done on that server lately.Please help me in fixing this.


Error throwing in Membership class


I want to check the user credentials of asp_net Membership database, for that While using the Membership class it is throwing "Operation is not valid due to the current state of the object".

Script task throwing Error

Hi experts,

While using FTP Connection source To SSIS package it failed to execute the script task, the following error code is coming .
at Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSFtpClientConnection90.SetWorkingDirectory(String currentDirectory)
at Microsoft.SqlServer.Dts.Runtime.FtpClientConnection.SetWorkingDirectory(String currentDirectory)
at ScriptTask_1ed91221546448d19ccaa9b0a91d8cb7.ScriptMain.Main()

.. I checked the FtP Connection , its working using msg box in the script i verified , Source is connected correctly.... Still it throwing Class 90 error.
Help me.. I am New to SSIS ...

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