开发者

Problem following microsoft tutorial. (Stuck at step 3)

开发者 https://www.devze.com 2023-03-04 05:13 出处:网络
I am following a tutorial to learn how to use form based security in ASP.NET but i g开发者_开发技巧ot stuck at step 3, when i have to create the create the membership database. I am a newbie, could yo

I am following a tutorial to learn how to use form based security in ASP.NET but i g开发者_开发技巧ot stuck at step 3, when i have to create the create the membership database. I am a newbie, could you give me a hand?

This is the tutorial i am following: http://msdn.microsoft.com/en-us/library/ff649314.aspx

And this is my problem:

Problem following microsoft tutorial. (Stuck at step 3)

Just in case the image is small, the error says:

An error has occurred. Details of the exception: A network-related or instance-specific error occurred while establishing a conne ction to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a conne ction to SQL Server)

Could someone more experienced, help me solving this? I already posted a similar question today, but i cant fix it, i don't understand what i should do.

Ill appreciate a lot your help.

UPDATE

I tried to verified the connection as recommended in this link: http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.ii.doc/opt/tlsmss08.htm

But something goes wrong:

Problem following microsoft tutorial. (Stuck at step 3)

UPDATE 2

I followed sehe's suggestion and i made the query for retrieving the date pass. So i assumed i was connected. The next thing i did was, try to grant database access as says in the tutorial, but i cant make the queries pass:

This are the queries just incase the image is small:

-- Create a SQL Server login for the Network Service account sp_grantlogin 'NT AUTHORITY\Network Service'

-- Grant the login access to the membership database USE aspnetdb GO sp_grantdbaccess 'NT AUTHORITY\Network Service', 'Network Service'

-- Add user to database role USE aspnetdb GO sp_addrolemember 'aspnet_Membership_FullAccess', 'Network Service'

Only the first one seem to pass ok.

Any suggestions?

Problem following microsoft tutorial. (Stuck at step 3)


The key phrase would be:

Unable to connect to SQL Server database.

So make sure

  • you have installed an SQL (Express) database, and find out the instance name. Usually SqlExpress
  • that it is configured for TCP Access
  • that (local) is working as an alias

A few ideas to try

  • run the script (the command window) as Admin
  • replace (local) with .\SqlExpress
  • run ASPNET_RegSQl without any parameters. IIRC it will start a GUI with a Wizard.
0

精彩评论

暂无评论...
验证码 换一张
取 消