Sharepoint 2010 issue: MVC 2 App under Sharepoint website root, Day 1

OHHHH BoyyyyyyyeeezzzzzZ!!!!!!

At my day job, we are moving from sharepoint 2003 to 2010. Yes! 2003 sharepoint, the document management stuff is great, the rest is a huge swollen thumbs down for me, inserted into sharepoints _________.

So let me describe our current environment a bit, sharepoint 2003 has taken over IIS 6.0. AHHHHHH, so we deploy child applications under sharepoint root website. In sharepoint 2003, we can tell it to exclude these apps from sharepoint handling and they work great. We have ASP.NET forms apps to MVC 2 (this took a small trick, if any body wants to know how to run MVC child apps under sharepoint 2003, I can do a quick blog about. Let me Know!) apps in all .Net glory from 2.0 to 4.0. All working as one cog for financial gain and efficiency.

Now lets do the same f’ing thing in sharepoint 2010 …. First on my list, lets deploy an MVC 2 Asp.net 4.0 app. This will be our preferred project for all future web apps. We know it works under sharepoint 2003 website root, there is one running with joy in our current production. I start with a test:

The application “Test” is the default MVC2 application created by visual studio 2010. This is to keep things simple, no other factors… basic shit. The target Framework is .Net 4.0 and using 4.0 application pool on iis 7.5.

If I browse to the application I get this error:

Module IIS Web Core
Notification Unknown
Handler Not yet determined
Error Code 0x800700b7
Config Error There is a duplicate ‘system.web.extensions/scripting/scriptResourceHandler’ section defined
Config File \\?\C:\inetpub\wwwroot\wss\VirtualDirectories\80\web.config
Requested URL http://fseitz-pc:80/Test/
Physical Path
Logon Method Not yet determined
Logon User Not yet determined

I comply and remove the duplicate references in the MVC application, which leads to an error telling me, it can`t find the references I just removed. Hammer Smashed Face

Steps to recreate problem:
1. Sharepoint 2010 running
2. Deploy the default application MVC2 project .Net 4 created by Visual Studio 2010. Do xcopy deploy under IIS root site. Make it into an application under IIS 7.5 sharepoint 2010 site.
3. Browse to the MVC2 app, see error

I duckduckgo this, I find nothing on how to get this to work on sharepoint 2010. So I google it, nothing either. I found some examples … on issues when the .net framework is a lower version and running 4.0 as a child app. Something to do with application hierarchy that is implemented in IIS 7.5. Tried the configurations, but with no luck under sharepoint 2010.

First test … stopped dead in my tracks. Why!? oh why!?? …it works in sharepoint 2003 with IIS 6.0 ….whyyyy!!!?!? The bright side of all this: you get to experience this with me. A new blog series of getting MVC 2 running in unison with sharepoint 2010. Time to phone Microsoft support, wasting to much time trying to solve this on my own. I will let you know how it goes in day 2 of this blog posting.

If anybody knows how to get this running without creating another website. Please post in the comments!


5 Comments on “Sharepoint 2010 issue: MVC 2 App under Sharepoint website root, Day 1”

  1. [...] continued from Day 1 Read it here. Beep beep be beep beep. That is me phoning Microsoft support. Yes! I really love phoning support [...]

  2. Suchmaschine says:

    As a Newbie, I am always searching online for articles that can help me. Thank you

  3. Scott says:

    Did you find an answer to this? I am having the same exact problem. I had a .net 4.0 app I want to run under SP2010. I am getting the “There is a duplicate ‘system.web.extensions/scripting/scriptResourceHandler’ section defined ” error becuase if the inheritance. Did you have any luck?


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.