SQL Server does not exist

R

rbutch

guys i need some help here. what was working somehow has has stopped. the drive in the machine i was using died and was replaced, so i had to re-install SQL Server.
i was developing on my laptop with an instance of sql server using the conStr of("Data Source=(Local);Initial Catalog=A39;Integrated Security=SSPI;")

that way when i deployed the web application on the other machine everything would line up and it does (or used to)

i installed Sql Server 2000 using "Local Computer" // Default is Checked // Typical Install //and i chose "Use the same account for each service.Auto start Sql Server Service" (that radio button) is checked
Also Using the LocalSystem account and Windows Authentication Mode.

to set up the Trust connection i go to EnterPrise Manager / Security /Logins
and select New Login //Machine Name (HQJ1759D01) and ASPNET from Login Properties.
But, i get the dreaded ''Server Does not exist or access denied'' when trying to log on to the database i created.

Now the weird part. i did a capture of the Sid =Environment.UserName
and fully expected to see ASPNET populate that, however it came up as IUSR_HQJ1759D01 - the built in account for anonymous access.

so, im thinking it's somehow not getting the ASPNET user.

has anyone had this problem before? and is maybe the problem not in SQL Server but somewhere else. IIS looks normal to me.
any help is totally appreciated.

thanks
rik


**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
N

Norman Yuan

Go check the ASP.NET app's web.config. you may find something like:
<identity impersonate="true" />

If the ASP.NET app is allowed anonymous access and you set impersonate=true,
the running account uses IIS default account (IUSER_MachineName). If
impersonate=false or not set (default to false), then the running account is
the ASP.NET default account: ASPNET or NETWORK SERVICE.

Basically, there is no need to set impersonate=true when anonymous access is
allowed, unless there are other web apps run on the same IIS and you want
all access under the same account (IUSER_MachineName) in order to simpliy
user account management.


rik butcher said:
guys i need some help here. what was working somehow has has stopped. the
drive in the machine i was using died and was replaced, so i had to
re-install SQL Server.
i was developing on my laptop with an instance of sql server using the
conStr of("Data Source=(Local);Initial Catalog=A39;Integrated
Security=SSPI;")
that way when i deployed the web application on the other machine
everything would line up and it does (or used to)
i installed Sql Server 2000 using "Local Computer" // Default is Checked
// Typical Install //and i chose "Use the same account for each service.Auto
start Sql Server Service" (that radio button) is checked
Also Using the LocalSystem account and Windows Authentication Mode.

to set up the Trust connection i go to EnterPrise Manager / Security /Logins
and select New Login //Machine Name (HQJ1759D01) and ASPNET from Login Properties.
But, i get the dreaded ''Server Does not exist or access denied'' when
trying to log on to the database i created.
Now the weird part. i did a capture of the Sid =Environment.UserName
and fully expected to see ASPNET populate that, however it came up as
IUSR_HQJ1759D01 - the built in account for anonymous access.
so, im thinking it's somehow not getting the ASPNET user.

has anyone had this problem before? and is maybe the problem not in SQL
Server but somewhere else. IIS looks normal to me.
any help is totally appreciated.

thanks
rik


**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP &
ASP.NET resources...
 
R

rbutch

i checked and <identity impersonate="true" /> was not in web config.
so i put it in there and changed it to "false"

now the interesting part. it still gives me Sql Server does not exist or access denied, but it recognizes ASPNET as the user.
so, that's a change but still doesnt solve the problem.
is there something else i might have missed???

thanks again for your help
rik

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
R

rbutch

i just connected using VB.NET and a hard coded connectionstring,so, it must be an ASP.NET kind of thing but for the life of me i cannot figure this out at all.
i dont know where the problem could be.
is it in the web app itself - or in sql server?

this is totally frustrating and im wondering now if the tech who re-imaged this machine could have done something in the local policy that could prevent this or is this just between the asp.net application, IIS and SQL Server??

thanks
rik

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
N

Norman Yuan

OK, after your know which account is running your app ("MacineName\ASPNET"),
you now need to take look at SQL Server's Logins. Open Enterprise Manager,
click "Console Root->Microsoft SQL Servers->Sql Server Group->(local)(Or
whatever server name)->Security->Logins". On right side, do you see
"MachineName\ASPNET" in the Login list? If not, of course ASPNET cannt get
in. If yes, right-click and select "Properties". On "Database Access" tab,
check the database(s) you want this Login (ASPNET) to have access to. and
click "OK"

After this, the ASPNET may still cannot perform anything on the database, if
the SQL Server Admin set all objects in the database ti deny for this
account. Many DB admin only allow access through SPs, for example. You may
need to learn more about basic SQL Server security.


rik butcher said:
i just connected using VB.NET and a hard coded connectionstring,so, it
must be an ASP.NET kind of thing but for the life of me i cannot figure this
out at all.
i dont know where the problem could be.
is it in the web app itself - or in sql server?

this is totally frustrating and im wondering now if the tech who re-imaged
this machine could have done something in the local policy that could
prevent this or is this just between the asp.net application, IIS and SQL
Server??
thanks
rik

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP &
ASP.NET resources...
 
R

rbutch

well - on this machine - I'm the Admin and i went to each table and made sure that the user HQJ1759D01\ASPNET had permission.
like i said - until technology put a new drive in this system, all worked with no problem. that's the only difference. can a local policy cause this denial??

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
R

rbutch

okay guys, im putting this to bed. i grabbed an identical machine. slapped an instance of Sql Server on it.....................and it connects w/ no problem.

all i can come up with it some how when this machine was reloaded - something was done to prevent this connection.

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 

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

Top