Problem connecting to the database after upgrading from .Net 1.1to .Net 3.0??

Discussion in 'ASP .Net' started by Michael Howes, Aug 26, 2008.

  1. I am trying to upgrade a large asp.net application from .Net 1.1 to
    ..Net 3.0

    I'm getting an error when connecting to the database now that the app
    runs as a .Net 3.0 application.

    the database connection code is part of Microsoft's ApplicationBlocks,
    the Data Access Block. The project is using the SQLHelper class from MS.

    The connection fails the SqlConnection call to Open()
    Looking at the SQL Server 2005 logs it thinks the "Login failed" with
    an Error 18456, Severity 14, State 5 which I think means some sort of
    wrong password.

    The exact code works in .Net 1.1
    The error happens after upgrading .Net 3.0
    If I change the <trust level= in the web.config from Medium to Full
    the .Net 3.0 call to SqlConnection.Open() works just fine.

    This application needs to run under Medium trust.

    anyone have any ideas what I need to change to get this to work under
    Medium trust? Other settings I need to make in the web.config maybe?
    Do I need to upgrade to a newer version of Microsoft's Enterprise
    Library?

    thanks
    mike
    Michael Howes, Aug 26, 2008
    #1
    1. Advertising

  2. Re: Problem connecting to the database after upgrading from .Net 1.1 to .Net 3.0??

    Ther simple answer is aim for the newer Enterprise library. This means
    changing code, as it is completely different from the Application block you
    are using.

    Another option is to run in debug and find out where it is blowing up and
    correcting that code. Maybe not the best long term strategy, but it works.
    You will need to run against the block's source code to do this, not the
    compiled block.

    --
    Gregory A. Beamer
    MVP, MCP: +I, SE, SD, DBA

    Subscribe to my blog
    http://feeds.feedburner.com/GregoryBeamer#

    or just read it:
    http://feeds.feedburner.com/GregoryBeamer

    ********************************************
    | Think outside the box! |
    ********************************************
    "Michael Howes" <> wrote in message
    news:...
    >
    >
    > I am trying to upgrade a large asp.net application from .Net 1.1 to .Net
    > 3.0
    >
    > I'm getting an error when connecting to the database now that the app
    > runs as a .Net 3.0 application.
    >
    > the database connection code is part of Microsoft's ApplicationBlocks,
    > the Data Access Block. The project is using the SQLHelper class from MS.
    >
    > The connection fails the SqlConnection call to Open()
    > Looking at the SQL Server 2005 logs it thinks the "Login failed" with an
    > Error 18456, Severity 14, State 5 which I think means some sort of wrong
    > password.
    >
    > The exact code works in .Net 1.1
    > The error happens after upgrading .Net 3.0
    > If I change the <trust level= in the web.config from Medium to Full the
    > .Net 3.0 call to SqlConnection.Open() works just fine.
    >
    > This application needs to run under Medium trust.
    >
    > anyone have any ideas what I need to change to get this to work under
    > Medium trust? Other settings I need to make in the web.config maybe?
    > Do I need to upgrade to a newer version of Microsoft's Enterprise
    > Library?
    >
    > thanks
    > mike
    >
    Cowboy \(Gregory A. Beamer\), Aug 27, 2008
    #2
    1. Advertising

  3. Re: Problem connecting to the database after upgrading from .Net1.1 to .Net 3.0??


    >
    > Another option is to run in debug and find out where it is blowing up
    > and correcting that code. Maybe not the best long term strategy, but it
    > works. You will need to run against the block's source code to do this,
    > not the compiled block.
    >


    the reason I think it's a trust issue is because I did trace and it
    gets to the SqlConnect call to .Open() and fails. But this fails only
    under Medium trust and not Full trust. In other words I already know
    where it's failing, just don't have a guess as to why.

    mike
    Michael Howes, Aug 27, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U1hM?=
    Replies:
    1
    Views:
    1,969
    Brian K. Williams
    Feb 20, 2004
  2. Michael Howes
    Replies:
    2
    Views:
    683
    Michael Howes
    Aug 27, 2008
  3. Pravin Kulkarni

    Problem with AJAX controls after upgrading framework

    Pravin Kulkarni, Jul 27, 2009, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    726
    Pravin Kulkarni
    Jul 27, 2009
  4. Replies:
    3
    Views:
    190
    Bob Barrows [MVP]
    Jan 25, 2006
  5. Pablo Q.
    Replies:
    3
    Views:
    97
    Giuseppe Bertini
    Jan 2, 2009
Loading...

Share This Page