0

Has anybody been successful in integrating the Enterprise Library v4.0 with SharePoint WSS 3.0? I created a very simple .ASPX page. It's only purpose will to be to connect to an Oracle database and display some values in a DropDownList. But right now, all it does is displays Hello World. I've added the necessary references and everything compiles fine. When I test the page, it displays Hello World. But once I add the using Microsoft.Practices.EnterprisesLibrary.Data, the page no longer works. I just get the standard Unknown Error message. Is there a log file I can check?

I'm looking for any steps or tips that I can use to get this up and running. I use this Enterprise Library in all my ASP.NET applications and it works great. Trying to get this to work in SharePoint seems like a natural fit. But why does it seem so difficult? And why does there seem to be a lack of information?

Anyways, thank you so much for any information anybody can provide.

DrZ
  • 106
  • 3

4 Answers4

1

I'm not sure about the Enterprise Library, but to get a more meaningful error message from SharePoint than the super informative "Unknown Error" message go modify a couple things in web.config:

  1. In <SharePoint><SafeMode> set the CallStack property = "true"
  2. In <system.web><compilation> set the debug property = "true"
  3. In <system.web><customErrors> set the mode property = "Off"
Cruiser
  • 268
  • 1
  • 5
0

Are you able to debug and see where the failure is occurring in your code? Is it occurring on an Enterprise Library related call? If so I would capture the exception that is being thrown and evaluate the message that it provides using; try {} catch (Exception ex) {}.

One thing I have seen with Enterprise Library that if it is not properly configured it will sometimes log messages to the Event Log on the server.

I'm sorry I can't get much more information without more technical details about your implementation. I can assure you though that Enterprise Library works very well with SharePoint and that for the past few years I have used Enterprise Library in all of my SharePoint solution work.

Eric Schoonover
  • 47,184
  • 49
  • 157
  • 202
0

Make sure you add the EntLib assemblies to the GAC and add them to the SafeControls section of your application's web.config...

axel_c
  • 6,557
  • 2
  • 28
  • 41
0

Follow up: the app I'm working on has it's own web.config file. I'm not sure if this is right or wrong. I've read where I should link the WSS web.config to my application and delete the one in my app folder. I tried that and when I did, I got an error message I've never seen.

So, I added the following to my local web.config

    <add assembly="Microsoft.Practices.EnterpriseLibrary.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    <add assembly="Microsoft.Practices.EnterpriseLibrary.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

and the error above disappears. My preference would be to use the web.config from WSS. I'm going to keep working on it and hope to find something that works so I can share.

DrZ
  • 106
  • 3