Customer.svc Response Aborted
I'm working on a custom customer checkout process that creates a user and a customer/customer profile during the checkout process. After I was done with the checkout process, I deleted the user in the Administrator->Users UI. Now when I go to the Ecommerce-> Customers UI, the Customer.svc doesn't load and shows that the request was aborted. I've tried looking in the Error.Log files and nothing is referencing that there was an error in the service. Can anyone help me debug this issue?
What I have found so far, is that while these users were deleted, it leaves the Customer and Customer Profile records. It also leaves records referencing the userid and the customer profileid in the sf_user_profile_link table.
Hey Paul,
Sounds like you're in for a fun ride :)
Have you enabled logging for web services in the web.config ?
<
sources
>
<
source
name
=
"System.IO.Log"
switchValue
=
"Verbose, ActivityTracing"
>
<
listeners
>
<
add
name
=
"sdt"
type
=
"System.Diagnostics.XmlWriterTraceListener"
initializeData
=
"WCF_IOLog.e2e"
/>
<
add
name
=
"xml"
/>
</
listeners
>
</
source
>
<
source
name
=
"System.ServiceModel.MessageLogging"
switchValue
=
"Verbose, ActivityTracing"
>
<
listeners
>
<
add
name
=
"sdt"
type
=
"System.Diagnostics.XmlWriterTraceListener"
initializeData
=
"WCF_MessageLog.e2e"
/>
<
add
name
=
"xml"
/>
</
listeners
>
</
source
>
<
source
name
=
"System.ServiceModel.Activation"
switchValue
=
"Verbose, ActivityTracing"
>
<
listeners
>
<
add
name
=
"sdt"
type
=
"System.Diagnostics.XmlWriterTraceListener"
initializeData
=
"WCF_ActivationLog.e2e"
/>
<
add
name
=
"xml"
/>
</
listeners
>
</
source
>
<
source
name
=
"System.Runtime.Serialization"
switchValue
=
"Verbose, ActivityTracing"
>
<
listeners
>
<
add
name
=
"sdt"
type
=
"System.Diagnostics.XmlWriterTraceListener"
initializeData
=
"WCF_SerializationLog.e2e"
/>
<
add
name
=
"xml"
/>
</
listeners
>
</
source
>
<!--<
source
name
=
"System.IdentityModel"
>
<
listeners
>
<
add
name
=
"sdt"
type
=
"System.Diagnostics.XmlWriterTraceListener"
initializeData
=
"WCF_SerializationLog.e2e"
/>
<
add
name
=
"xml"
/>
</
listeners
>
</
source
>-->
<
source
name
=
"System.ServiceModel"
switchValue
=
"Verbose, ActivityTracing"
propagateActivity
=
"true"
>
<
listeners
>
<
add
name
=
"sdt"
type
=
"System.Diagnostics.XmlWriterTraceListener"
initializeData
=
"WCF_ServiceModelLog.e2e"
/>
<
add
name
=
"xml"
/>
</
listeners
>
</
source
>
</
sources
>
<
sharedListeners
>
<
add
name
=
"xml"
type
=
"System.Diagnostics.XmlWriterTraceListener"
initializeData
=
"c:\log\Traces.e2e"
/>
</
sharedListeners
>
Are some digging through the error log the error is happening on the CustomerEmail property of the Customer object.
Here's why:
1) The CustomerEmail is dependent upon the CustomerProfile which then has a property for a User of UserProfile type. This is returning the Email property of the User.
2) In this case, the UserProfile is referencing the SitefinityProfile of the User attached to the Customer.
3) After adding in some records into the database to reference the user again, and creating the SitefinityProfile for the user it appears to have cleared that error.
4) Once again, I deleted the user and receive the same error.
So I'm finding an issue in the case I want to delete users in the backend if they are attached to a particular customer it's going to blow up my Customer management page in the backend.
Hello Paul,
I'm pasting here the response from the support ticket:
The way customers are implemented right now, you won't be able to have a customer without a user connected to it. Actually, Customers is just a role for users, which means that there is no separate membership provider for customers and if you delete the User connected to the Customer, then it would always throw errors because of the UserProfile connected to that particular customer.
What's more, even if you could delete the User, then the Customers wouldn't be able to log in anymore.