asp.net中用sqlclient访问数据库出错错误现象:login failed for user:pole\aspnet解决办法:在命令行运行如下命令osql -E -S (local)\NetSDK -Q "sp_grantlogin 'POLE\ASPNET'"osql -E -S (local)\NetSDK -d Pubs -Q "sp_grantdbaccess 'POLE\ASPNET'"osql -E -S (local)\NetSDK -d Pubs -Q "sp_addrolemember 'db_owner', 'POLE\ASPNET'"以上是对数据库Pubs授予POLE\ASPNET用户访问权
……