SQL Server does not exist or access denied

G

Guest

I have developed a small application using ASP.NET and VB.NET on my
development machine it works great. When I copy across the files manually to
my test machine and create a Virtual Directory all of the functionality works
well except for a page with a datagrid that retrieves data from an MSDE
database (error message is detailed below). I have checked the connection
string and that looks good and MSDE is properly installed and configured on
the test box. By the way I have tried this on two separate test machines I
get the same error. At a loss to understand why. Do I need to run some exe
that lets my ASP.NET application to use MSDE, is it a permissions thing or
what?

By the way the error I get is as follows:

SQL Server does not exist or access denied.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: SQL Server does not
exist or access denied.
 
A

Andy Fish

this is the classic error that happens when anything goes wrong connecting
to SQL server.

my next step would be to write a windows forms test application with the
same connect string. if that can connect OK, you know it's some kind of
permissions problem; if it can't, it's probably a problem with the MSDE
configuration or connect string
 
G

Guest

Hi, earlier today I wrote a test page that inserted data into the database
and that worked. So does that mean permissions? If so what do I do?
 
A

Andy Fish

by "test page" do you mean a web page? if so, you have demonstrated
connecting to the database from asp.net so the problem is obviously inside
your existing application.

if it was a windows form, chances are you are falling foul of the fact that
asp.net runs as a low privileged user account whereas a windows form is
running as the account you are logged in as.

If you are trying to use windows authentication for the database, you need
to reconfigure asp.net to run as a more privileged account (I don't have the
details but I'm sure you could find them on google).

Otherwise, I guess there could be a problem with the file permissions you
need to access MSDE. I haven't used it myself as I normally use SQL server,
but I know that for oracle I had to change the file permissions on the
oracle installation directory so that the asp.net account had read access to
it.

Andy
 
G

Guest

Hi I’m using sql authentication with the sa user. I’ll try to do some Google
searches like ‘MSDE ASP.NET permissions setup’.

If you have any more input, go for your life. Things to search for etc.

Andy thanks for your help.
 

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,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top