Can connect to sqlexpress via asp.net but not via asp



I can connect to a sqlexpress database using aspx (asp.net 2.0) pages
but not via classic asp pages. Both the asp and aspx pages are within
the same website. The sqlexpress database is also on the same server.

I have tried using a variety of connection strings within my asp pages,
including dsn, dsn-less, windows authentication, sql authentication
etc. (The sql express database by the way has mixed authenatication and
both work fine)

The errors I am getting are the following:

1. When I put a windows authentication string in my asp
page I get this error:

************
Provider error '80040e21'

Multiple-step OLE DB operation generated errors. Check
each OLE DB status value, if available. No work was done.

?, line 0
***************

2. When I use a sql authenticaion string, I get this
error:

********************
Microsoft OLE DB Provider for ODBC Drivers
error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not
found and no default driver specified

?, line 0
**********************

3. When I use a DSN connection string (with the DSN
connecting successfully within the ODBC utility) I get
this error:

******************
Microsoft OLE DB Provider for ODBC Drivers
error '80004005'

[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot
open database "xxxx" requested by the login. The login
failed.

?, line 0
***********************

As mentioned before I have no problems in connecting to
the database via aspx pages within the same website. I can also
successfully connect to the database via visual web developer or sql
express manager on the same machine.

Any ideas?

.



Relevant Pages

  • Re: Can I pass ASP Basic Auth Credentials to an APS.NET Forms Authentication site?
    ... assuming I can get the Username and Password. ... > application which uses basic authentication and one asp.net applicaiton ... The user ID and password database is the ... > A (ASP), so we can get username and password in ASP web application first ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • IIS7: cannot access a database from a page with authentication on local webserver
    ... I have an .ASP page that requires authentication. ... I enabled Windows Authentication in IIS Manager> Authentication. ... For the database, I successfully completed the solutions and workaround in KB article at ... Microsoft JET Database Engine error '80004005' ...
    (microsoft.public.inetserver.iis.security)
  • Re: C# vs in FrontPage
    ... I have to assume here that we are speaking about the Database Results Wizard or Database Interface Wizard both allow you to product ... You may wish to reproduce the pages in ASP which used VB Script. ... >I have some need to customise code in ASPX database pages created FrontPage 2003. ...
    (microsoft.public.frontpage.programming)
  • Re: Securing Non ASP.Net Files
    ... the ASP code inside the pages is already compatible with .NET. ... Both ASP and ASPX have access to cookies and the query string. ... the ASP pages could later use for authentication and authorization. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Call ASP.NET file in ASP
    ... I have some older sites using ASP and I'm trying to find out a way to ... call an .aspx page through an ASP page. ... As long as the asp.net application is not relying on authentication, ... should not get a problem using an aspx page to serve images ...
    (microsoft.public.dotnet.framework.aspnet)