SQL Server does not exist or access denied

Discussion in 'ASP .Net' started by =?Utf-8?B?Z2VvZGV2?=, Oct 20, 2005.

  1. 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.
     
    =?Utf-8?B?Z2VvZGV2?=, Oct 20, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?Z2VvZGV2?=

    Andy Fish Guest

    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

    "geodev" <> wrote in message
    news:...
    >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.
    >
     
    Andy Fish, Oct 20, 2005
    #2
    1. Advertising

  3. 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?

    "Andy Fish" wrote:

    > 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
    >
    > "geodev" <> wrote in message
    > news:...
    > >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.
    > >

    >
    >
    >
     
    =?Utf-8?B?Z2VvZGV2?=, Oct 20, 2005
    #3
  4. =?Utf-8?B?Z2VvZGV2?=

    Andy Fish Guest

    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


    "geodev" <> wrote in message
    news:...
    > 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?
    >
    > "Andy Fish" wrote:
    >
    >> 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
    >>
    >> "geodev" <> wrote in message
    >> news:...
    >> >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.
    >> >

    >>
    >>
    >>
     
    Andy Fish, Oct 20, 2005
    #4
  5. 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.


    "Andy Fish" wrote:

    > 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
    >
    >
    > "geodev" <> wrote in message
    > news:...
    > > 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?
    > >
    > > "Andy Fish" wrote:
    > >
    > >> 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
    > >>
    > >> "geodev" <> wrote in message
    > >> news:...
    > >> >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.
    > >> >
    > >>
    > >>
    > >>

    >
    >
    >
     
    =?Utf-8?B?Z2VvZGV2?=, Oct 20, 2005
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bassel Tabbara [MSFT]

    RE: SQL Server does not exist or access denied

    Bassel Tabbara [MSFT], Jun 25, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    2,396
    Bassel Tabbara [MSFT]
    Jun 25, 2003
  2. Ravikanth[MVP]

    SQL Server does not exist or access denied

    Ravikanth[MVP], Jul 14, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    469
    Fiona Wallace
    Jul 14, 2003
  3. Natty Gur
    Replies:
    4
    Views:
    618
    Fiona Wallace
    Jul 15, 2003
  4. John Toop
    Replies:
    0
    Views:
    429
    John Toop
    Jul 22, 2003
  5. gg
    Replies:
    0
    Views:
    383
Loading...

Share This Page