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

M

Michael Howes

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
 
C

Cowboy \(Gregory A. Beamer\)

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.
 
M

Michael Howes

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top