Access denied problem

  • I've just deployed my ASP.NET application (at an ISP) and when I first hit my SQL database I get an exception:-

    'SQL Server does not exist or access denied'

    I can get in ok using SQL Query Analyser using the same user id, and password

    Can anybody help please.

    Cheers,

    Bernie

  • Are you sure about your ASP.NET code?

    Secondly, is the SQL Server on the same machine as the IIS Server? If different boxes, are you sure both machines can access each other (firewalls, restricted user rights, ...)?

    Are you using NT security or SQL Server authentication?

  • Thanks for the reply.

    Yes i'm 100% positive of the ASP code (because even a test generated page fails to connect to the database). The SQL Server is on a different box, but its on a shared server, so I must assume the two boxes can see each other ok.

    I now suspect I have to create an ASPNET account on the database, as all aspx pages use this account to connect. Not sure I know how to do this, can anybody help?

  • Make sure you have the correct security settings in place on the IIS virtual app. My guess is that the application is trying to use the ASPNET local account to connect to your database.

  • Check the Start - Up Protokoll -

    SQL Server

    After Entry "Start TempDB" - you need

    that the Server Check

    TCP , Shared Memory and Named Pipes

    My Problem (on this Error) - The Server only

    Check Shared Memory and Named Pipes but NOT TCP

    Change Server Net Configuration - Port 1433 to 2433.

  • Accessing Remote Resources (Delegation)

    Sometimes the resource required by your application is on a computer other than the Web server. This is recommended for some resources, such as a database. In that case, the application must make a request to the remote computer on behalf of the user. This process is called delegation.

    As with any request for resources, a request to a remote computer must include appropriate credentials. If your application allows anonymous access, IIS and ASP.NET do not have the user's credentials and therefore cannot use them during delegation to access remote resources ....

    Search 'ASPNET user' in .NET Framework SDK Documentation.

    Regards.

  • What is the SQL connection string (minus pswd of course)? You cannot use trusted_connection since credentials will not be transferred on 2nd hop. If you create a sql account (does not have to be aspnet) and use that inSQL string it will work.

  • Are you able to successfully create a DSN on the web server with the same credentials as your code? Perhaps the user is not set to the correct default database?

    Dan B

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply