Hello Guys
This is my connection string
<add name ="ASPNETDBConnectionString1" connectionString ="Data Source= .\SQLEXPRESS; Integrated Security = True; DataBase = ASPNETDB.MDF; User ID = MyWindowsUserName; Password = MyWindowsPassword; User Instance = False; Connect Timeout = 30" providerName ="System.Data.SqlClient"/>
I tried to research on the internet and i got a solution on changing the permissions for this database to enable user SystemName/ASPNET, but iam not able to access this ASPNETDB.MDF from SqlServer and if i go to server explorer in vs2005, i dint know where to chage the permissions.
Can anyone help me on this.
Thanks a lot
The ASPNET account needs to have access both to the server and to the ASPNETDB database. It seems you have granted server access to the account, but not database access.
To grant database access, connect to SQL Server using Management Studio and execute the following SQL statements:
use ASPNETDB
go
create user [SystemName\ASPNET]
go
Thanks
Laurentiu
hi,
Thanks for your info abt the adding of aspnet account in the ASPNETDB Db.
I have created a website using VS 2005, and my SQL Server 2005 -STD Edition(NOT SQLEXPRESS). When ever i try to connect to the database i get this following error : Cannot open database ASPNETDB.MDF requested by the login, login failed. Login failed for user DOMAIN|USERNAME.
FYI, I have added my DOMAIN\username in the Security - Logins of the Database. I have also done the user mappings. That screen reads as follows :
1. Master Database -
Still I get this error. Please help me understand that whether any other permissions is required in the database for me.
Thanks
krans001
|||hi,
I get this error when i try to execute a website just having a DEFAULT.aspx in which i have added a webpartsmanager. the personalization property of the webpartmanager is set to TRUE and USER. The following steps I did:
1. Installed the Microsoft SQL Server Management Studio 9.00.1399.00 ( STANDERD EDITION).
2. from the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 installed the aspnet_regsql and followed the steps in installing the aspnetdb database.
In the usermappings i have provided permissions to me "DOMAIN\USERNAME" to the following db: 1. master 2. msdb 3. tempdb 4. aspnetdb
3. in the edit global configuration removed the USER INSTANCE=TRUE from the following
Data Source=.\MSSQLSERVER2005;Initial Catalog=aspnetdb.mdf;Integrated Security=True
4. edited the machine.config file under the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG
as
<add name="LocalSqlServer" connectionString="Data Source=.\MSSQLSERVER2005;Initial Catalog=aspnetdb.mdf;Integrated Security=True" providerName="System.Data.SqlClient" />
After doing this i tried to execute the website that i have created which holds a default.aspx page in which i have the webpartmanager. I just wanted to view this file in the browser. As soon as i do this i get this error.
Cannot open database "aspnetdb.mdf" requested by the login. The login failed. Login failed for user 'DOMAIN\USERNAME'.
Thanks in advance for the solution. Please help.. if anyone has a solution please send it immediately to my email id : sriranga.kr@.gmail.com
|||hi
all i did was removed the .mdf in the connection string and run the same. It works like a charm..
great...
|||hi sreeksdave
all you need to do is to change the following :
<add name ="ASPNETDBConnectionString1" connectionString ="Data Source= .\SQLEXPRESS; Integrated Security = True; DataBase = ASPNETDB.MDF; User ID = MyWindowsUserName; Password = MyWindowsPassword; User Instance = False; Connect Timeout = 30" providerName ="System.Data.SqlClient"/>
AS
<add name ="ASPNETDBConnectionString1" connectionString ="Data Source= .\SQLEXPRESS; Integrated Security = True; Initial Catalog= ASPNETDB" providerName ="System.Data.SqlClient"/>
and see how it works..
Do let me know..
Regards
scotty
|||I think this should be rather aspnetdb than aspnetdb.mdf, if you use a user instance you have to specify the filename but with attached database you can just type in the name of the database.HTH, jens Suessmeyer.
http://www.sqlserver2005.de
|||
Remember that both files ASPNETDB.MDF and aspnetdb_log.LDF are in a folder call App_Data in you project solution, just make sure that you give the right access privileges to your local MACHINE\ASPNET account
Hope this will help
|||Hi all,
Thanks for all your contribution. It has worked for me and i have also helped few people.
Thanks & Regards
Raaj
|||Hello Ranga,
Thanks a lot yar.
Hats off
没有评论:
发表评论