Shridhar
Guest
|
Posted:
Sun Jan 02, 2005 2:11 pm Post subject:
Plaing complex webpart on GAC? |
|
|
Hi,
I have gone through your article about building webpart. We have a doubt
that If we want to place a webpart on GAC what all the steps we need to do
and what are the benifits(ofcourse I know benifits)?
Senario:
We have created a a complex webpart say treeview webpart. We have created a
strong name for all the dependency dll and my webpart dll also. then if we
want to install on GAC deployment, Do we need to add "-- globalinstall"
(only the difference with GAC) at the time of deployment? and we wrote safe
assemly control to manifest.xml for all the dependency dlls, Should we remove
from Manifest.xml as it is going to place on GAC?
One more thing is, as We have registered the webpart in GAC, Can we remove
the webpart dlls from the bin directory of portal server?
Please give your approach how we can implement the webpart on GAC.
Regards,
Shridhar |
|
Shridhar
Guest
|
Posted:
Sun Jan 02, 2005 8:37 pm Post subject:
RE: Plaing complex webpart on GAC? |
|
|
Good Morning,
We have implemented a small application. For the simple webpart which does
not interact with database will gives correct output either by placing dlls
in bin directory or by placing on GAC.
For simle webpart:
* Bin folder can be removed from the SPS folder if it is placed in GAC. and
is available to all vertual servers.
Now same way We tried to create strong names for complex webpart.
Senario:
one web application displays list of data from database. We created it as
ascx file. We created and build with strong name keys. as a Next step, We
have added reference dll of the above application to webpart. We created a
strongname key also. We have loaded with the help of "Page.LoadControl"
method.
Finally we have placed both the "webpart dll" and "webapplication dll" in
GAC.
Now We tried to add the webpart on the SPS page, it gives usual error(not
safe conrol error) as:
"An unexpected error has occurred.
Web Parts Maintenance Page: If you have permission, you can use this page to
temporarily disable Web Parts or remove personal settings. For more
information, contact your site administrator. "
Now again If we remove both the dlls from GAC and remove the snks from both
the webpart and web app project and rebuild, its nicely displays the user
control data which comes from database on SPS.
Can anybody help on this issue?
Thanks,
Shridhar |
|