.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Deployment of ASP.NET MVC 2 Solution to IIS 7 resources are not mapped correctly

Posted By:      Posted Date: October 07, 2010    Points: 0   Category :ASP.Net

Hey guys

So I've been doing a nice MVC 2 app for ASP.NET. When running it on the ASP.NET Dev Server everything is going great. No problems

But when I publish it to my local wwwroot and convert it to an application in the IIS7, resources such as images and my references to the jQuery library are not done correctly. The result is loads of javascript errors and blank icons. So there is something in the setup of the IIS7 that is not done correctly I reckon.

I'm running the website under the default website and under the DefaultAppPool ( .NET 4.0 and Integrated)

I've also set it to copy the Systems.Web.MVC.dll file into the publish as I've seen some recommend.

I shall be noted that when I initially tried to run it from the ISS7 I got an error which had to do with ScriptResourceHandler in the web.config file. Some ppl suggested that I commented that out

		<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
			<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.

View Complete Post

More Related Resource Links

Office Space: Solution Deployment with SharePoint 2007


WSS 3.0 introduces a new deployment mechanism that lets you move your development efforts into a staging or production environment.

Ted Pattison

MSDN Magazine August 2007

Video: SharePoint 2010 Solution Deployment in Visual Studio 2010

This video delves into the details of packaging and deployment for SharePoint solutions in Visual Studio 2010. (Length: 9:16)

Solution deployment requires executing execadmsvcjobs command on search server to complete deploymen

We have multiple Sharepoint 2007 farms and deploy custom code weekly to the farms. On one o the farms it is required to run stsadm -o execadmsvcjobs on the Search server in the farm in order for solution deployments to complete deploying. These are solution recycles that we are running. This is the only farm this happens on and all farms are identical. In central admin it shows the solution state as deploying. Farm Config Sharepoint 2007 SP2 w Dec Cumulative updates 1 WFE 1 Search server 1 SQL server

Error occurred in deployment step 'Retract Solution': Attempted to perform an unauthorized operati

Hi, Is there any reason why I got the error above in my dev machine? It works perfectly fine if I login using the service account. So permission do I need for a regular account? Thanks in advance.

Getting Error " Error occurred in deployment step 'Add Solution': Exception from HRESULT: 0x810702

i'm getting the following error when deploying my sharepoint project i've created 3 site templates by adding according to this article http://www.sharepointbits.com/blog/sharepoint-2010-custom-site-templates.html but when i deployed my project i got the following Error occurred in deployment step 'Add Solution': Exception from HRESULT: 0x8107026E

Reg deployment of solution packages in SharePoint 2010 from MOSS 2007

Hi, Earlier we have developed some custom web parts,features and deployed into the site through solution package(wsp files) when customer was using MOSS 2007.Now customer is migrating all sites into SharePoint 2010.Now my query is can i use the same solution to deploy into the site through Central Admin of SharePoint 2010 or is there any seperate process for that? Thanks & Regards, Sudheer

Solution Deployment Problem (Administrative Framework Object Dependencies)

I'm having a problem with the deployment of a SharePoint workflow solution - hopefully someone can help me out.Here is the sequence of STSADM commands and their output from the console:C:\Workflows>stsadm -o deactivatefeature -name IL.SharePoint.Workflows -url http://localhost/ -forceOperation completed successfully.C:\Workflows>stsadm -o uninstallfeature -name IL.SharePoint.Workflows -forceOperation completed successfully.C:\Workflows>stsadm -o retractsolution -name IL.SharePoint.Workflows.wsp -localDeploymentSucceeded : server : The solution was successfully deployed.il.sharepoint.workflows.wsp: Operation completed with errors.C:\Workflows>stsadm -o deletesolution -name IL.SharePoint.Workflows.wspOperation completed successfully.C:\Workflows>stsadm -o addsolution -filename IL.SharePoint.Workflows.wspAn object in the SharePoint administrative framework, "SPSolutionLanguagePack Name=0 Parent=SPSolution Name=il.sharepoint.workflows.wsp", depends on other objects which do not exist.  Ensure that all of the objects dependencies are created and retry this operation.IL.SharePoint.Workflows.wsp: The Solution installation failed.Here is the related log info from the SharePoint logs:error-redacted.txtAs far as I can see, SP is attempting to insert a "SPSolutionLanguagePack" object into the configuration database, with an invalid foreign key reference

Cant delete a core solution after failed at deployment

Code Snippet

Install-SPSolution : This solution contains no resources scoped for a Web application and cannot be



What we want to achieve: install/deploy a custom site template ONCE so it becomes available to all site colls in several we apps. 

We have
1) modified a web site based on a Team Site template
2) saved the web site as a template (template is available in (site coll?) solution gallery)
3) saved the site template as a file
4) added the site template to the farm solution store using add-SPSolution

When we try to deploy the solution to a web app using Install-SPSolution we get the following error message:

"Install-SPSolution : This solution contains no resources scoped for a Web application and cannot be deployed to a particul
ar Web application."

Obviously we are missing something here.

Is the ONLY way to add/install the solution at the site coll level?

Error occurred in deployment step 'Add Solution': Failed to load receiver assembly



I've created a VS2010 sharepoint project and added a feature event receiver to my site definition. When I try to deploy it show me the error bellow:

Error 1 Error occurred in deployment step 'Add Solution': Failed to load receiver assembly "SiteDefinitionProject2, Version=, Culture=neutral, PublicKeyToken=a693a58979940483" for feature "SiteDefinitionProject2_Feature1" (ID: 9dce3ed9-5eb0-4bea-b42d-4dad84559a36).: System.IO.FileNotFoundException: Could not load file or assembly 'SiteDefinitionProject2, Version=, Culture=neutral, PublicKeyToken=a693a58979940483' or one of its dependencies. The system cannot find the file specified.
File name: 'SiteDefinitionProject2, Version=, Culture=neutral, PublicKeyToken=a693a58979940483'
   at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)

