Site Refresh not working for Business Apps

Hello everyone,

I can't seem to refresh the site cache from the BizApps on CS2007 RTM. I have the BizApps installed on a dedicated server and even with the hotfix KB 922068 applied I can't get the sitecache refresh feature working?

This is the error I get.

System.InvalidOperationException: There was an error generating the XML document. > System.InvalidOperationException: Instance validation error: '0' is not a valid value for System.Net.HttpStatusCode.

at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterList1.Write1_HttpStatusCode(HttpStatusCode v)

at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterList1.Write3_CacheRefreshFailureInformation(String n, String ns, CacheRefreshFailureInformation o, Boolean isNullable, Boolean needType)

at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterList1.Write4_Item(Object o)

End of inner exception stack trace

at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)

at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o)

at Microsoft.CommerceServer.Internal.SerializableExceptionSignature.ReflectProperty(XmlWriter xmlWriter, Object obj, SerializableProperty propertyInfo)

at Microsoft.CommerceServer.Internal.SerializableExceptionSignature.BuildDetailXml(Boolean useCustomErrors, SerializableExceptionInfo exceptionInfo, Exception exceptionToSerialize)

at Microsoft.CommerceServer.Internal.ExceptionSerializer.TrySerializeToSoapException(Boolean useCustomErrors, SerializableExceptionInfo exceptionInfo, Exception exceptionToSerialize, Boolean& shouldLogException)

at Microsoft.CommerceServer.Internal.ExceptionSerializer.TrySerializeToSoapException(SerializableExceptionInfo[] exceptionInfoList, Exception exceptionToSerialize, Boolean& shouldLogException)

at Microsoft.CommerceServer.Catalog.Internal.WebServiceUtility.PropagateOrLogException(Exception except)

at Microsoft.CommerceServer.Catalog.Internal.CatalogServerContextBase.RefreshSiteCache() I also have the following groups set in each of the web.config files for each webservice on the server hosting the BizApps...<location path="SiteCacheRefresh.axd">
<system.web>
<authorization>
<allow roles="BUILTIN\Administrators"/>
<allow users="BUILTIN\Administrators"/>
<allow roles="MyBizServer\CatalogAdminGroup"/>
<allow roles="MyBizServer\MarketingAdminGroup"/>
<allow roles="MyBizServer\OrdersAdminGroup"/>
<allow roles="MyBizServer\ProfilesAdminGroup"/>
<!--<deny users="*" />-->
</authorization>
</system.web>
</location>Thanks for any help!

[2929 byte] By [Debartsa] at [2007-12-27]
# 1

Hi,

Have you ever been able to refresh the site cache? If you call SiteCacheRefresh using the individual cache names called in the web.config does it work (SiteCacheRefresh.axd?CacheToRefresh=name_of_cache)?

Cheers,
Colin

ColinBowern at 2007-9-3 > top of Msdn Tech,Commerce Server,Commerce Server 2007...
# 2

Hi Colin,

Thanks for your help. Yes, when I use a web browser and invoke the web service method directly from the url and I pass in a cache name, I still get the error but I notice in the event log that there is an entry that claims the cache was refreshed.

Thanks for your help

Debartsa at 2007-9-3 > top of Msdn Tech,Commerce Server,Commerce Server 2007...
# 3

Try using the directions listed by davidme for tracing the SOAP request and see if that gives any useful information. http://blogs.msdn.com/commerce/archive/2006/12/03/using-fiddler-to-capture-soap-messages-between-the-cs2007-web-services-and-clients.aspx

It's not clear if the exception is happening on the client or the server or whether the exception is masking an underlying problem. Hopefully the SOAP request will clear some of that up.

JoeWasson-MSFT at 2007-9-3 > top of Msdn Tech,Commerce Server,Commerce Server 2007...
# 4

Joe's reply was marked as the answer, can we get some insight into what was happening/what Fiddler revealed? (I'm having the same issue now and cannot install fiddler ATM)

Thanks!

PeterHaik at 2007-9-3 > top of Msdn Tech,Commerce Server,Commerce Server 2007...
# 5
Hi debartsa,

did you solve this your problem already? I have the SAME problem with refresh, but with refresh payment method in CS2007 in orders... but with same result...

Please let me know your experience...

thx a lot

kuba123456

