Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm new to the SharePoint platform, although I've been coding in the .NET platform since v1.1.

I created a customization that takes a SharePoint Library, iterates through the items and changes permissions as per the spec of the project. This feature is supposed to fire on a button click in what I understand to be a Solomon-derived Portal.

To complicate things, the button click happens in a classic ASP page written in VBScript. My code in the ASP page is as below:

   Set Expenses = CreateObject("ExtenderLib.PRCustomization")
   Call Expenses.SetPermissions(...)

The call fails on the Set line with an error 500.

Unfortunately, this is my first foray into classic ASP since I jumped straight into .NET development

In my test web app (.NET 3.5), the function calls contained in my DLL assembly work perfectly.

Noteworthy:

  • I am the domain admin
  • The function calls impersonate the Service Account
  • The Solomon Business Portal is in .NET 2.0 (according to IIS)
  • The assembly is built to be COM-visible
  • I created a strong-named key-file as part of creating the assembly
  • I used regasm (with parameter /codebase) to create the TLB which resides in a folder with the assembly DLL and the WSS DLLs
  • Component Services do not show an entry for ExtenderLib (EDIT: It does now)
  • I added a bin folder to the asp website into which I copied the assembly DLL, PDB and TLB
  • I used gacutil and ExtenderLib shows up in GAC
  • I've checked Event Viewer and IIS Logs. Nothing obvious.
  • I've tried both Server.CreateObject() and just CreateObject(). Both fail.

Platform: WSS 3.0 (v12.0.6219.1000), Windows 2003 Ent R2 SP2, VS 2010 Pro

Thanks for your help. It feels very close but I can't seem to button this up.

share|improve this question
    
You really need the specific error as there are about a dozen ways that this could be failing –  Dave Wise Feb 23 '12 at 18:58

3 Answers 3

First thing you want to do is to make the error message visible. You can attach the debugger to IIS worker process running the SharePoint application pool or (much easier) change the following web.config settings for the web.config beloging to the SharePoint site to these values:

  1. Under system.web: <customErrors mode="Off" />
  2. Also under system.web: <compilation debug="true">
  3. Under SharePoint: <SafeMode CallStack="true">

The location of the actual web.config varies quite a lot. It depends on the settings when the SharePoint web application was created.

share|improve this answer
    
Thanks for the suggestion. I did as you described above but it failed to break on the error. It still showed the generic web error page in the IFRAME. I'm fairly certain I went to the correct web.config as I went to IIS > SharePointSite > ASP.NET tab and opened the web.config referenced in the File Location text box. I'll look for others... –  Marc Feb 23 '12 at 22:48

Did you try impersonating the farm account? This wouldn't be what you would want to do in your production app, but might help you get to the bottom of the error. Also, if it's a sharepoint issue, did you review the SharePoint ULS?

share|improve this answer
    
No, I did not; we changed course to get things done quicker (see my answer). Thanks for the input; it's a strategy for next time :-) –  Marc Feb 25 '12 at 0:22

I apologize if this ends up being a misleading answer.

Because of time crunch, and not knowing how much longer it would take to troubleshoot the DLL/COM issue, I ended up wrapping up the functionality needed in a web service and calling the WS from ASP using SOAP.

No DLLs to deploy, no TLBs to register, no changes to GAC.

Thanks to everyone who commented!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.