hello all....i'm got a little problem here...i hope youu
guys can help me...
ok...first, i'm using asp.net for my web application. when
i run it in my own server, it's ok...got nothing problem
with connection to my database(in the same server)
but...when i'm bring it to my web server with a same
application and a same database, it has a problem...i've
got an error:
Login failed for user '(null)'. Reason: Not associated
with a trusted SQL Server connection
aspx page working properly...but i think it's problem with
my connection to database..i declare my connection stringg
at global.asax.vb like this:
Public Const dbstring As String = "integrated security =
sspi; initial catalog = sola; data source = server10"
can you guys help me......Zalizan,
are you impersonating the user, and / or using anonymous access?
If you are using impersonation and anonymous, then the IIS anonymous user
from the new box will need adding as a login to SQL Server.
If you aren't using impersonation and have anonymous, then the
IISComputer/ASPNET login will need adding.
Alternatively you could use SQL Server logins, especially if you are on
different domains.
HTH,
Paul Ibison|||for your information sir, i'm new with Sql Server, and i
think i have added IIS anonymous user at SQL in Web
server. so can you give me a better way to add login to
user. And how i want to know that if i use anonymous
access or not
>--Original Message--
>Zalizan,
>are you impersonating the user, and / or using anonymous
access?
>If you are using impersonation and anonymous, then the
IIS anonymous user
>from the new box will need adding as a login to SQL
Server.
>If you aren't using impersonation and have anonymous,
then the
>IISComputer/ASPNET login will need adding.
>Alternatively you could use SQL Server logins, especially
if you are on
>different domains.
>HTH,
>Paul Ibison
>
>.
>|||Zalizan,
if you open Administrative Tools, Internet Service Manager, open up your
website, right-click and go to properties. On directory security, click
edit, and the top check box will show if you have enabled anonymous. It is
enabled by default. As far as asp.net is concerned, unless you are using
impersonation (not on by default) you will be using a windows user called
ASPNET if your connectionstring selects trusted security. The "ASPNET" user
account is created in Windows by Microsoft .NET Framework. It is an
automatic machine account created to limit access rights of .NET
applications. In your case I believe this account should be added as a login
to SQL Server.
To be sure of using the correct connection string syntax, you could create a
UDL file. To get the udl file to open, create a blank textfile named as
xxx.udl. Then double click it to go through the wizard. Inside the udl file
(if you open using notepad) will be the connection string in the correct
format. The connection object is set using this string as follows:
SQL:
cn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User
ID=name;Password=password;Initial Catalog=database;Data Source=servername"
Trusted:
cn.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist
Security Info=False;
Initial Catalog=database;Data Source=servername"
hope this helps,
Paul Ibison
No comments:
Post a Comment