SOLUTION: Problem connecting to sql server



Thanks... I have found the solution to the problem. Now I remember what I
did to make it work the last time I had this problem.

Yes, it is an account problem. All I did to make it work is change the
userName & password impersonation settings under processModel section in
machine.config file. By the default, they are set to 'Machine' &
'AutoGenerate' respectively. Setting to Machine will force Aspnet_wp.exe to
run under the built-in account ASPNET. But I wonder why it still doesn't
work even when I add ASPNET account to the Administrators group.

Then I tried setting it to 'System'. But this yields another error:- 'Login
failed for user 'sa'. Reason: Not associated with a trusted SQL Server
connection.' Not wanting to spend even more time to fix this error, I
decided to use my own login account. And it works now.

BTW, I set my login name and password in the registry and encrypt it using
aspnet_setreg to add some security.

This is a bug, but I wonder why nobody in this newsgroup have had this
problem.

For further readings, go to
http://support.microsoft.com/default.aspx?scid=kb;en-us;315159

Thanks to all.


"Andy" <Andy@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:3F46BF29-EA25-45EF-9DCD-7F705E1608ED@xxxxxxxxxxxxxxxx
> The problem sounds like an account problem. Your asp.net (web app) on your
> local machine is using your local asp account which doesn't have access to
> the SQL server you are trying to connect to. What you can do for testing I
> think is to change the account running your asp.net service on your local
> machine to your network account (however you log onto your network because
> that account has access to the server because your other process is
> working
> properly.) Please reply and let me know if this makes any sense and/or is
> helpful.
>
> It has been awhile since I have worked on this stuff, and if you need more
> detailed information, I will have to dig into it a bit more.
>
>
>
> "Ajak" wrote:
>
>>
>> "Skanda Subramanian" <skandy.sub@xxxxxxxxx> wrote in message
>> news:1136374033.705203.47780@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>> > Ajak:
>> >
>> > First thing, go to Client Configuation properties on the client machine
>> > by going to Start->un->cliconfg and check to see if the protocols are
>> > enabled. You may wish to try using a different protocol tha the one its
>> > failing with currently, like Named Pipes for TCP.
>> >
>>
>> Do you mean Client Network Utility? Is so, then you mean I need to check
>> its
>> settings on the SQL server, not my machine right?
>> I need to clarify that I didn't change anything on the SQL server. And my
>> Web Application works fine before I format and reinstall Win XP on my
>> machine. That's all I did.
>>
>> > Check to see if the account your application is trying to see has
>> > access on SQL Server.
>>
>> The account my web application is using is the 'sa' account and yes, it
>> has
>> all the privillege on the SQL server. And I'm sure the connection string
>> is
>> right because the same conn string used in 2 different types of app, ran
>> on
>> my one and only development machine -
>>
>> 1) Web Application written in VB.NET (Where I believe run by
>> aspnet_wp.exe)
>> <-- cannot find the server or access denied
>> 2) Stand Alone EXE written in VB.NET <--- yipeee! I can see the server
>> just
>> fine!!!
>>
>> On my mechine, I also installed SQL Client Tool such as Enterprise
>> Maneger,
>> Query Analyzer... They can find the SQL server without any problem. The
>> same
>> goes when I created System DSN in ODBC Data Source Administrator.
>>
>> That means, only the aspnet_wp.exe cannot find the server. Right?
>>
>> I am going to try connecting using classic ASP and see if the problem is
>> there as well.
>>
>> I hope I have explained the situation I'm having clearly.
>>
>>
>>


.



Relevant Pages

  • Re: Error 15401 using sp_grantlogin (not addressed by current KB articles)
    ... Restarting Windows 2000 resolved the problem for this particular account, ... confused when it sees a duplicate SID. ... > One way to get SQL Server to agree with the renamed NT ... > Preview (to ensure the script was created), ...
    (microsoft.public.sqlserver.security)
  • Re: SharePoint V3 Install Error
    ... But it our case it had to do with Group Policies that forbid the account of ... WSS FAQ:www.wssv3faq.com/wss.collutions.com ... Event Source: WindowsSharePointServices3Search ... whatever you are installing WSS as sufficient rights to the SQL Server ...
    (microsoft.public.sharepoint.windowsservices)
  • RE: Problems with WebParts
    ... to a database called aspnetdb. ... > The connection string specifies a local SQL Server Express instance using a ... > server account must have read and write access to the applications directory. ... > This is necessary because the web server account will automatically create ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Cannot connect to Query Analyzer
    ... For Query Analyzer, I tried replacing the file as you suggested but had the ... same results (Enterprise Manager starts up fine, ... I created an account on my laptop and changed SQL ... Try replacing the MMC app for SQL Server from the original ...
    (microsoft.public.sqlserver.connect)
  • Re: SMS Client issue
    ... The account with the error needs to be an administrator account on your ... communication and one to the SQL Server that account must exist in there. ... boundaries are correct to assign and install. ... Push installation to client machines does ...
    (microsoft.public.sms.misc)