When i insert,update,delete data asp.net through wcf service then come error

Posted by Shail12345 under Error and Solution on 11/10/2013 | Points: 10 | Views : 3351 | Status : [Member] | Replies : 2

The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.

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.ServiceModel.FaultException: The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.

Source Error:


Line 158:
Line 159: public string InsertStudentDetails(ServiceReference1.StudentDetails std_details) {
Line 160: return base.Channel.InsertStudentDetails(std_details);
Line 161: }
Line 162:




Responses

Posted by: Bandi on: 11/10/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Refer this link
http://sergecalderara.wordpress.com/2008/11/25/systemservicemodelfaultexception1-was-unhandled-by-user-code/
http://social.msdn.microsoft.com/Forums/en-US/dc5f5b05-ff50-48dc-bf17-b39e60575af1/wcf-error-the-server-was-unable-to-process-the-request-due-to-an-internal-error
http://msftplayground.com/2011/11/system-servicemodel-faultexception-the-server-was-unable-to-process-the-request-due-to-an-internal-error/

Turn on tracing and create a service log (.svcLog)...
http://msdn.microsoft.com/en-us/library/ms732023.aspx

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Shail12345, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Allemahesh on: 11/10/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
Dear Shail12345,

In your .config file define a behavior:

<configuration>
<system.serviceModel>
<serviceBehaviors>
<behavior name="debug">
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
...
</system.serviceModel>
</configuration>


Then apply the behavior to your service along these lines:

<configuration>
<system.serviceModel>
...
<services>
<service name="MyServiceName" behaviorConfiguration="debug">
</services>
</system.serviceModel>
</configuration>


You can also set it programmatically. See the below link.

http://stackoverflow.com/questions/2483178/set-includeexceptiondetailinfaults-to-true-in-code-for-wcf
http://blogs.msdn.com/b/paraswadehra/archive/2011/01/07/turn-on-includeexceptiondetailinfaults-while-connecting-to-a-wcf-service-from-a-client.aspx
http://forums.asp.net/t/1872655.aspx
http://dishasharepointworld.blogspot.in/2012/01/systemservicemodelfaultexception-server.html
http://consultrikin.wordpress.com/2013/06/26/crm-2011-web-page-error-the-server-was-unable-to-process-the-request-due-to-an-internal-error-either-from-servicebehaviorattribute-or-from-the-configuration-behavior/

Shail12345, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response