.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

Why is ParseXPathExpression throwing a Floating-point invalid operation? (re: WinDbg)

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :.NET Framework

I'm a software developer working for the federal government and we use a third party product that we are suddenly having problems with.  The product worked perfect on Friday but after the weekend it no longer works.  (ie. the application/process starts but nothing appears on screen and it appears to hang, etc)

I've never really used WinDbg but I'm trying to learn but looks like MS.Internal.Xml.XPath.XPathParser.ParseXPathExpresion is throwing a Floating-point invalid operation exception.  (0xc0000090)

I've stepped through the code (with WinDbg) and here is the managed stack trace when the exception is first thrown:

001EF98C 01D3BD83 System_Xml!MS.Internal.Xml.XPath.XPathParser.ParseXPathExpresion(System.String)+0x23
001EF9A0 01D3B301 System_Xml!MS.Internal.Xml.XPath.QueryBuilder.Build(System.String, Boolean, Boolean)+0x21
001EF9B8 01D3B2B7 System_Xml!MS.Internal.Xml.XPath.QueryBuilder.Build(System.String, Boolean ByRef)+0xf
001EF9C4 01D3B24A System_Xml!System.Xml.XPath.XPathExpression.Compile(System.String, System.Xml.IXmlNamespaceResolver)+0x2a
001EF9E0 01D3B200 System_Xml!System.Xml.XPath.XPathNavigator.Select(System.String)+0x10
001EF9EC 01D3AED2 System_Xml!System.Xml.XmlNode.SelectNodes(System.String)+0x32
001EFA00 01D309C4 TiS_TisCommon!TiS.TisCommon.Configuration.BaseConfigStorage.LoadConfigSections()&#

View Complete Post

More Related Resource Links

Invalid Floating Point operation when used with group by



This is related to a question I asked in the forum before and it looks like it is not handling the negative numbers within the log expression. Please let me know.



declare @insurance table


groupid int,

classid varchar(20),

creditamt varchar(20),

debitamt varchar(20),

insuraceflag varchar(30)




 ;with cte as


select groupid,classid,creditamt,debitamt,ROW_NUMBER() over (partition by GroupId order by ClassId ) as rn from @insurance


 cte1 as


select t.GroupId,t.debitamt,t1.Amt from 

(select * from cte where rn = 1)t

inner join (select GroupId,exp(SUM(LOG(CAST(isnull(creditamt,debitamt) as decimal(8,4))) )) as Amt from cte where rn <> 1 group by GroupID)t1 on t.GroupID = t1.GroupID


 select * from cte1 -- this bombs when the inside log expression is NEGATIVE or ZERO.


An invalid floating point operation occurred


why do i get an error while running this command

select (POWER((0.1935 /-0.0972 ),0.5) - 1 )

and what is the solution for this

An exception occurred during the operation, making the result invalid

Hi I am using WCF services with WPF, both are .net 4 versions. I am calling asynchronously, During method calls, sometimes I get the following error Void RaiseExceptionIfNecessary()---An exception occurred during the operation, making the result invalid. Check InnerException for exception details. at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() I tried alot to find the reason , but unable to find as it is unpredictable and inconsistent. Seeking for kind help from WCF guruzzz... Regards Zee

String.Format rounding down floating point number


Hi, I'm having an issue with String.Format, can somebody tell me if it's something I'm doing.


I'm using C# 2.0 I have code which looks a little bit like this:


Code Snippet

string result;

float floatToConvert = 10780503.000000f;


result = String.Format("{0:0,0}",floatToConvert);



Now I would expect result to have a value of "10,780,503" after this line of code, but it doesn't it has a value of "10,780,500"...


If however I do this:


Code Snippet

string result;

float floatToConvert = 10780503.000000f;

Sharepoint 2010 Configuration Wizard Failed- Invalid Operation was thrown



I installed SharePoint 2010 Standard on a Server with Windows 2008 Service Standard SP2 64bit OS. When I run the Configuraton Wizard it fails and the following message appears:

An exception of type System.Invalid OperationException was Thrown.Additional exception information: Cannot start service c2wts on computer.

the details are:

System.InvalidOperationException: Cannot start service c2wts on computer '.'. ---> System.ComponentModel.Win32Exception: The service did not respond to the start or control request in a timely fashion
   --- End of inner exception stack trace ---
   at System.ServiceProcess.ServiceController.Start(String[] args)
   at Microsoft.SharePoint.Win32.SPAdvApi32.StartService(String strServiceName)
   at Microsoft.SharePoint.Administration.SPWindowsServiceInstance.Start()
   at Microsoft.SharePoint.Administration.SPWindowsServiceInstance.Provision(Boolean start)
   at Microsoft.SharePoint.Administration.Claims.SPWindowsTokenServiceInstance.Provision()
   at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.InstallServiceInstanceInConfigDB(Boolean provisionTheServiceInstanceToo, String serviceInstanceRegistryKeyName, Object sharepointServiceObject)
   at Microsoft.SharePoint.PostSetupConfigur

Quad-precision floating point in .NET?

When does Microsoft plan to add quad-precision floating support to its .NET CTS data types (such as IEEE 754 binary128)? I.e. when is it going to become available to .NET C#, C++, etc.? I have published a WP7 calculator app, and I am currently working on an enhanced scientific mode in landscape display. Currently, the only available floating point is float and double; hence, I have a maximum of 15 digits precision available using double.

