473,378 Members | 1,571 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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

Aug 26 '08 #1
2 1123
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" <Mi***********@cdph.ca.govwrote in message
news:u4**************@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
Aug 27 '08 #2
>
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

Aug 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ana RM | last post by:
Hi everybody, I have a problem in Discoverer. The point is that I donīt want to refresh data each time I open a workbook. I want to mantain old reports. If I open a report without connecting...
6
by: John Morgan | last post by:
I urgently need tom use SP3a upgrade the instance of SQLServer200 MSDE runing on my local machine but I am having problems in doing so. My first problem is that when I start the set up procedure...
3
by: W Akthar | last post by:
Hi I am trying to create a windows service which queries SQL Server on timed intervals and depending on the results send appointments to Outlook. The problem lies when I try to create an...
12
by: Ann Marinas | last post by:
Hi all, I would like to ask for some help regarding separating the asp.net webserver and the sql server. I have created an asp.net application for a certain company. Initially, we installed...
4
by: snowweb | last post by:
I am trying to implement a CSS hierarchical unfolding menu on a site. The thing is, it needs to be dynamically populated from the results of a database query. I previously had the menu working but...
0
by: Suresh | last post by:
Hi Guys I have Db2 server installed on remote server. i am connecting to that remote server by using VPN. I want to connect that remote DB2 server instance using my local machine DB2...
5
by: Glen Buell | last post by:
Hi all, I have a major problem with my ASP.NET website and it's SQL Server 2005 Express database, and I'm wondering if anyone could help me out with it. This site is on a webhost...
1
by: ishwarjoshi | last post by:
I am in the process of upgrading an old Access ADP/SQL 2000 App to Access 2007 ADP/SQL 2005. There are a lot of buttons in the Access form which are calling Access Macros, the Macros call...
1
by: sravani1 | last post by:
I am new to the php. i wrote the code to connect to the database. I will use the following code. <?php $con = mysql_connect("localhost","root","root"); if (!$con) { die('Could not connect:...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.