1. Set Output path of the projects (Project in which you are keeping webpart control classes) to the site bin folder. You can find the path by navigating to C:\Inetpub\wwwroot\virtual directory\port number\bin
2. Build the solution and make sure it is compiling successfully.
3. Add a safe control entry to the web config file. Do not mention public key token. Do not strong name the project.
4. That's it, your code is deployed in the site's bin directory and its information is located in the config file. Go Ahead and populate the web part gallery with the web part and add it to a page.
Advantages:
1. Biggest advantage is the fact that you do not have to reset iis after every compilation of code.
2. You can directly copy the dll from the other bin folders to this as and when required.
DisAdvantage
1. As you are deploying code to the bin folder of particular site, it will not be available globally. That means you will need to add the dll to every site's bin folder.
I hope this article will clear most of your doubts. In case something is not understood, do write a comment to this post or email us at sharepointkings@gmail.com
6 comments:
Useful stuff thank you! I wanted to avoid GAC'ing if I could.
In SharePoint, one can use PageViewer WebPart within a webpart page to display another web page within it. All that one is required to do is, provide the URL of the page as the ContentLinkparameter of the WebPart.
http://www.mindfiresolutions.com/lp/sharepoint-development.htm
very useful tips...
with the way we can prevent IIS reset and messy ddl in GAC.
I've deployed like this before. We have two Web Front ends so we have to deploy to both servers. One thing I was wondering about was DLL's we reference in our solutions. Would presume we need to deploy those too, but will our custom solutions know where to find them.. and does this get complicated if multiple web front ends? About to test this.
We've deployed like before. We have two Web Front ends so it's times 2. But now wondering what happens when your solution has DLLs it refrences, would imagine we have to deploy those too, but does the solution need to reference it locally? And how will that work when mulitple front ends. About to find out I guess - I suspect okay to refence on my client during dev and compile and then it's just needs to be avialble to the site under it's bin and safe in the web.config... well at least I'm hoping so.
while executing your solution, as far as reference found then it will not be any problem. reference may be from gac or bin will not make any difference for code (unless proper privilege issue).
just make sure your configuration step by step like first DLL, then web.config entries and at last the code which refers your DLL.
hopefully it should work this is what we hope also.
share your result as well with us.
Post a Comment