.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

How to deploy a sub-site

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

I want to have a subste within my main site.  I already configured IIS to add the folder and convert to an application in IIS.

How in Visual Studio is the best way to deploy?  What I have been doing is creating a separate web application and then doing a file system deploy to the sub-folder on the target server.

This stinks a little because none of the paths work.

I.e., /images/ on the subsite is really /mainsite/images/ and such.

The biggest pain seems to be relative paths.

Is there a way to add the subsite to the main web project and still treat as a site (permissions, debugging, etc.)?




View Complete Post

More Related Resource Links

deploy web-site with different version on IIS

Hi,I have source-version of project and i need to deploy it on IIS. General project it properly deploy using VS2008, but issue is, if new revisionis created then i need to point new source to deploy web-site. In this case i need to remove created virtual dir for previous version.Is this possible to toggle virtual directory between two sources.I think one solution is to change virtual directory path to new one. Any other solution.Thanks,Nik

How to deploy dashboards made in dashboard designer to diferent site collections?

Hi I just migrated from sharepoint 2007 to 2010. We used to have performance point dashboards spread across libraries in subsites all across our primary site collection "Http://server:x" after I migrated I understand that I must migrate all performance point content to a new site or site collection made with the business intellingence template. I created a new site collection with this template (Http://server:x/sites/pps) and succesfully migrated all performance point content. Now I want to redeploy all the dashboards to their respective subsites in the  "Http://server:x" site collection so that everything looks exactly as it did when we where using SharePoint 2007. But when I try to deploy to a site I only get the option to deploy it to the ("Http://server:x/sites/pps") site collection and its respective libraries. I wish to manage all dashboard content centralized in (Http://server:x/sites/pps) but I want to deploy dashboards to libraries across  "Http://server:x" is this posible or how is Performance Point services supossed to work?   I also having trouble with DashBoard designer. I have everthing running on a Virtual Machine test enviroment. With windows server 2008 r2, 4 gb ram. Everything installed in one machine. And Suddently DashBoard Designer Crashes In the event log I get the error Dashboa

Can I deploy a custom site page from the VS2010 SharePoint project?

Hi We're setting up some demos of our sharepoint plugins and want to easily deploy these into sharepoint so that all members of the company can easily get the demos running on their own machines. This is fine for layouts, web parts and so on - but the demo also has a customised sharepoint home page (which I edited in SP Designer) - how do I make this edited home page part of the VS2010 project so that it can be deployed easily to any site collection?   Thanks  

Target a Specific Site/Web using Deploy in VS 2010 IDE

If using a SharePoint Project's context menu option of "Deploy", is there a way to specify a target (given the scope of the Feature, etc.)? Thanks.

Deploy to site collection root



I want to override the existing default.aspx in a blog site collection out of visual studio. How can I achiev that?

I tried several Module configs but none of them worke, becaus a list is required..


<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="Files" Url="

Create Custom Site Template & Deploy as Farm Solution


So I've seen a few posts and blogs about this, but nothing with the specific error I'm getting.  All I'm trying to do is create a custom site template from an existing site (now WSP), and make that custom template available in CA so I can create host-named site collections from that template in PowerShell.  Apparenly this was a lot easier in 2007, as you could just save your template as STP, and run some stsadm addsolution to get it in the farm.  With 2010, I've read there are 2 options:

  1. Install-SPWebTemplate
  2. Deploy via Visual Studio 2010

I've tried running Install-SPWebTemplate (which only takes CAB files), and NOTHING I do works.  I've created a cab from the WSP with makecab, I've renamed the WSP to CAB, and all I get is "cannot find or parse web template file".  So on to VS2010.

Using this article as a guide (http://msdn.microsoft.com/en-us/library/ff408263.aspx), I created a new 2010 Import existing solution project, left all items selected, and the import was successful.  I made a change or two to the ONET.xml to fix some things, and then I just try to deploy it to the farm.  Whether I set the URL to the root intranet site, or the CA URL, I get deployment conflict errors:

"The URL or

Can't deploy SharePoint solution even after changing Site Url property



I've developed a SharePoint 2010 solution in VS2010 and i've also deployed it on my site collection - everything works perfect, fine!

But when I try to deploy the same solution in another site collection (on local server not remote) by changing Site Url property of the solution to my new site collection, VS is not deploying the solution. I'm getting the following error:


Error 102 Error occurred in deployment step 'Recycle IIS Application Pool': Cannot connect to the SharePoint site: http://newsiteurl/. Make sure that this is a valid URL and the SharePoint site is running on the local computer. If you moved this project to a new computer or if the URL of the SharePoint site has changed since you created the project, update the Site URL property of the project.


I've packaged the solution and deployed it manually, it's working fine but i don't understand why i'm not able to deploy the solution on a different site collection on the same machine??

Does anyone else has experienced the same issue? 



Thanks & Regards,


deploy test site collection to production

I have developed sp2010 site collection at my  end and want to deploy to the client at different geo location. this site collection have bunch of sites, features and custom webparts. please let me know, the best of doing this! thanks.

Deploy Site from Template

I have a template site that I have created with Sharepoint designer. I have created a template that is available in the solutions gallery and try to create a site from the template and the system errors out. I would like to upload my template to you test. Error message has an id in it which I can get if I need to. The error states that an error has occurred I click ok and go back to the create a site page.

Cannot deploy custom MemshipProvider/RoleProvider assembly to web-site


I have written an assembly (DLL) containing two classes, MyMembershipProvider and MyRoleProvider, which are derived from MembershipProvider and RoleProvider, respectively.  I have implemented most but not all of the abstract methods; the remaining ones all throw a NotImplementedException.  I have signed the assembly and added a reference to it in my web-site project, where the relevant web.config sections look like this:

<membership defaultProvider="MyMembershipProvider">
    <add name="MyMembershipProvider" type="MyAuthentication.MyMembershipProvider"/>


<roleManager enabled="true" defaultProvider="MyRoleProvider">
    <add name="MyRoleProvider" type="MyAuthentication.MyRoleProvider"/>

When I fire up the site, however, I get the following error:

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error detail

How to Deploy MOSS Site Collection using backup/restore with DB attach

Can anyone give pointers on Deploying Moss Sites from Development Environment to Production Envirnment Using backup/restore with DB attach?? TIA
Thanks, Devi Prasad M

How to Save a site template to farm and deploy it to new site


Hi all,

When I create a new site and plan to save it as template to create multiple new sites.

Different from MOSS 2007, I cannot find the Save Site as Template option under System Settings. What I did is to type savetmpl.aspx website and save the template.

After that, I tried to use stsadm.exe -o addtemplate command to add the template to farm, but I got another error again!

Cannot find or parse web template file c:\Templates\template.wsp.

I googled a lot websites but only found one related solution to to use stsadm.exe -o addsolution command. But after trying that, I still cannot  see the template when I create new site collection via Sharepoint Central Administration.

Can anyone please help me and let me know how to fix the issue?




Deploy site templates using WSP



please guide me to deploy a Site template as wsp .

thanks in advacne

EventReceiver oddities: When deployed as site scoped feature, it attaches to all lists - when deploy


Well this strikes me as very odd...

I have a VERY simple event receiver, running on ItemAdded, doing actually nothing but log for testing purposes. In the elements.xml it is attached to a specific List template (ListeTemplateId="10002").

My feature to deploy the list and the event receiver is site collection (site) scoped.

Everything deploys fine, but here comes the funny part:

(A workflow is attached to the said list)
After creating a new item in the list, the EventReceiver fires - all good. But it also fires for the Workflow History + Workflow Task list which have been touched by the workflow.

This seems impossible as I told the EventReceiver to only fire for the list with Template ID 10002... When trying to "find" the deployed EventReceiver via the OM - I cannot find it anywhere. It is actually not attached to the list (list.EventReceivers is empty besides the workflow event receivers) and it is not listed under SPWeb.EventReceivers. Neither the Workflow History nor the Workflow Task list has any EventReceiver.

The solution: Create a new web scoped feature and deploy the EventReceiver with that one. Outcome: Everything like it should be - the EventReceiver is only firing for the list I specified.

Why is this craziness happening?

Changing the graphics on the home page of a SharePoint site

When you create a site in Microsoft Windows SharePoint Services by using the default Team Site template, the home page includes two default graphics. A Windows SharePoint Services graphic appears in the body of the page, and a picture of a house in a circle appears near the site title. You can change these graphics to customize your site. Changing the smaller graphic requires a Windows SharePoint Services compatible Web page editor

Take a tour of your SharePoint site

What is a SharePoint site for?
A SharePoint site is a Web site that provides a central storage and collaboration space for documents, information, and ideas. A SharePoint site is a tool for collaboration, just like a telephone is a tool for communication, or a meeting is a tool for decision making. A SharePoint site helps groups of people (whether work teams or social groups) share information and work together. For example, a SharePoint site can help you:

Coordinate projects, calendars, and schedules.
Discuss ideas and review documents or proposals.
Share information and keep in touch with other people.

Six easy ways to customize your site using Web Parts in SharePoint

Becoming familiar with Web Part customization techniques gives you a range of page-customization choices. For example, you can customize your site's home page so that it displays the specific information that your team needs. You can rearrange the list items on the home page, add lists, and even change the images on the home page. As you become more familiar with Web Part Page customization techniques, you can build interactive Web Part Pages that makes the data in lists more dynamic and useful, and you can add new Web Parts that provide access to external data and Web services.
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