Re: Newbie question on SQL connection

From: Rudy (Rudy_at_discussions.microsoft.com)
Date: 01/14/05


Date: Fri, 14 Jan 2005 09:29:03 -0800

Hello Patrick and Peter,

Thank you for the advice. Patrick, I tried to add "localhost/aspnet, but
I'm not able to add non-domain user to the AD. And I don't think I really
want to.
Peter - I am using intergrated security. I think my connection string is
good, but I didn't think about adding the user to the string. Last night I
did put web online from my web server, which is also my domain server. And my
website launched, but when I went to login, it gave me an error. My login
names and password are part my database, so it's not connecting to the
database on my developer machine. Didn't try to connect to database on my
domain server, going to try that tonite.
Thanks again for the advise!

Rudy

"Peter Chadwick (MCP)" wrote:

> Hi,
>
> I take it you are using integrated security for connection to your SQL
> databases? In which case, the user your website uses will need access
> to the SQL databases (but I think you already know that).
>
> You can change the user your ASP.NET websites run under by changing the
> "processModel" section of machine.config (usually found in somewhere
> like C:\WINNT\Microsoft.NET\Framework\v1.1.4322\CONFIG), although I
> would be very careful doing this on anything other than a development
> machine. The ASPNET user deliberately has little permissions as it is
> essentially exposed to all users accessing the site.
>
> It sounds like you are approaching this correctly. It's good practice
> to develop databases away from the live SQL server - that way in the
> future you can develop changes to the database without affecting the
> existing version. And the beauty of connection strings is that you can
> change them to point to different databases/servers very easily.
>
> I'm not sure why you are getting that error when connecting to your
> domain SQL Server. Maybe there is a problem with permissions to your
> domain SQL server? Does your connection string contain a typo?
>
> Another option would be to set up a sql login (an actual sql server
> user) and connect using the username and password properties of the
> connection string rather than integrated security.
>
> Hope this sets you off in the right direction!
> Regards,
>
> Peter Chadwick (MCP)
> pete@code-explorers.com
>
>



Relevant Pages

  • asp.net 2.0 login control
    ... A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.] ... These problems left me stranded for days, then today, on another machine, I hit a different set of problems I kept getting the following "Failed to generate user instance of SQL Server due to a failure in starting the process for the user instance. ... (Basically this is a new option in the connection string that allows you to point out where the ..mdf file resides eliminating the need to create database in some SQL instance.) ... Beware that the windows account of the user that first creates the connection in this databaseless manner, becomes exclusive user for this file and no other windows account will be able to create a connection to this file. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: .NET and SQL Server on Separate Machines
    ... add this domain account as a valid login to your sql server. ... Everything was running correctly when the database ... > The connection string in our web.config file originally looked like this: ...
    (microsoft.public.sqlserver.connect)
  • Re: .NET and SQL Server on Separate Machines
    ... add this domain account as a valid login to your sql server. ... Everything was running correctly when the database ... > The connection string in our web.config file originally looked like this: ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: FP2003 fails to validate data connection
    ... The connection string is not correct or DSN are not correct. ... The machine is running XP Pro with IIS 5.1 and SQL Server 2000 both running. ... > The FP2003 Database Results Wizard and Database Interface Wizard have no problem locating the active DSNs on the machine, ... Other apps I have written have no problem using these DSNs. ...
    (microsoft.public.frontpage.programming)
  • Question on merge replication
    ... There is a second sql server on a different ... Database on main domain sql server is ...
    (microsoft.public.sqlserver.replication)