Sunday, March 25, 2007

MOSS 2007

AS mentioned in previous posts, I have been trying to load a user control using a smartpart but this error was showing up:
"This page allows a limit of 200 controls, and that limit has been exceeded"
Still trying to find a resolution to this error.

Update: Though found a fix for it soon, but could not update it. Pedro Pablo left a comment about it: Thanks to Mark for showing for putting me in the right direction about this one.

In the Web.config change the MaxControls of safemode appropriately appropriately:

safemode allowpageleveltrace="false" totalfiledependencies="50" directfiledependencies="10" callstack="false" maxcontrols="500"

Type initializer not found

Adding a user control on a page which accesses the registry lead to this error.Running the web.config tool again with the proper credentials solved the error. This error may be specific to my application and hence will provide details later.
Also, the System.Security exception:Cannot access the registry showed up and this error was solved by adding the key "impersonate password="mypassword" username="unclesam"

type could not be found error

I was trying to load a user control onto a sharepoint webpage using smartpart, but "type not found error" was being displayed. The user controls code was a part of a dll and hence the dll was not a part of bin directory. Adding the dll to the bin directory solved the problem. :)

Wednesday, March 21, 2007

WebControl on a Page/UserControl

WebControl on a Page

  • Directly access the control using the ID
  • WebControl value(.text) is persisted and can be accessed in the page load event of the usercontrol textbox

WebControl on a UserControl

  • Cannot directly access the webcontrol using its ID
  • Need to use the dynamic generated id of the control : Usercontrolid + textboxid
  • In javascript, use the the clientid of the control to get the value of the webcontrol(directly using the textbox1.text would be show null value)

CS0006: Metadata file ************** could not be found

This error frustrated me for a long time today. It was working fine until, I deleted the references and started throwing up this error during building the solution. It worked fine after rebuilding the solution.
Guess I have to live with it for sometime untill, i research more on it. Every time I want to run the app, I have to run it twice to get it working.

Wednesday, March 14, 2007

MOSS 2007

I have been off late working with MOSS 2007 ( with no idea about sharepoint webpart development) and its has been a tough time for me since the past 2 weeks. Luckily, I have a helpful colleague who is helping me out. I have been reading quite a few blogs related to MOSS and it seems to be quite an interesting technology. For the past few months, I have also touched base with Sql Server Analysis Services, Reporting and Integration services.