Hi,
Uses: Windows 2000 Server, Windows XP, Sql Server, ASP.NET 1.0, Visual Studio 2003, .NET Framework 1.1;
I've an ASP.NET application, and thought of deploying it in a Windows 2000 Server installed computer which also takes the role as Additional Domain Controller. I've installed .NET Framework 1.1 onto it as well, besides have run the ASP.NET application exposing the SQL Server's "SA" password in the Connection String which is stored in the Webconfig file. It was working perfectly without giving any errors.(The authentication mode is given to = forms). This the Webconfig file and the way I've declared the connection string to the SQL Server:
< xml version="1.0" encoding="utf-8" >
<configuration>
<appSettings>
<add key="Comm" value="initial catalog=DB;Password=mysqladminUser ID=sa;data source=sqlserver"/>
<add key="ConnectionString" value="server=MERCURYSVR;Integrated Security=SSPI;Persist Security Info=False;database=Call"/>
</appSettings>
<system.web>
<compilation defaultLanguage="vb" debug="true" />
<customErrors mode="RemoteOnly" />
<authentication mode="Forms">
<forms loginUrl="login.aspx" name="Comm" timeout="20"/>
</authentication>
<!-- AUTHORIZATION
This section sets the authorization policies of the application. You can allow or deny access
to application resources by user or role. Wildcards: "*" mean everyone, " " means anonymous
(unauthenticated) users.
-->
<authorization>
<deny users=" "/>
</authorization>
<trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20" />
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>
</configuration>
Later on I thought that it's not a good way of connecting to the SQL Server by exposing "SA" password and tried to use Integrated Security instead. And changed the Webconfig to as:
<appSettings>
<add key="ConnectionString" value="server=sqlserver;Integrated Security=SSPI;Persist Security Info=False;database=DB"/>
</appSettings>
However when I was searching for the user: ASPNET in the Windows 2000 Server machine to give access for the Sql server, it does not exist as it's been logged in as a Domain Administrator.
How can I connect my ASP.net application using Windows Authentication rather using SQL Authentication in a Windows 2000 Server machine Why does the user ASPNET is not viewable in the server despite been installed with .NET framework 1.1.
Regards,

ASPNET user not found
LoreHistory
your asp.net app must assume the identity of a domain user with permissions to access the sql server.
In the help file, look up "identity element"
dutch blue
Hi there,
Use "mycomputer to view the "security tab" of the project folder and follow the steps i gave you.
Problem: Later on I thought that it's not a good way of connecting to the SQL Server by exposing "SA" password and tried to use Integrated Security instead. And changed the Webconfig to as:
<appSettings>
<add key="ConnectionString" value="server=sqlserver;Integrated Security=SSPI;Persist Security Info=False;database=DB"/>
</appSettings>
Solution: If the reason why you do not use SQL Server by exposing "SA" password, you can "Encrypt/Decrypt" your connection string to secure it. There are a lot of encryptor you can download in the net. Or if you insist to use windows integrated security try this connection string sample:
"Data Source=(local);Initial Catalog=Northwind;"+ "Integrated Security=SSPI");
or remove the "Persist Security Info=False;.
Persist Security Info
When set to 'false', security-sensitive information, such as the password, is not returned as part of the connection if the connection is open or has ever been in an open state. Resetting the connection string resets all connection string values including the password.
Hth,
Michael Castillones
O.S.S
Hi Micheal,
Thanks for the response. I tried your earlier suggestion, and I couldn't find the things u mentioned in it. As you might be aware of that I'm using a Windows 2000 Server, which acts as Sub Domain Controller.
When I followed your procedures, in the Location, all I could see is the Domain Roots and not the Machine Name......
Regards and Thanks again.
schapel
Hi,
Thanks for the reply. Do u mean that I need to create a user in the domain as "<Domain>\ASPNET"
tintin1969
hi,
Check also in you IIS under Directory Security tab if "Windows Integrated Authentication" is checked.
hth agin,
Michael Castillones
Colin Meek - Microsoft
Hi,
Try right clicking your project folder then select properties. On the "Security tab" click "add button" to add groups or users. A window will show up to locate specific group. Click on the location button and another window will show up press "cancel" to view groups then select your computer name and click "Ok". Click on the advance button and window show up click find now. You can now find the ASP.NET account. select it and add it. Please give me a feedback if you problem solves.
hth,
Michael Castillones
hege
section of your sql server not to the logins section of your database yet.
In that section you can add a new user, in the from that appears now you can choose "Search..." or something like that. On the right you have 3 buttons: Object types, locations and check names.
Click the locations button, you now get a list with all the resources. The first in the list should be your own computer, the second is "Entire directory", the next ones are all domains.
Select your own computer, in the previous form you can now type ASPNET and hit the checknames button. It will be underlined now. After you click Ok multiple times you can go to the logins section of your database and add the previously created user.
This should solve your problem!
Regards,
Bjorn