locked
problem using data access app block for .Net 1.1 RRS feed

  • Question

  • User-146848197 posted

    hi,

    i am trying to use the data access app block in one of my web app project. everything (Ent Lib and Web Proj) is in .net 1.1

    i am facing dll security context problem because the daab tries to log some events in the registry. i am not sure whether i am doing anything wrong while using this DAAB in my proj.

    I have successfully used the old version of DAAB i.e. SqlHelper Class but this time i am using the DatabaseFactory Concept of latest version of DAAB.

    Tuesday, October 10, 2006 11:44 AM

Answers

  • User-73514677 posted

    Hi..

    please do check this url, it provides a detailed report on using the Enterprise library 1.1 for the DAAB.

    http://aspnet.4guysfromrolla.com/articles/030905-1.aspx#postadlink 

     Hope this will solve your problem.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 22, 2006 12:48 AM
  • User-146848197 posted

    [Yes] thanks for the reply. but the thing is a bit different.

    [:D] actually i found the problem that i was facing. here is the solution i found.

     by default the "Release" build of Enterprise Library June 2005 for .Net Framework 1.1 includes code for Event Logging and Tracing, etc.

    When you use this build in your application for Windows Application, you face no problem because most of the time you have enough access rights on local system that allows this event logging and tracing to occur in the Event Log and Performance Counters in the Registry or somewhere (exactly what goes where i have not gone to look deeper but this is how it goes on).

    I was trying to use the DAAB in the ASP.Net Web Project. Here i used the "ReleaseFinal" build of Common.dll , Configuration.dll and Data.dll. Then it gave me error because the ASP.NET is a low previlige account having no access to Registry atleast. Then we found out that the ReleaseFinal build of Common.dll was not removing any Tracing or Event logging code. We removed those Conditional Compiler Directives from the Configuration Menu of project "Common" and then everything went smooothly.

    I posted this topic here so that anybody facing problem like me can get more info about it. Admins pls remove this topic if you find it imporoper.

     -Dhruvin (Happily coding with Ent. Lib June 2005 for 1.1 [:)])

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, November 27, 2006 5:03 AM

All replies

  • User-73514677 posted

    Hi..

    please do check this url, it provides a detailed report on using the Enterprise library 1.1 for the DAAB.

    http://aspnet.4guysfromrolla.com/articles/030905-1.aspx#postadlink 

     Hope this will solve your problem.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 22, 2006 12:48 AM
  • User-146848197 posted

    [Yes] thanks for the reply. but the thing is a bit different.

    [:D] actually i found the problem that i was facing. here is the solution i found.

     by default the "Release" build of Enterprise Library June 2005 for .Net Framework 1.1 includes code for Event Logging and Tracing, etc.

    When you use this build in your application for Windows Application, you face no problem because most of the time you have enough access rights on local system that allows this event logging and tracing to occur in the Event Log and Performance Counters in the Registry or somewhere (exactly what goes where i have not gone to look deeper but this is how it goes on).

    I was trying to use the DAAB in the ASP.Net Web Project. Here i used the "ReleaseFinal" build of Common.dll , Configuration.dll and Data.dll. Then it gave me error because the ASP.NET is a low previlige account having no access to Registry atleast. Then we found out that the ReleaseFinal build of Common.dll was not removing any Tracing or Event logging code. We removed those Conditional Compiler Directives from the Configuration Menu of project "Common" and then everything went smooothly.

    I posted this topic here so that anybody facing problem like me can get more info about it. Admins pls remove this topic if you find it imporoper.

     -Dhruvin (Happily coding with Ent. Lib June 2005 for 1.1 [:)])

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, November 27, 2006 5:03 AM
  • User-1355649840 posted

    If you want to use the instrumentation, you can still do so. The EntLib (June 2005 release) includes a batch file called InstallServices.bat that will install the instrumentation on your machine (in fact, you need to do this just to develop an EntLib app). The problem comes when you go to deploy your ASP.NET app to a web server, because InstallServices.bat is dependent on Visual Studio being installed. To get around this, I create a DeployServices.bat file, which does the same thing only without the Visual Studio dependency.

    You can download the instructions and batch file here:
    http://www.noonanconsultinginc.com/miscfiles/DeployServices.zip

     

    Tuesday, November 28, 2006 3:44 PM