Geeks With Blogs

@BryanKail
  • BryanKail @Movescount When is the 'maps' section under 'my moves' scheduled to return? Adding routes to moves is one of my favorite features! about 505 days ago
  • BryanKail 2 doz x-larges from Pappas on sat. at 6 pm! about 532 days ago
  • BryanKail @JE_Schmitty not that it matters. I would be surprised if they find then from the hat. about 551 days ago
  • BryanKail @JE_Schmitty #7 or #3 could be right. Facing front, the right side has open ends to rear. When backwards, we see right on the left side. about 551 days ago

News
Bryan Kail Microsoft Technologies - .NET Framework, Commerce Server, SQL Server, ASP.NET, AJAX, Visual Studio, C#, Silverlight

You may have encountered an error when trying to run a Cache Refresh from within a Business Management Application such as the Catalog Manager or when trying to run a Commerce Server Staging Project with Refresh Cache enabled on one of the following resources (Catalog, Marketing or Orders).

Some of the errors logged to the event log could include a 404 error.  Where is this SiteCacheRefresh.axd file that is being requested when a Cache Refresh is executed.  The answer is that there is no such SiteCacheRefresh.axd file because it is actually an HTTP Handler that takes care of the SiteCacheRefresh.axd requests.

You can look to your Web.config file to find the HTTP Handler sections for this "file", but more on that later in this post.

So what about the error?  There are a couple of things that one can check.

First look to the Application Event log to pull out the requested URL.  It should look something like:

      http://<WebServerMachineName>/OrdersWebService/SiteCacheRefresh.axd?CacheToRefresh=CatalogCache

If you are getting a 404 error, there is most likely something out of whack in your IIS Configuration.

Commerce Server 2007 (and possibly earlier versions) use the MachineName of the Web Server to construct this URL by default.  It is not configurable out-of-the-box.  To solve this problem:

  1. Try bringing up a command prompt and ping your <WebServerMachineName>. 
  2. Take note of the IP address and go into IIS Manager and see which Application/Web Site is on that IP address. 
  3. Check to be sure that the OrdersWebService application or whatever follows <WebServerMachineName> in your request URL is, in fact, under that IIS Web Site/Application. 
  4. If it is not, you can either:
    • Move the commerce application under the one that IIS is directing the request to your machine name to
    • Add a virtual directory that points to the same directory as the actual OrdersWebService application points to
    • Add a Host Header Entry for the <WebServerMachineName> to the application that has your Commerce Application 

      The last of these options is probably the cleanest.

Now, for more on the HTTP Handler.  Why does all of this configuring in IIS matter?  The Web.config of a Commerce Server Application (or one of the Web Service Applications) has the needed HTTP Handler entries to handle the request for SiteCacheRefresh.axd.  If the application that your http://<ServerMachineName>...SiteCacheRefresh.axd points to does not have this web.config (specifically the HTTP Handler entries), the request for SiteCacheRefresh.axd will fall on deaf ears and IIS will have no idea what to do other than return a 404 or other related error.

You may already have another Site using the <WebServerMachineName> as a Host Header value, and you may not want to add your Commerce Server Web Service Application(s), Web Application or Commerce Web.config HTTP Handlers to this Site.  So, how do you change the <WebServerMachineName>?    The answer is in a new Hotfix from Microsoft, KB 91168.  I have to double check this KB number and I will update this post once I do so if this one is incorrect.  This Hotfix will add a registry setting that Commece Server will read which enables the SiteCacheRefresh URL to be built by IP or by Host Header by setting the registry value to either 1 or 0.  If you build the SiteCacheRefresh URL with the IP address instead of the <WebServerMachineName>, you can safely assign the IP that Commerce Server puts in the SiteCacheRefresh.axd URL to your Commerce Server Application (of course you will need another IP for the Site you stole this one from).  Requests for SiteCacherefresh.axd will then find the HTTP Handler information in the web.config of your Commerce Application and everything will be right in the world (well at least this particular Commerce Server world).  The knowledge base article mentioned above is not published yet; it is still being written but should hit the street at some point.  How do I know this?  I opened a support case with Microsoft and the Commerce Server Support Team really armed with the almost all of the information that you are finding in this post.