kuba123456 at 2007-9-3 > top of Msdn Tech,Commerce Server,Commerce Server 2007...
# 6
Wanted to update this thread that there is a hotfix available that might address this - KB922068.
ColinBowern at 2007-9-3 > top of Msdn Tech,Commerce Server,Commerce Server 2007...
# 7

Thanks for all your reply's,

This is the latest update. I used fiddler to examine the soap request and was able to notice that the SOAP exception occurs while the cache name: AllMarketingCaches was trying to get refreshed. The SOAP exception reads below, look for: Instance validation error: '0' is not a valid value for System.Net.HttpStatusCode.

Complete Fiddler Session Info is provided:

POST /MarketingWebService/MarketingWebService.asmx HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.42)
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://schemas.microsoft.com/CommerceServer/2006/06/MarketingWebService/RefreshCache"
Host: devcscms
Content-Length: 396
Expect: 100-continue
Proxy-Connection: Close

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><RefreshCache xmlns="http://schemas.microsoft.com/CommerceServer/2006/06/MarketingWebService"><cacheName>AllMarketingCaches</cacheName></RefreshCache></soap:Body></soap:Envelope>
HTTP/1.1 500 Internal Server Error
Date: Sun, 24 Dec 2006 03:57:29 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Content-Length: 2401

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>System.Web.Services.Protocols.SoapException: Server was unable to process request. &gt; System.InvalidOperationException: There was an error generating the XML document. &gt; System.InvalidOperationException: Instance validation error: '0' is not a valid value for System.Net.HttpStatusCode.
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterList1.Write1_HttpStatusCode(HttpStatusCode v)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterList1.Write3_CacheRefreshFailureInformation(String n, String ns, CacheRefreshFailureInformation o, Boolean isNullable, Boolean needType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterList1.Write4_Item(Object o)
End of inner exception stack trace
at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o)
at Microsoft.CommerceServer.Internal.SerializableExceptionSignature.ReflectProperty(XmlWriter xmlWriter, Object obj, SerializableProperty propertyInfo)
at Microsoft.CommerceServer.Internal.SerializableExceptionSignature.BuildDetailXml(Boolean useCustomErrors, SerializableExceptionInfo exceptionInfo, Exception exceptionToSerialize)
at Microsoft.CommerceServer.Internal.ExceptionSerializer.TrySerializeToSoapException(Boolean useCustomErrors, SerializableExceptionInfo exceptionInfo, Exception exceptionToSerialize, Boolean&amp; shouldLogException)
at Microsoft.CommerceServer.Internal.ExceptionSerializer.TrySerializeToSoapException(SerializableExceptionInfo[] exceptionInfoList, Exception exceptionToSerialize, Boolean&amp; shouldLogException)
at Microsoft.CommerceServer.Marketing.WebService.MarketingWebService.PropagateOrLogExceptionInternal(Exception except)
at Microsoft.CommerceServer.Marketing.WebService.MarketingWebService.RefreshCache(String cacheName)
End of inner exception stack trace </faultstring><detail /></soap:Fault></soap:Body></soap:Envelope>

Debartsa at 2007-9-3 > top of Msdn Tech,Commerce Server,Commerce Server 2007...
# 8
Colin, did they update the hotfix to be different? I'm seeing the same problem as Debartsa in which the hotfix did not work for me (on one machine).

We actually have three different setups that are all running the same setup, one has the issue and was fixed by the hotfix, one did not have the issue at all, and the third had the issue and was not fixed by the hotfix.

PeterHaik at 2007-9-3 > top of Msdn Tech,Commerce Server,Commerce Server 2007...
# 9
Deb,

is that to say that you're still having the issue and have not found an answer?

If so, can we mark this thread as not answered to hopefully get some more help?

Thanks.

PeterHaik at 2007-9-3 > top of Msdn Tech,Commerce Server,Commerce Server 2007...
# 10

Hi Peter,

Correct, I don't believe the issue is fully resolved. Not sure how to mark the thread/issue as not answered however?

Thanks

Debartsa at 2007-9-3 > top of Msdn Tech,Commerce Server,Commerce Server 2007...
# 11

Peter,

It worked on our end. If you are experiencing the same symptoms after applying the hotfix and rebooting you should follow up with PSS using the case number you were given as there might be a problem with the hotfix installer in your case.

Cheers,
Colin

ColinBowern at 2007-9-3 > top of Msdn Tech,Commerce Server,Commerce Server 2007...