Sql express and ASP.net configuration tools
-
Dear all, I new to asp.net 2. I have a question I hope you’ll answer me. I need to know if I can use (sql express and ASP.net configuration tools) to build a real web site. And if this is Secure. Them problem is that I create a website and configure security for some pages. They run smoothly and I can login using login.asp page. But the problem I can’t login using IIS. I create a virtual directory in IIS for the project. I can access the unrestricted pages using internet explorer. But, the problem is that when I want to access to the restricted area by using internet explorer I had the following message. And the login.asp page did not appear. [SqlException (0x80131904): Cannot open user default database. Login failed. Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.] :confused:
-
Dear all, I new to asp.net 2. I have a question I hope you’ll answer me. I need to know if I can use (sql express and ASP.net configuration tools) to build a real web site. And if this is Secure. Them problem is that I create a website and configure security for some pages. They run smoothly and I can login using login.asp page. But the problem I can’t login using IIS. I create a virtual directory in IIS for the project. I can access the unrestricted pages using internet explorer. But, the problem is that when I want to access to the restricted area by using internet explorer I had the following message. And the login.asp page did not appear. [SqlException (0x80131904): Cannot open user default database. Login failed. Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.] :confused:
Hi SQL Express is configured by default to allow only local connections using windows authentication. From what that looks is that the IIS is running under an user that the SQL Server does not accept. While I'm no IIS/SQL Server expert, and thus can not really help you to configure them to work like that, what I suggest is that you setup SQL Server to allow both Windows Authentication and SQL Server. Using the SQL Server Management Studio (http://www.microsoft.com/downloads/details.aspx?familyid=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796&displaylang=en) log in to the server and under the server's "Properties" choose Security and select "SQL Server and Windows Authentication". Then create a user and password with access to your database (in your database "Security" -> "Logins" -> Right click -> "New Login...") and adjust your connection string to use this login, for example:
"server=Earthquake\\SqlExpress; user id=UserName; password=Password; database=Database"
This should allow you to use both SQL Express for the final site.Bruno Sousa Software Consultant http://www.luasys.com