Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Security (http://www.velocityreviews.com/forums/f62-asp-net-security.html)
-   -   Problem connecting to the database after upgrading from .Net 1.1to .Net 3.0?? (http://www.velocityreviews.com/forums/t769939-problem-connecting-to-the-database-after-upgrading-from-net-1-1to-net-3-0-a.html)

Michael Howes 08-26-2008 10:51 PM

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


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\) 08-27-2008 02:02 AM

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" <Michael.Howes@cdph.ca.gov> wrote in message
news:u4TNE58BJHA.2476@TK2MSFTNGP06.phx.gbl...
>
>
> 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 08-27-2008 05:34 PM

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



All times are GMT. The time now is 04:33 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.