0

I'm trying to deploy an ASP .NET MVC 2 application in SHAREPOINT 2010

I found this online: http://sharepointmvc.codeplex.com/

But I can't make it work. I don't know if I'm doing it right...

In the documentation it says:"

  1. Create a root site collection for your web application.

  2. Create a virtual directory in the SharePoint website. The virtual directory must be in the layouts folder i.e. C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS[Your Virtual Directory] "

I created a new web application from SharePoint Central Administration and I created a new virtual directory from IIS Manager as requested. Later on it says

  1. Build and deploy your solution to your virtual directory folder. You will also need to deploy the solution assemblies to the SharePoint website _app_bin folder @ C:\Inetpub\wwwroot\wss\VirtualDirectories[Your SharePoint port number]_app_bin. Make sure that all your assemblies are signed and placed in the GAC.

But I don't have this directory "C:\Inetpub\wwwroot\wss\VirtualDirectories..."

I also don't know what this means : "Make sure that all your assemblies are signed and placed in the GAC."

If you know any other easier tutorial for this please share :D

2

1 Answer 1

0

Actually, the folder C:\Inetpub\wwwroot\wss\VirtualDirectories[appname_port]\ which has the _app_bin folder is the folder the SharePoint IIS site is mapped to. It can be anywhere (you can configure your SharePoint to a complete other location), so look it up in your IIS (assuming v7):

  • Start IIS
  • Browse to the Sites node
  • Right click your site
  • Choose explore

The GAC is a computer wide folder for .NET assembly deployment. It can hold multiple versions of the same assembly, therefore your assembly should be strongly signed (such that it has version information).

But I do not know that SharePoint MVC2 project. A couple observations:

  • Your question is about SP2010, but the project is made for MOSS2007 (in 2010, you should use the \web server extensions\14\TEMPLATE\LAYOUTS folder, not 12)
  • When you deploy your assemblies to the GAC, why bother deploying to the _app_bin folder? What I understood, _app_bin is there for backwards compatibility only.
  • Creating a Virtual Directory under _layouts makes that directory available under all your sites.

The complete solution seems to me quite bloated. You can get it to work with a lot of effort, but that doesn't mean that you should build it that way (besides the question if such an setup is supported). There are other solution which might be better. Consider creating a complete stand alone MVC solution, which connect to SharePoint by means of the (Client) Object Model or one of the available web services.

2
  • Thank you for your answer. These concepts are new to me :( Anyway, I made a new web application from SharePoint Central Administration an created a new Team Site. I created a new virtual directory within the site (from IIS Manager) and published the mvc app there. I tried this with a normal site and it worked. But when I did in the SharePoint site i get this error: "HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid." Commented May 30, 2013 at 8:55
  • "Detailed Error Information Module IIS Web Core Notification BeginRequest 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\5897\mvcdemo\web.config Requested URL localhost:5897/mvcdemo Physical Path C:\inetpub\wwwroot\wss\VirtualDirectories\5897\mvcdemo Logon Method Not yet determined Logon User Not yet determined " Commented May 30, 2013 at 8:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.