While double precision (theoretically) is all anyone ever needs, in a competitive sense, that's not true. Microsoft supports 32 significant digits in the scientific mode of its Windows calculator, presumably because it's written using the unmanaged C++ quad-precision library. More importantly, other competitive platforms support more than double precision.  Rgardless of any theoretical arguments about how someone may never need to use more than double precision, if quad precision is supported elsewhere, for practical, competitive-product reasons .NET should support it too for WP7 apps.

The Decimal structure is not adequate for many reasons:

- Decimal was intended only for financial calculations where a loss of precision during rounding operations is unacceptable.
- Decimal is much (much) slower than double for most operations, primarily because double operations are done in binary,

learn basic about share point.

This learn basic about share point.

how to set break point at inline code

I set the element height value by using inline code 
<%# Eval("s") %>
where "s" is the variable declared in page load event. when i run the application it don't set the height. 
Is there any way, i can set break point into .aspx file. i mean how i can check if my Eval("s") get the value.  

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is no



 I keep getting the following error. I also added time out parameter in the connection stirng and it still did not help. Has any one faced similar issues.

Thanks in adavance.

Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.


Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException (0x80131904): Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.]

A lengthy operation in an ASP.NET web service


I've built an ASP.NET web service with .NET 2.0 (an asmx file). I invoke a web service method using Ajax. The method takes a substantial amount of time to execute (5 minutes to 1 hour). I believe it's not a good idea to "hang" the web request for so long.
I'm wondering if the web service method could spawn an additional process which in turn would execute the lengthy operation and notify the web service once the operation is completed.
Are there any good practices regarding this kind of functionality?


ToggleDebugCompilation fails trying to perform "an unauthorised operation"



We're having a problem with the Visual Studio 2008 RTW version of the web deployment projects on a colleagues machine. The project works fine if I run it on my machine, but when he tries to run it on his machine he gets:

<SNIP : Most output removed>
  Task "Exec"
    if exist ".\TempBuildDir\" rd /s /q ".\TempBuildDir\"
  Done executing task "Exec".
  Using "ToggleDebugCompilation" task from assembly "C:\Program Files\MSBuild\Microsoft\WebDeployment\v9.0\Microsoft.WebDeployment.Tasks.dll".
  Task "ToggleDebugCompilation"
    Updating Web.config <compilation> element debug attribute to 'True'.
    C:\Program Files\MSBuild\Microsoft\WebDeployment\v9.0\Microsoft.WebDeployment.targets(639,7): error : Attempted to perform an unauthorized operation.
    C:\Program Files\MSBuild\Microsoft\WebDeployment\v9.0\Microsoft.WebDeployment.targets(639,7): error MSB4018: The "ToggleDebugCompilation" task failed unexpectedly.
    C:\Program Files\MSBuild\Microsoft\WebDeployment\v9.0\Microsoft.WebDeployment.targets(639,7): error MSB4018: System.ArgumentNullException: Parameter "message" cannot be null.
    C:\Program Files\MSBuild\Microsoft\WebDeployment

Invalid length for a Base-64 char array for my coding in ASP.net C#. How to solve it ?


Hi Friends ,

I have done encrypted password and decode but i got error  like  this  " Invalid length for a Base-64 char array" .

Pls help . Thanks


psswd = txtPassword.Text;

pwed = base64Decode(psswd);

public string base64Decode(string sData)
            System.Text.UTF8Encoding encoder = new System.Text.UTF8Encoding();
            System.Text.Decoder utf8Decode = encoder.GetDecoder();
            byte[] todecode_byte = Convert.FromBase64String(sData);
            int charCount = utf8Decode.GetCharCount(todecode_byte, 0, todecode_byte.Length);
            char[] decoded_char = new char[charCount];
            utf8Decode.GetChars(todecode_byte, 0, todecode_byte.Length, decoded_char, 0);
            string result = new String(decoded_char); return result;

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

WCF Authentication per Operation


I have a WCF service I'm hosting via IIS. I'm using wsHttp with ClientCredentialType UserName. The service is working just as it should, and authenticating each operation. My propblem is that I would like to expose one of my service operations without UserName authentication, no auth at all. Is it possible once a services clred type has been applied administrativly?

show data in grid view error Arithmetic operation resulted in an overflow.



i have a table there is 17 columns in 17 column 3 are number and other are varchar . when i try to display all data of that column error occures.

one more intersting think is when i try to display 6 column then grid show there data an no more error occures. 

when i run my project this error occures in grid view

Arithmetic operation resulted in an overflow. 

Error "user does not have permission to perform this operation" with User Instance = True.


I setup SQL Server 2005 / SQL Express. All works fine in SQL Server 2005.

I am connecting to a SQL Database from VS 2005,  Tools/Connect to Database. I set the Data Source to "Microsoft SQL Server Database File (SqlClient)" (meaning SQL Server Express) and User Instance = True, and Integrated Security = True.

The above is working successfully on all machines except my Laptop. On my Laptop, I am getting this error "user does not have permission to perform this operation". On my Laptop, if I change User Instance = False, it works fine. Also, If I connect to SQL Server 2005 it works fine only if User Instance = False.

I tried all kind of security changes, nothing worked. For example, I setup Everyone as Full Control for the Folder and the MDF File of SQL Server. I gave my user ID as sysadmin role in SQL Server Express. Also, I enabled creating User Instance form SQL Server Express, Nothing is working.

Appreciate your help.


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