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


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> C# >> Post New Question Subscribe to Interview Questions

Why this Error comes during compilation of our ASP page ?

Parser Error Message: It is an error to use a section registered as allowDefinition='MachineOnly' beyond machine.config.

Posted By :Srikanth     Posted Date :April 22, 2011    Points :40   Category :C# 
This happens because ,

In our web.config file we might have declared a section that is not configurable on our shared web hosting platform. So when we get this error we have to remove that part which is not supported in the web.config file.

You can also find related Interview Question to Why this Error comes during compilation of our ASP page ? Parser Error Message: It is an error to use a section registered as allowDefinition=''MachineOnly'' beyond machine.config.  below: 

You added a SharePoint Web part to page, and now, when you go to the page, get an error message. To get the page working again, what need to do?

  
Go to the page with the error and add

?Contents=1

to the end of the page's URL. If the URL already has a "?" then add this instead to the end of the URL:

&Contents=1

You will now see a list of all of the Web Parts on the page and can now delete the offending Web Part.

Here is an example for a site URL that ends in aspx:
http://.../default.aspx?Contents=1 (More...)

In WCF, while using one way contract, suppose a client invokes a method and the server while executing it, encounters an error. Will the error message propagate to the client or will the client ever know that there was an error on the server side ?

  
No, one-way operations cannot return values and any exception thrown on the service side will not make its way to the client. The client will never know whether there was an error or not ! (More...)

What does this error mean:
System.ArgumentOutOfRangeException: Index was out of range : Upgrading CRM 3.0

  
Error Message : "System.ArgumentOutOfRangeException: Index was out of range", occurs while upgrading Microsoft Dynamics CRM 3.0 to Microsoft Dynamics CRM 4.0

Solution : The problem occurs if an ampersand is in the subject of an activity that was created in a sales process or in a workflow rule. So, remove the ampersand.

To obtain this fix, use the Update Installation Files option during Microsoft Dynamics CRM 4.0 setup




For more details, visit http://kbalertz.com/Feedback.aspx?kbNumber=948917/ (More...)

Why do I get an error (CS1006) when trying to declare a method without specifying a return type?

  
If you leave off the return type on a method declaration, the compiler thinks you are trying to declare a constructor. So if you are trying to declare a method that returns nothing, use void. The following is an example: // This results in a CS1006 error public static staticMethod (mainStatic obj) // This will work as wanted public static void staticMethod (mainStatic obj) (More...)

What is the error in the following command?
DROP TABLE &TABLE_NAME;

  
Variable names should start with an alphabet. Here the table name starts with an '&' symbol. So it will give a compilation error. (More...)

Which contract is used to documented the view for error occurred in the service to client in wcf?

  
Fault Contract is used to documented the view for error occurred in the service to client in wcf (More...)

How to get @@ERROR and @@ROWCOUNT at the same time?

  
If you check @@Rowcount after Error checking statement it will give the result as 0 and if you check @@Recordcount before the error checking statement then @@Error will not return any value. To get @@error and @@rowcount at the same time, include both in a select query and store it in a local variable in a single query

SELECT @RowCount = @@ROWCOUNT, @ERRROR = @@ERROR 
(More...)

How to get @@error and @@rowcount at the same time?

  
If @@Rowcount is checked after Error checking statement then it will have 0 as the value of @@Recordcount as it would have been reset.
And if @@Recordcount is checked before the error-checking statement then @@Error would get reset. To get @@error and @@rowcount at the same time do both in same statement and store them in local variable.
SELECT @RC = @@ROWCOUNT, @ER = @@ERROR (More...)

How do you do error handling in SSIS?

  
When a data flow component applies a transformation to column data, extracts data from sources, or loads data into destinations, errors can occur. Errors frequently occur because of unexpected data values.

For example, a data conversion fails because a column contains a string instead of a number, an insertion into a database column fails because the data is a date and the column has a numeric data type, or an expression fails to evaluate because a column value is zero, resulting in a mathematical operation that is not valid.

Errors typically fall into one the following categories:

-Data conversion errors, which occur if a conversion results in loss of significant digits, the loss of insignificant digits, and the truncation of strings. Data conversion errors also occur if the requested conversion is not supported.
-Expression evaluation errors, which occur if expressions that are evaluated at run time perform invalid operations or become syntactically incorrect because of missing or incorrect data values.
-Lookup errors, which occur if a lookup operation fails to locate a match in the lookup table.

Many data flow components support error outputs, which let you control how the component handles row-level errors in both incoming and outgoing data. You specify how the component behaves when truncation or an error occurs by setting options on individual columns in the input or output.

For example, you can specify that the component should fail if customer name data is truncated, but ignore errors on another column that contains less important data.
(More...)

Is there any way to get the ORA error number (and/or description) for the errors that will fall into OTHERS?

  
Yes, you can use SQLCODE function to retrieve the error number and SQLERRM function to retrieve the error message.

For example, you could raise the error as follows:

EXCEPTION
WHEN OTHERS THEN
raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
END;
(More...)

How to get @@error and @@rowcount at the same time?

  
If @@Rowcount is checked after Error checking statement then it will have 0 as the value of
@@Recordcount as it would have been reset. And if @@Recordcount is checked before the error-checking statement then @@Error would get reset. To get @@error and @@rowcount at the same time do both in same statement and store them in local variable.
SELECT @RC = @@ROWCOUNT, @ER = @@ERROR (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


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