Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Usercontrol Webpart on GAC gives error...

  Asked By: Desmond    Date: Oct 27    Category: Sharepoint    Views: 6644

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.
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?



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on Usercontrol Webpart on GAC gives error... Or get search suggestion and latest updates.