Last post May 21, 2010 07:10 AM by Hong-Gang Chen - MSFT
May 17, 2010 05:17 PM|castblackjacket|LINK
I'm tearing my hair out here - I'm building a .NET web application at the moment and every time I either want to access the database/build a page or create a new datasource I get the following error:
I also get it in SQL Server Management Studio 2008 quite a lot too. I know what you're thinking - search the web for the error, read what the nice people have to say. Only I've spent the last week or so doing this, and I'm no closer to resolving this.
- Named pipes = ON
- Shared memory = ON
- TCP/IP = OFF/ON (doesn't seem to make a difference?)
- VIA = OFF (don't know what this does)
Currently, when I get this message, I have to go into SQL Server Configuration Tools and Restart SQLEXPRESS, then the problem goes away until I start working on another file, or want to look at my database etc.
What can I do so I don't have to do restart SQLEXPRESS each time? It's becoming such a pain, and I'm trying to find an excuse to migrate from OS X to Windows because it's a better development environment. However .NET is supposed to make for Rapid Application
Development, I keep hitting these barriers which by the sounds of it quite a lot of people are hitting, and it makes me think I could code the who thing in PHP a lot faster than messing around with it.
Please help, my future Windows .NET dev is at stake!
May 17, 2010 05:28 PM|xequence|LINK
What does your web.config connectionString look like? Are you using the correct credentials? Have you set up your security for your database in your SQL Server 2008 user's tree structure?
Posting code will help clarify. hth.
May 17, 2010 05:32 PM|castblackjacket|LINK
<add name="FircroftConnectionString" connectionString="Data Source=WINDOWSBOOTCAMP\SQLEXPRESS;Initial Catalog=MyDatabase;Integrated Security=True;Persist Security Info=False;Trusted_Connection=Yes"
I'm using Windows Authentication, however I'd rather be using Forms - but I can only use Windows or I don't have permission to access the database.
Thanks for your reply!
May 17, 2010 05:53 PM|xequence|LINK
<add name="xxx" connectionString="Data Source=server;Initial Catalog=Contracts_Test;Persist Security Info=True;User ID=xxx;Password=xxx" providerName="System.Data.SqlClient" />
Try that with the user accounts in your sql server security folder on SQL SERVER.
Set the "Database role membership" to use db_owner for testing purposes. Once this is live you will have to reconfigure to be more secure with who has read/write access.
May 17, 2010 05:59 PM|castblackjacket|LINK
This is going to sounds really silly, but I don't know what the password is for my user? I never specifed one/was given the chance to specify one
May 17, 2010 06:06 PM|castblackjacket|LINK
Sorry I should explain, this is for the local machine.
However, if I use the ConnectionString you have provided on the remote MS SQL Server, then open Web Application Administration Tool and try to add a user...
An error was encountered. Please return to the previous page and try again.
The following message may help in diagnosing the problem:
A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of
the pipe.) at System.Web.Administration.WebAdminPage.CallWebAdminHelperMethod(Boolean isMembership, String methodName, Object parameters, Type paramTypes) at ASP.security_users_adduser_aspx.PopulateCheckboxes() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles\Security\Users\addUser.aspx:line
28 at ASP.security_users_adduser_aspx.Page_Load() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles\Security\Users\addUser.aspx:line 22 at System.Web.Util.CalliHelper.ArglessFunctionCaller(IntPtr fp, Object o) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object
sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
This is when using that ConnectionString for my MemberShip provider...
<remove name="AspNetSqlMembershipProvider" />
<add connectionStringName="TestCS" enablePasswordRetrieval="false"
applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed"
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=188.8.131.52, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Arghhh! Seriously not sure what is going on anymore! Thanks for all your help though, your patience is commendable! :D
May 17, 2010 06:49 PM|xequence|LINK
There might be a problem with your application name in your tables that were created when you did the aspnet_regsql.exe command. I would check to see if your "applicationName" exists in your table structure.
May 18, 2010 10:47 AM|castblackjacket|LINK
I can't check the Applications table 'cos of the error, in Visual Studio or SQL Server Management...hmm.
There must be something going on which is creating this error all the time, if I Configure a Data Source I have to restart, then to Test a Query I have to restart, then when viewing the actual page I have to restart.
May 21, 2010 07:10 AM|Hong-Gang Chen - MSFT|LINK
Maybe this thread could help you to solve this issue,