Solution Deployment failed in Server Farm - Some of the files failed to copy during deployment of th


Hi guys,

I created a solution package in my development environment that works well. When I try to deploy it in a test environment that is a farm with two web front end(card0023 / card0024) servers and a application server(where I have the central administration / card0027) I got the error bellow:

Deployment Status: Error
Deployed To: None
Last Operation Result: Some of the files failed to copy during deployment of the solution.
Last Operation Details: CARD0023: http://card0027:11000/ : The solution was succesfully deployed.
    CARD0027: http://card0027:11000/ : The solution was succesfully deployed.
   CARD0023: http://card0027:11000/ : The solution was succesfully deployed.
   CARD0024: http://card0027:11000/ : The solution was succesfully deployed.
   CARD0027: http://card0027:11000/ : SharePoint - 11000 : Error: The web.config is missing from this IIS Web Site: C:\Inetpub\wwwroot\wss\VirtualDirectories\11000\web.config. 
Someone can help me?


André Rentes

VS2010 RTM bug?? Error Occurred in deployment step 'Add Solution': Value cannot be null. Parameter


I'm getting this error with Visual Studio 2010 (RTM) deploying to SharePoint 2010 (also RTM).

An "Empty SharePoint Solution" project with an OOB "Module" item added. Try to deploy and I get:

Error Occurred in deployment step 'Add Solution': Value cannot be null. Parameter name: s

The account I'm developing with has:

  • Domain Admin
  • Local Admin
  • SharePoint Farm Admin
  • Site Collection Admin
  • SQL "sysadmin"
  • SQL "DBOwner" on all config / content databases
  • UAC is disabled

The WSP package is created successfully, and if I roll it out using STSADM then it works perfectly. For some reason though Visual Studio 2010 thinks that it cannot be deployed!

Any ideas??

Martin Hatch
MCPD .Net Web Development
MCTS WSS 3.0 | MOSS 2007
Visit my Blog - www.martinhatch.com

Error occurred in deployment step 'Retract Solution': The language-neutral solution package was no


I've got the same error as those who opened this thread, but I'm looking for the cause of this error rather than deleting the solution file from SP2010 Server over and over again. 

I was developing and deploying with VS2010 and SP2010 Enterprise Edition just fine for over three month now and out of nothing this error pops up again and again for the same solution. I can't tell what I've changed or which software I might have installed in the meantime, so I can't give any hints what causes the errormessage. Which might be interesting: I installed my SP2010 Enterprise Edition in english and installed the german language pack afterwards. Kind regards, Andreas

Solution deployment fails using powershell



I am using a powershell script to redeploy our solution and immediatelly afterwards create a site collection.

Unfortunatelly, most of the times, the deployment script either FAILS with an ERROR, or just DOES NOT UPDATE the content that should be replaced(we experience both mis-replace of the content in the 14-th hive and the code from our assemblies).

When the script passes we left "mouth-open", when our QA complains the functionallity is not bettered - and we realise that the script has not done the work, though passed!

When the error occurred I get is "Access to the path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\<ourSolutionPackageName>\js\<ourJavaScriptFile>.js" is denied". I also got with other than javascript files on other locations in the 14-th.

In our environment we use the RTM SharePoint Server 2010.

I use the following sequence of cmd-lets:

$global:ErrorActionPreference = "Stop"
Add-PSSnapin Microsoft.SharePoint.Powershell
#Here, I delete site collections and content databases(If needed I'll show that code also)
$webApplication = Get-SPWebApplication $WebAppUrl
$appPoolName = $webApplication.ApplicationPool.Name
.$env:SystemRoot\System32\inetsrv\appcmd.exe recycle apppo

Error occurred in deployment step 'Add Solution': An object of the type Microsoft.Office.InfoPath.


While trying to deploy custom SharePoint workflow solution in VS 2010, along with InfoPath custom task edit form, I ran into the following error message.

Error occurred in deployment step 'Add Solution': An object of the type Microsoft.Office.InfoPath.Server.Administration.FormTemplate named xxx already exists under the parent Microsoft.SharePoint.Administration.SPFarm named xxx Rename your object or delete the existing object

How can I resolve this problem? I have did some research but none helpful so far.


Blog: http://convergingpoint.blogspot.com/

Error_1_Error occurred in deployment step 'Upgrade solution': Command ID 'Contoso.Commands.IsSolu


When following this article for creating a Custom Deployment Step for SharePoint Projects i get the following error. (MSFT Article: http://msdn.microsoft.com/en-us/library/ee256698.aspx)

Error: Error 1 Error occurred in deployment step 'Upgrade solution': Command ID 'Contoso.Commands.IsSolutionDeployed' is invalid.

I have gone through the article two times and each time it does the samething. Any reason why it can't see the Command ID?

Error occurred in deployment step 'Add Solution': Operation is not valid due to the current state


Hi all,

    I am trying to deploy my first Visual Webpart from Visual Studio 2010 to SharePoint 2010. It contains simple 'Hello World!' message. The project builds successfully, but when I try to deploy it, it gives "Error occurred in deployment step 'Add Solution': Operation is not valid due to the current state of the object"

I have enabled SharePoint Server Publishing Infrastructure in the site collection and site.  

Help please. 


Name: applicationtemplatecore.wsp
Type: Core Solution
Contains Web Application Resource: No
Contains Global Assembly: Yes
Contains Code Access Security Policy: No
Deployment Server Type: Front-end Web server
Deployment Status: Error
Deployed To:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend