Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Sql express and ASP.net configuration tools

Sql express and ASP.net configuration tools

Scheduled Pinned Locked Moved ASP.NET
databasecsharpasp-netsysadminwindows-admin
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    y_mmohd
    wrote on last edited by
    #1

    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:

    B 1 Reply Last reply
    0
    • Y y_mmohd

      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:

      B Offline
      B Offline
      Bruno M T Sousa
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups