Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: IIS7
I created a rest service which contains two methods one method to get the records from data base using Get verb.I'm successful in getting that.But while another method is post which is used to insert a record in to the table. But it is giving error response text as:
 
Here is the response given to my html file:
 
  <body>
 
    <div id="content">
 
      <p class="heading1">Request Error</p>
 
      <p>The server encountered an error processing the request. The exception message is 'An error occurred while updating the entries. See the inner exception for details.'. See server logs for more details. The exception stack trace is: </p>
 
      <p>   at System.Data.Entity.Internal.InternalContext.SaveChanges()
 
   at EmployeeService.EmployeeInfoService.InsertEmployee()
 
   at SyncInvokeInsertEmployee(Object , Object[] , Object[] )
 
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
 
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
 
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
 
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
 
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</p>
 
    </div>
 
  </body>
 
</html>
 

But I'm able to insert the record by not hosting in IIS.
Before i was unable to get the records also.I that time i searched the internet.They said you should add network service login to sql server and add suitable priveleges to the data base. After that i'm able to get the records and display in browser.But the insertion is not happening.Please suggest me the solution?
Posted 5-Apr-13 2:46am
Comments
ryanb31 at 5-Apr-13 8:09am
   
You need to get the inner exception details.
Sudheer Reddy K at 5-Apr-13 8:11am
   
How to get the inner exception in wcf service.
ryanb31 at 5-Apr-13 8:13am
   
Who's service is it? If it is not your service how can we tell you why it is not working? Contact whoever created the service and let them help you.
Sudheer Reddy K at 5-Apr-13 8:16am
   
Its my service only.I'm able to insert same without hosting in iis.But while hosting in iis it is giving the following response text.
ryanb31 at 5-Apr-13 8:17am
   
Yes, put logging on.
ThePhantomUpvoter at 5-Apr-13 8:13am
   
You would probably need to log the error.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 5 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100