There are a lot other possibilities for the problems you may be encountering with SiteCacheRefresh so do not hesitate to comment on this post with questions you may have about your particlar solution and I will do my best to help out.

 

Posted on Friday, March 9, 2007 5:47 PM Commerce Server | Back to top


Comments on this post: Commerce Server SiteCacheRefresh.axd Error

# re: Commerce Server SiteCacheRefresh.axd Error
Requesting Gravatar...
Hi,
I am facing the http 404 error. Actually the url used is
http://<Severmachine>/Test1/SiteCacheRefresh.axd?CacheToRefresh=AllMarketingCaches
where the Test1 is the application and not the web service folder. ie on unpacking i get 4 folders
1)Test1 --Web application folder
and 4 web services folder
Test1CatalogWebService
Test1MarketingWebService
Test1OrdersWebService
Test1ProfilesWebService.

While refreshing the cache it is trying to use Test1 which does not contain the SiteCacheRefresh.axd.
I tried configuring the IIS but to no avail.

Can you please send me the solution?
Left by krish on Apr 18, 2007 12:25 AM

# re: Commerce Server SiteCacheRefresh.axd Error
Requesting Gravatar...
This should also be in your web.config:
<httpHandlers>
<add verb="*" path="SiteCacheRefresh.axd" type="Microsoft.CommerceServer.Runtime.SiteCacheRefresh, Microsoft.CommerceServer.Runtime, Version= 6.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 "/>
</httpHandlers>

Also:
Your Test1 Application IIS configuration needs to have the machine name listed as a host header.

Let me know if either of these solve your problem.

Left by Bryan Kail on Apr 18, 2007 7:56 AM

# re: Commerce Server SiteCacheRefresh.axd Error
Requesting Gravatar...
Hi brian,
Thanks for the reply. Yes there is a web.config in my test1 application and i added the code to the httpHandlers section.
Now the application is not throwing 404 error but it is throwing 500(Internal server error) . I am pasting the eventlog mess here:

An exception occurred in the 'CatalogWebService' Web service. Exception details follow:

Microsoft.CommerceServer.CacheRefreshFailedException: One or more errors occurred while refreshing the cache 'CatalogCache' of the site 'Test1':

The server '<serverName>' of the application 'Test1' returned HTTP status code 500 (Internal Server Error). The cache refresh URL used was 'http://<serverName>/Test1/SiteCacheRefresh.axd?CacheToRefresh=CatalogCache'.

See the server event event log for more details.
at Microsoft.CommerceServer.Runtime.Configuration.CommerceResourceCollection.RefreshCache(String cacheName, CommerceResourceCollection resourceCollection)
at Microsoft.CommerceServer.Catalog.Internal.CatalogServerContextBase.RefreshSiteCache()

Also my application is under the default website in iis . I am not seeing any option for modifying the host header. This option is available if i create a new website and then unpack the application there. So please let me know on how to configure an existing site to give the host header name.
Left by krish on Apr 18, 2007 6:40 PM

# re: Commerce Server SiteCacheRefresh.axd Error
Requesting Gravatar...
I think we are past the issue with the Host Header so don't worry about that unlesss you are getign 404. You are now most like facing a permissions issue.
Can you access the catalog web service URL from a browser window?
Use http://<servername>/<CatalogWebService>/CatalogWebService.asmx.
(Substitute <CatalogWebService> with the correct path to your catalogwebservice.asmx file.)

What happens when you put 'http://<serverName>/Test1/SiteCacheRefresh.axd?CacheToRefresh=CatalogCache' directly into your browser. Are there any more details in the event viewer or IIS log for this site?

Be sure to check your CatalogAuthorizationStore.xml file in azman.msc and that the credentials you are logged into windows or the business management application with are in the administrators group (see my other post regarding azman.msc).

How are you triggering the site cache refresh? Is it from within the Catalog Manager or through the Commerce Server Staging MMC?
Left by Bryan Kail on Apr 18, 2007 11:10 PM

# re: Commerce Server SiteCacheRefresh.axd Error
Requesting Gravatar...
Hi Bryan,
I am able to access the catalog web service and when i hit the url :
http://<serverName>/Test1/SiteCacheRefresh.axd?CacheToRefresh=CatalogCache, the cache gets refreshed.This is seen as a info in eventlog stating that
The cache 'CatalogCache' has been refreshed for the site 'Test1'.
I checked the CatalogAuthorizationStore.xml and i am also a member of the catalog admin group.

I am triggering the sitecache refresh by hitting the Refresh Site cache tab in catalog manager and marketing manager.

Also when i try to access the refreshsitecache method of the catalog web service(by opening the webservice in IE and hitting the invoke button in the refreshsitecache function) , i am getting the same error.
Left by krish on Apr 18, 2007 11:42 PM

# re: Commerce Server SiteCacheRefresh.axd Error
Requesting Gravatar...
Interesting results (not what I expected).

Correct me if I am wrong, but it sounds like the site cache refresh is working everywhere except within the Catalog Manager.

What application pool is the Catalog Web Service running under? Is the identity of that App Pool set to the CatalogWebServiceUser and is that user in the CatalogAuthorizationStore.xml under administrators?

Stick with me Krish and we will get this resolved. Your recent results are optimistic and I think it is just something silly at this pooint.
Left by Bryan Kail on Apr 19, 2007 1:11 AM

# re: Commerce Server SiteCacheRefresh.axd Error
Requesting Gravatar...
Oh yeah, one last thing:

What account are you using to log in tothe CatAlog Manger with when it launches. That account also needs all appropriate permissions.
Left by Bryan Kail on Apr 19, 2007 1:12 AM

# re: Commerce Server SiteCacheRefresh.axd Error
Requesting Gravatar...
Hi
Bryan,
Thanks for the speedy reply. Actually the webservice's refreshsitecache
is not working for catalogwebservice , thought the RefreshCache method
is working without any problem on invoking it.
Actually the Site refresh cache is not working in any of the bussiness
desk UI's.
In CS Marketing manager and customer and ordermanager also i get the
same error.
I have created 5 seperate Application pools mapped to the respective
users.The identity of catalogApp Pool is set to the
CatalogWebServiceUser.
I had not added that user as an admin in catalogauthorization.xml.I
tried adding it but still i get the same error.
Also i am loggin in with system userid and password.I have added this
user as a admin to catalogauthorizationstore.xml,as
MarketingAdministrator in MarketingAuthorizationStore.xml
,as OrdersAdministrator in OrdersAuthorizationStore.xml and
ProfileAdministrator in ProfilesAuthorizationStore.xml
.
Do i need to add this user in the Refresh site cache users in
orderswebservice's web.config and application's web.config? Also i am
logging in as the admin of the system and in web.config
<allow roles="BUILTIN\Administrators"/>
is present.So i think there is no need to add me as a user in
web.config. Am i correct?
Left by krish on Apr 19, 2007 6:35 PM

