How to fix the "InnerException for exception details"?

How to fix this error say's  "InnerException for exception details"? I'm using VS2010-ultimate,  Silverlight 4 C#, windows XP sp3. Self hosted site iis v5.1. I tried to run the ready made solution provided by vs2010 then deploy it to the web using my own server (hosting) I, then was able to run the solution and able to login and out to the web. When i try to attach another project within the solution and made another database for that solution, and let the solution run to localhost then it was successful. So, I tried to deploy it to the web but error appear as above mentioned" Please help what to do.. Thanks!
Whing Dela CruzAsked:
Who is Participating?
 
Snarf0001Commented:
The exception object has an .InnerException property, which has the actual details of what went wrong.  What does it say?
0
 
Whing Dela CruzAuthor Commented:
When I try to access that to the Web an error says' "An exception occured during the operation, making the result invalid. Check InnerException for exception details."  There's no error in http://localhost:52878.. How can I fix this error?
0
 
Snarf0001Commented:
Yes, to stop the error, you need to know what caused it, which is stored in the .InnerException.
Is it showing you the error when debugging or are you writing it out on the web?

If in debugging mode, then click the "View Details" on the error popup and expand the errors until you see "InnerException" and see what the message is.


If you're catching and writing out the exception onto the webpage somewhere, then add something like the following:

catch(Exception ex)
{
   if(ex.InnerException != null)
   {
       --write out the inner exception here
   }
}
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
cubaman_24Commented:
Hello:
To get the first exception in stack, use Exception.GetBaseException();
Best regards
0
 
Whing Dela CruzAuthor Commented:
Hi guys, I need to know where should to put the command... I am new beginner of this project since my practice is in vb6. I am not sure what folder should I put it. I gues is inside the Web.config.. Guide me pls...  
0
 
cubaman_24Commented:
Hello ERWIIN:
Then you have a long reading journey!
http://msdn.microsoft.com/en-us/library/w16865z6.aspx
Find in this link detailed info about error handling in aspnet.
Best regards.
0
 
Whing Dela CruzAuthor Commented:
Thanks...
0
 
Ovidiu PACSACommented:
if anyone has this issues but for a xamarin iOS application on a Mac, open the Reference.cs file. You can find it in the Web Reference folder in your project's three. Check to see if the url that you entered when you added the web reference and the one from the Reference.cs file are a match. I am referring to the url from the constructor of the Reference.cs class.  Especially pay attention to the http vs https part.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.