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. Connection failed for ASP.Net!

Connection failed for ASP.Net!

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelpdatabasesql-server
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.
  • J Offline
    J Offline
    jy othi
    wrote on last edited by
    #1

    Hi All, OleDbConnection is working fine for C# windows appication same code is Failing for C# ASP application giving error "LOGIN Failed forJYOTHI/ASPNET" Where as JYOTHI is my system name as well as SQL Server Name I am not able to connect thru data wizard also. How can I rectify the problem. regards Jyothi

    J 1 Reply Last reply
    0
    • J jy othi

      Hi All, OleDbConnection is working fine for C# windows appication same code is Failing for C# ASP application giving error "LOGIN Failed forJYOTHI/ASPNET" Where as JYOTHI is my system name as well as SQL Server Name I am not able to connect thru data wizard also. How can I rectify the problem. regards Jyothi

      J Offline
      J Offline
      J4amieC
      wrote on last edited by
      #2

      This is a permissions issue as you've no doubt worked out by the message "LOGIN Failed....". Why does it work in WinForms but not ASP.NET? Simply because when running a forms application the user is assumed to be the login-user, however when running as ASP.NET the default user is one named MACHINE-NAME/ASPNET. You have two options 1) Give the ASPNET user access to the database 2) Using web.config change the user to one which has access to the database.

      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