# re: Commerce Server SiteCacheRefresh.axd Error
Requesting Gravatar...
Everything you are reporting appears to be correct, as a test, remove any of the deny satement from your web config and allow all users and roles (only as a test, we can't go to production this way, but we can eliminate this as a cause of the problem).
Left by Bryan Kail on Apr 19, 2007 11:44 PM

# re: Commerce Server SiteCacheRefresh.axd Error
Requesting Gravatar...
Hey Bryan... I'm getting a "Microsoft.CommerceServer.CacheRefreshFailedException" error in my event log when I try to envoke "Refresh Site Cache" from the Catalog Manager.

My error actually is a 403 forbidden error.

The problem that I see is that I have the OrdersWebService set to use SSL, and the address that the Catalog Manager is trying to use to perform the refresh is just a plain "http://" and not "https://".

For testing I've removed SSL from the web service and tested firing off the Refresh Site Cache and it works fine. But I need SSL turned on for the webservice; otherwise the site is insecure AND I can't connect to it with the "Customer and Orders Manager" unless I have SSL turned on.
Left by Soteriologist on May 21, 2007 7:28 AM

# re: Commerce Server SiteCacheRefresh.axd Error
Requesting Gravatar...
What happens when you have SSL turned on and you try to hit the URL that the sitecacherefresh is using?

Does it give you the SSL warning message?

You need to get rid of that for sitecacherefresh and your customers and orders manager to work. The system doesd not know what dto do with that Certificate warning you can soemtimes get when soemthing doesn't match up in your cert (like the domain name).
Left by Bryan Kail on May 21, 2007 9:53 AM

# re: Commerce Server SiteCacheRefresh.axd Error
Requesting Gravatar...
Well...
I've found a way of solving the problem, but in my opinion the Catalog Manager business application needs to be fixed, and should be trying to refresh the site cache using an SSL link.

The situation you have is: to use the Customer and Orders Manager business application you NEED SSL turned on and for the Orders portion of your site you WANT it on. But, this one portion of this management tools (Catalog Manager) it tries to connect to the web service without SSL which is not good. So you have two different management tools that contradict eachother, one requiring SSL, the other requiring non-SSL.

What I had to do in order to work around this problem was disable (uncheck) SSL for the whole OrdersWebService directory, and instead enable it one every individual file and directory within it. That way the link that pointed to the http handle could use a normal http:// url string, but ALL other pages within my directory require an https:// connection. It just means more tedious work for managing the secure connections.
Left by Soteriologist on May 21, 2007 3:34 PM

# re: Commerce Server SiteCacheRefresh.axd Error
Requesting Gravatar...
I am running into the same issue. Can you tell me correct KB article number. The site refresh works for me using IP address from remote machine with appropriate access but does not work with machine name.
Left by Ahmed Zia on Aug 14, 2008 11:43 AM

# re: Commerce Server SiteCacheRefresh.axd Error
Requesting Gravatar...
Since it works by IP, does your remote machine know how to resolve the machine name in the URL (i.e. Is there a DNS to map the machine name to the IP?).

The issue I am talking about is more for when you are trying to execute a sitecacherefresh thru one of the Business Management Apps or Commerce Server Staging Service where the URL is generated by Commerce Server.

What are you using to trigger the SiteCacheRefresh call?

Commerce Server SP1 gives you a setting to tell Commerce Server to construct the SiteCacheRefresh URL with Machine OR IP.

In this KB article sympton 4 is the one you are dealing with:

http://support.microsoft.com/kb/931290/

However, it does not give the solution.workaround.

You will need to install the SP1 or download the SP1 documentation to see how that setting is made:

http://www.microsoft.com/downloads/details.aspx?FamilyId=4BE7E821-469C-4EF2-B5BD-9174F72F0D2E&displaylang=en

I cannot remember off of the top of my head, but I am sure you can do it with SP1.

Hope this helps, but email me if not and I can dig in some more!
Left by Bryan Kail on Aug 14, 2008 12:38 PM

# re: Commerce Server SiteCacheRefresh.axd Error
Requesting Gravatar...
I am working to get in touch withthe MS Tech that helped me with this issue long ago to find out what product relesased the feature which allows one to tell Commerce Sergfer to contruct the SiteCacheRefresh.axd call with the machine name or by host header name. In the meantime, another related KB article is this one: http://support.microsoft.com/kb/922068.
Left by Bryan Kail on Aug 15, 2008 3:07 AM

# re: Commerce Server SiteCacheRefresh.axd Error
Requesting Gravatar...
Ahmed,

You need to get CS 2007 SP2.

The info on how to configure is in the following KB Article: http://support.microsoft.com/kb/931186/en-us
Left by Bryan Kail on Aug 18, 2008 8:04 AM

# Configure SSL for OrdersWebservice
Requesting Gravatar...
Hi,

Can you please tell how SSL can be configured for OrdersWebservice? I have done followings these steps but not able to do that:

1. Generated Certificate using SelfSSL.
2. In IIS, OrdersWebService->Properties->Security Tab-->sure Communication-->edit-->check required SSL channel
3. I am able to view the certificate.

I am getting error "The page cannot be displayed".
Regards

Rajesh Pant

Left by Rajesh Pant on Oct 15, 2008 1:34 AM

Your comment:
 (will show your gravatar)
 


Copyright © Bryan Kail | Powered by: GeeksWithBlogs.net | Join free