Creative technologist with foodie tendencies. Life-long geek. Put-in-Bay native living in Cleveland. +3 boys and their amazing mother.
Catching Elephant is a theme by Andy Taylor
The problem I was trying to solve lied in a obscure error that it turns out originated from Sitecore. Since Sitecore supports Oracle as a database backend, it has it’s own Sitecore.Oracle.dll and my best gues is that this requires the Oracle.DataAccess.dll
Whenever I tried to access the MVC Web API path (/api/values) for some reason, (I think) it tried to load Sitecore.Oracle.dll into the GAC and when no Oracle.DataAccess.dll was found in the project - I was getting an missing assembly reference. I couldn’t understand why since no-where in my application was I referencing Oracle.DataAccess.
So I created an empty Web API project, copied over the web.config from my Sitecore project (which was already modified to work with MVC), and began to add DLLs/folders until I stopped getting errors. After I copied half a dozen files and created some Sitecore folders, the controller worked - No Errors! Woo Hoo!
But why? Well it didn’t take long to figure out. Comparing the bin directories I could see that I was missing quite a lot of DLLs that I knew Sitecore needed. I eyeballed the Sitecore.Oracle.dll and *in cockney British accent* “Just for fun,” removed it from the project bin. BAM! Problem solved. Whew!
Prequisites:
I already had a working instance of Sitecore 6.5 (Sitecore.NET 6.5.0 (rev. 120427)). I think 6.4 and higher can work, but best to be on 6.5 and/or the recommended release.
I used the MVC4 framework and then went to the MVC3 framework to eliminate that as the cause and because MVC4 is still in beta (though it should be released very soon) but I anticipate the process will be largely the same. In any case, you need to install the MVC (3 or 4) prior to doing this.
Safety First! I made a complete backup of the website. If you plan on doing this, don’t temp fate, make a backup.
Although Sitecore’s instructions for configuring MVC and Sitecore (link below) have you create a blank MVC app and then move the appropriate files to your Sitecore solutions, I did this the other way around which shouldn’t make a difference.
Instructions:
You can create a blank project or one of the predefined templates. YMMV but I used the Web API as my base. Not a big deal, it just adds in some basic routing and controllers.
You can also move the relevant MVC files and folders to the Sitecore solution (which is what their documentation tells you to do). Remember to grab the Global.asax, and merge your code with that of the MVC Global.asax if applicable.
This guide is for both Sitecore 6.4/6.5 and MVC2 and MVC3 - I am sure they will update this for MVC4. Here is the link (requires SDN log in).
I had to comment out a couple lines from the web.config and remove the offending DLL.
In <system.webServer><modules>
<!—add name=”Session” type=”System.Web.SessionState.SessionStateModule” preCondition=”“/—>
This gave a duplicate key error. I haven’t seen any problems since, but I’ve commented this change to keep track of it.
In <system.webServer><httpModules>
<!—remove name=”SitecoreRewriteModule”/—>
This complained that there was nothing to remove. Again, nothing noticable in the application.
Remove the Sitecore.Oracle.dll
I am not sure why this error was thrown nor do I know what is entailed if you happen to be using Oracle as your backend database, but I am sure that Sitecore will fix this issue in an upcoming release.
So far everything seems to be working fine. I can serve up data as XML or JSON as needed and the rest of the site works great.
Chris van de Steeg has a project on GitHub that integrates MVC right into Sitecore uses the Glass Sitecore Mapper. If you are looking for something more tightly integrated, this looks like a good option. And it is available via NuGet.
Repo - https://github.com/csteeg/BoC.Sitecore.MVC
NuGet - http://nuget.org/packages/BoC.Sitecore.Mvc
Given the stuff Scott Hanselman presented at Stir Trek on Microsoft’s direction, it will be interesting to see how Sitecore approaches integration with things like MVC4. I think it would be cool to use things like SignalR for some cool data driven implementations.
This is very obvious to those of us in the client service world (most of us at least) but it’s nice to see a publication like the Harvard Business Review report on the topic.
One notable excerpt about why companies believe more detailed documentation and granular processes is the answer:
Processes with high variability [e.g. Information Architecture, Content Creation, Web Development, etc.] behave very differently. As utilization increases, delays lengthen dramatically. (See the exhibit “High Utilization Leads to Delays.”) Add 5% more work, and completing it may take 100% longer. But few people understand this effect. — Harvard Business Review
The curve below is calculated using Queuing Theory, the mathematical study of waiting lines. It shows that with variable processes, the amount of time projects spend on hold, waiting to be worked on, rises steeply as utilization of resources increases. Though the curve changes slightly depending on the project work, it always turns sharply upward as utilization nears 100%.
Domino’s Pizza has as new “gluten-free” pizza on their menu. But before you go taking your friends with severe gluten allergies or Celiac out for a pie, I should mention that this “gluten-free” option makes no claims for being safe from cross-contamination - not that this will be a major part of their marketing strategy mind you. Where would the profit be in that?
If they actually cared about offering a gluten-free option they could. There are plenty of pizza places that offer gluten-free pizza that is safe for people with Celiac and other severe gluten allergies. Whereas General Mills rightly understands the issue and as a company has seen both the human side as well as the business sense of offering truly gluten-free foods, companies that put big bold “Gluten Free” labels on their products but lazily avoid cross-contamination are only trying to make an extra dollar off the increased awareness people have of Celiac and gluten allergies.
This is both reprehensible and stupid in my opinion since while General Mills has earned my trust and therefore their brand equity has increased in my view (and so likely has their profit margins) pulling a stunt like this only destroys whatever brand trust I might have had in a company and ultimately will likely backfire.
This underscores everything that infuriates me about food labeling. I can’t understand how any food could be called “Gluten Free” when it isn’t. If a company that produces hypodermic needles included fine print on the packaging that warned that while the needles didn’t contain any pathogens, the environment in which they were made might, how far would that fly with their customers?!
There should be standards for what can be called gluten-free and this should mean exactly that - FREE. If you can’t ensure that a product is gluten-free, call it “partially gluten-free” or “gluten-lite” but don’t try to take advantage of those who can’t consume cross-contaminated foods with disingenuous marketing and misleading labels.
Last Friday I was honored and humbled to be recognized as one of 25 Northeast Ohio “movers and shakers” under the age of 35. The company I kept included many amazing people from a variety of backgrounds, many with distinguished years of service to their local and regional communities. In a city where cynics revel in self deprecation, I was buoyed up by the amazing character of this group. There is so much potential in Cleveland for transformative greatness that when I consider the next generation of leaders, many of whom are personified by this group, the usual woe-is-CLE sophistry seems destined to obscurity, if not irrelevance.
Baiju Shah, president and CEO of Bioenterprise, gave a stirring speech in which he noted the great history of Cleveland, from Carnegie to Peter B. Lewis to Charles Goodyear. He went on to point out all the new construction projects including the Medical Mart, inner-belt bridge, and Casino and touched on the many great projects to revitalize distressed neighborhoods and overhaul the public school system.
But as incredible and wonderful as these things were, what got him excited wasn’t the great history, new construction, or program development of Cleveland. What he got excited about was the underlying reason for all of this. Culture. Culture, he explained, is what drives the growth and success of any community, despite the odds and against conventional wisdom. What he sees in Northeast Ohio is a community poised for growth and success that is unprecedented; guided by our region’s diverse and amazing group of rising leaders.
My hope is that I can, in whatever small way, help be a part of that change and growth. Either by building a successful business that is connected and influential in the regional business environment or through involvement and volunteering in my local and regional community - or hopefully both.
From time to time, it happens. You are merrily coding away when suddenly the design file just stops updating, or worse it *gulp* DISAPPEARS! So what do you do? Well I’ve read that if you “switch to design view” it fixes it (it doesn’t) or if you delete the files and recreate them you are good (too much hassle). So is there a better way? Well, sorta…
First, this is no elegant solution, but if you need to fix this little glitch relatively fast, just follow these instructions.
What would be nice is to have a “regenerate design file” option in the context menu of VS since the design files is autogenerated anyway, but I digress.
Code On Brave Developers!
Which personality are you?
Great forward thinking philosophy on Web Development approaches and practises
Slowly,
slowly
the writer
picks up speed.
Observe in each
subsequent sentence
increasing complexity
setting the tone.
Inexorably, paragraphs
accumulate, with phrases
multiplying out of hand;
and birth-defective sentences
that blunder on pedantically
in awkwardness embarrassing
unfold.
At length circumlocution
(that’s redundant verbiage and
explication indirect –
familiar concomitants
of a rampant logorrhoea) and
indulgence in the bloviation of pomposyllabic overbosity,
dominate,
incurring
(while the last vestiges of theme writhe
’neath the feet of rampant rhythms, mowed
down by meaningless metaphor, stabbed
by daggers of stylistic inconsistency) –
incurring, I say,
superimposition of inordinate complexity
and spurious quasi-Latin verbifaction,
and the loss of readers’ interest or the
ultimate collapse of logic, whichever
shall
come
first.
Author Unknown