Where is the Increment method on the DataCache? - appfabric

I want to use the Increment method from the DataCache documentation but the method is not available on my DataCache object. Clearly I don't have the version of Microsoft.ApplicationServer.Caching.Client.dll that matches the documentation but I can't seem to figure out what version contains that method and where to get the assembly???
The version I have 1.0.4632.0
I am using the AppFabric for Windows 1.1.

This method is part of Azure and not Windows Server. AppFabric exists in two versions : one for Windows Server and one for Azure. There are only a few differences (here is one of them).
If you're targeting Azure, simply add the package Microsoft.WindowsAzure.Caching. You will find a detailed introduciton here.
It you're targeting Windows Server, do it by yourself !

Related

Enumerate applications installed on windows in C++

I Want to list all the installed applications in c. We can do it using two ways.
1. Using Uninstall registry and 2. WMI and Win32_product class.
But is it reliable using registry for enumerating installed product? Also WMI only lists product installed through MSI installer? is there another way to do it? if not which is the best and recommended way?
Your intuitions are correct, iterating the registry is the most complete way to find out which programs are 'installed'. Obviously this will not find stand-alone binaries/applications which do not register themselves with the windows registry.
See WMI "installed" query different from add/remove programs list?
Rob Haupt's Answer links to some code for inspecting the registry

What's the difference between javax.servlet.jsp:jsp-api:2.1 and org.mortbay.jetty:jsp-api-2.1:6.1.5?

I am cleaning up a build system for a product that uses Jetty. Currently the project has
javax.servlet.jsp:jsp-api:2.1
as a dependency. Given that I am using Jetty for my project I suspect using
org.mortbay.jetty:jsp-api-2.1:6.1.5
would be the better option. Am I right/wrong? Can they be used interchangeably? Does jsp-api-2.1 leverage a different implementation? Or is it simply a repackage if jsp-api to assert compatibility with Jetty?
I've been trying to find information about this on the web, so far nothing has come up.
Update: Seems like org.mortbay.jetty:servlet-api-2.5:6.1.5 and javax.servlet.jsp:servlet-api:2.1 have the same relationship.
Jetty has a long and colorful history with jsp, having no jsp implementation of our own we have leveraged other implementations often, judging by the version numbers your looking at those are very old versions where we were maintaining patches on top of the glassfish jsp implementation. I think it was a patch for supporting logging in jetty and then a bug fix or three.
Now a days we have been using the jsp artifacts from the java.net project which was spun out from glassfish a while back. However that doesn't seem to be tracking bug fixes very regularly either so we are kicking around trying the jasper implementation in tomcat.
Back on your question, the jsp-api artifacts are typically just repackaged artifacts since the api doesn't change frequently. We historically rebundled them to keep them paired with the patched implementation.
Now, you are obviously using a jetty-6 setup since your still using org.mortbay packaging but jetty6 and jetty7 are both servlet-api 2.5 so you might be able to get away with using the jetty7 jsp setup, we have a handy pom that declares these artifacts here:
http://central.maven.org/maven2/org/eclipse/jetty/jetty-jsp/7.6.5.v20120716/jetty-jsp-7.6.5.v20120716.pom
These are glassfish bundles as well, repackaged and made into osgi bundles in the process so they can be used with jetty in osgi environments....they ought to work normally though, we package them in our jetty7 distributions.

OutOfMemoryException when building Silverlight application using CRM2011 OData Service Reference

Following the instructions supplied with the Microsoft Dynamics CRM SDK CrmODataSilverlight sample code I have downloaded the OrganizationData.csdl from my CRM2011 solution and readded my service reference with it. The csdl file is 4.8mb and has generated a Reference.cs in my solution of 13.4mb.
When I attempt to build my solution I get an error stating 'Source file '...\Reference.cs' could not be opened ('Exception of type 'System.OutOfMemoryException' was thrown.')
I have restarted my machine and attempted to rebuild however I get the same issue.
What approach can I take to allow my Silverlight application to build with this service reference? Can I get a cut down version of the csdl from CRM2011 containing just the entities I am interested in or is there another approach I can take? I don't fancy having to manually edit the csdl file as it makes maintenance a nightmare.
Here's an article about filtering out items when generating a proxy from crm 2011.
Probably not exactly what you need for silverlight but hopefully points you in the right direction.
http://erikpool.blogspot.com/2011/03/filtering-generated-entities-with.html
As for the out of memory, you can try to increase your virtual memory amount in windows.

Web Service References & C# 4.0 Default Values

I've just started to use VS2010 and with it comes c# 4.0.
I have since been using the default values for some of my methods, which has allowed me to remove some overloads that performed this operation.
My problem is as follows:
I have a library project that has several classes that I use for various things throughout several other projects. The default values work well here.
Another project is a web service that I use to perform some tasks on a remote server. No errors are shown (or warnings) when I compile this project that the above methods won't work. It compiles fine.
However, when I add this service to another project as a Service Reference, it doesn't seem to see that the method has default values and so complains I am not supplying enough arguments.
I re-deployed my service and updated the service reference, but it is still the same. I also just noticed that a previously working method that uses an 'out' argument (i.e.e MyMethod(out String arg1, String arg2)) doesn't seem to work either now.
Any suggestions? I'm not aware that I have changed any config settings that would do this, so I assume it must be C# 4.0. Having said that, the out argument was working with 4.0 last week :S
Thanks for any help offered...
Cheers
Neil
I wouldn't be surprised to hear that default values specified in a web service aren't reflected in the proxy code generated by Visual Studio. You could create your own proxy layer of course, which would be very simple - but you'd need to update it every time you changed the web service.
If you have a look at the WSDL for your service, does that indicate the default values? It could also be that there's a switch somewhere in the generator to generate optional parameters or not (for compatibility with C# 3).
The out parameter is potentially a different matter entirely - what error are you getting?

Microsoft Exchange CDOEX in a clustered environment

We have a VS2005 native C++ application which connects to Exchange
server using CDOEX and CDOEXM to create and modify calendar entries
for multiple user folders. It's a command line utility which must be installed on the same server where the exchange server is installed. What is the correct procedure to use this
utility in a clustered environment? Any help would be appreciated.
Might I suggest you take a look at.
http://msdn.microsoft.com/en-us/library/aa373130%28VS.85%29.aspx
for general information on how failover clustering works.
But I would also like to point out that going forward ( ie exchange 2007 , 2010) you don't get CDOEXM. And Instead you will have to find some way of integrating with powershell instead. There are classes to explicitly run powershell scripting from inside a program, but they are C# so you either migrate all your code to C# or use some bastardized blend of IJW.