?
Solved

MS SQL login failure only when asp.net profile provider is involved

Posted on 2008-11-14
6
Medium Priority
?
1,413 Views
Last Modified: 2012-05-05
Hi,

I am a novice and am very stumped with this one.  I recently put my ASP.NET web application on a newly provisioned server and restored back up files of my database in MS SQL Server 2005.

Everything works just fine- all data queries, membership creation, etc EXCEPT for anything involving the profile provider.  I have used the same database, web.config, etc on another server and it worked fine, but on this server, during the create user event, if I try to add data to the custom profile entries (location & first name) I get the following error:

//////////////////////////////////////////////////////////////////////////////////////////////////////

Server Error in '/' Application.
--------------------------------------------------------------------------------

An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Source Error:


Line 25:         End Get
Line 26:         Set
Line 27:             Me.SetPropertyValue("Location", value)
Line 28:         End Set
Line 29:     End Property
 

Source File: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\9470d839\6d4dcc8b\App_Code.1hiyg_a2.2.vb    Line: 27

///////////////////////////////////////////////////////////////////////////////////////////

On the server, the event viewer gives me this:

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Event Type:      Warning
Event Source:      ASP.NET 2.0.50727.0
Event Category:      Web Event
Event ID:      1309
Date:            11/14/2008
Time:            6:41:50 PM
User:            N/A
Computer:      CDCORP
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 11/14/2008 6:41:50 PM
Event time (UTC): 11/15/2008 1:41:50 AM
Event ID: 9d1f4f77751d4775b9db6eb63ad984c0
Event sequence: 7
Event occurrence: 2
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/24111/Root-1-128711865482031250
    Trust level: Full
    Application Virtual Path: /
    Application Path: C:\Inetpub\vhosts\holidayimpressions.com\httpdocs\
    Machine name: CDCORP
 
Process information:
    Process ID: 1168
    Process name: w3wp.exe
    Account name: CDCORP\IWAM_plesk(default)
 
Exception information:
    Exception type: SqlException
    Exception message: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
 
Request information:
    Request URL: http://www.holidayimpressions.com/Createaccount.aspx 
    Request path: /Createaccount.aspx
    User host address: 71.75.167.254
    User:  
    Is authenticated: False
    Authentication Type:  
    Thread account name: CDCORP\IWAM_plesk(default)
 
Thread information:
    Thread ID: 6
    Thread account name: CDCORP\IWAM_plesk(default)
    Is impersonating: False
    Stack trace:    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
   at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
   at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
   at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
   at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
   at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
   at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.SqlClient.SqlConnection.Open()
   at System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate)
   at System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation)
   at System.Web.Profile.SqlProfileProvider.GetPropertyValuesFromDatabase(String userName, SettingsPropertyValueCollection svc)
   at System.Web.Profile.SqlProfileProvider.GetPropertyValues(SettingsContext sc, SettingsPropertyCollection properties)
   at System.Configuration.SettingsBase.GetPropertiesFromProvider(SettingsProvider provider)
   at System.Configuration.SettingsBase.SetPropertyValueByName(String propertyName, Object propertyValue)
   at System.Configuration.SettingsBase.set_Item(String propertyName, Object value)
   at System.Web.Profile.ProfileBase.SetInternal(String propertyName, Object value)
   at System.Web.Profile.ProfileBase.set_Item(String propertyName, Object value)
   at System.Web.Profile.ProfileBase.SetPropertyValue(String propertyName, Object propertyValue)
   at ProfileCommon.set_Location(String Value) in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\9470d839\6d4dcc8b\App_Code.1hiyg_a2.2.vb:line 27
   at ASP.createaccount_aspx.CreateUserWizard1_CreatedUser(Object sender, EventArgs e) in C:\Inetpub\vhosts\holidayimpressions.com\httpdocs\CreateAccount.aspx:line 20
   at System.Web.UI.WebControls.CreateUserWizard.OnCreatedUser(EventArgs e)
   at System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser()
   at System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e)
   at System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e)
   at System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e)
   at System.Web.UI.WebControls.Wizard.WizardChildTable.OnBubbleEvent(Object source, EventArgs args)
   at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
   at System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e)
   at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 
 
Custom event details:

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


This worked just fine on the old server and no other data/ aspnet operations are giving me trouble.

I tried giving this IWAM_plesk(default) user login permissions in MS SQL with no luck (maybe I did something wrong).

Please help!

Thank you kindly,

Matt
0
Comment
Question by:mattcashatt
  • 2
  • 2
5 Comments
 

Expert Comment

by:Supercato
ID: 22965500
can you please show  a litle your config file
0
 
LVL 1

Expert Comment

by:szabogi
ID: 22965541
Since you restored this database on a newly provisioned SQL server, I am guessing that the security account that your database uses may not exist on this new SQL Server.  

This is to say that the login you are using in your connection string exists within the database you restored on the new SQL Server, but does NOT EXIST on the SQL Server itself as a valid login.  This may seem kind of confusing -- but you can see this most vividly if you open SQL Management Studio on your production server where you restored your database to.  Expand your database, then expand Security, and finally Users.  Here you will likely see the user account that your application is using to connect to the database.

Now, close up the Databases folder and expand the folder that is named "Security".  This is a folder that isn't specific to any single database, but rather to the whole SQL Server.  Expand the Logins folder.  If you are doing this on your production server, where you restored the database to, you likely won't see the user account listed here.  This could very likely be your problem.

To rectify this, the Login needs to be created at the SQL Server level and then mapped to the User account in the database you restored.  To fix this, you need to use TSQL, and not the GUI tools.  Here's how you do it.  Just copy these next few lines into a new Query window in SQL Management Studio.  Change the parameter values to match your information, and then execute the two commands.

-- adds user to security/logins to the SQL Server
-- params are username, password, default database
EXEC sp_addlogin 'myusername', mypassword, 'mydatabase'
 
-- links the original username (sitting in the db/users folder) with
-- the new one created with sp_addlogin
use mydatabase
EXEC sp_change_users_login 'Update_One', 'myusername', 'myusername'
0
 

Author Comment

by:mattcashatt
ID: 22965662
szaboqi's,

Thanks for your suggestion.  It seems very appropriate.  In opening the database-security-users folder, I found these four users: dbo, guest, INFORMATION_SCHEMA & sys.

I tried running the T-SQL you reccommended but it failed with this message:

//////////////////////////////////////////////////////
Msg 15025, Level 16, State 1, Line 1
The server principal 'sys' already exists.
Msg 15287, Level 16, State 1, Procedure sp_change_users_login, Line 35
Terminating this procedure. 'sys' is a forbidden value for the login name parameter in this procedure.
/////////////////////////////////////////////////////

Maybe I entered the T-SQL incorrectly:

///////////////////////////////////////////////////
-- adds user to security/logins to the SQL Server
-- params are username, password, default database
EXEC sp_addlogin 'sys', 'PASSWORD*1'
 
-- links the original username (sitting in the db/users folder) with
-- the new one created with sp_addlogin
use Holiday_Impressions
EXEC sp_change_users_login 'Update_One', 'sys', 'sys'
/////////////////////////////////////////////////

Any further help would be greatly appreciated.

Thanks,

Matt
0
 

Author Comment

by:mattcashatt
ID: 22965814
Here is the web.config:

///////////////////////////////////////////////////////////////////////////////////////////


<?xml version="1.0"?>
<!-- 
    Note: As an alternative to hand editing this file you can use the 
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in 
    machine.config.comments usually located in 
    \Windows\Microsoft.Net\Framework\v2.x\Config 
-->
<configuration>
	<configSections>
		<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
			<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
				<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
				<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
					<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
					<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
					<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
					<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
				</sectionGroup>
			</sectionGroup>
		</sectionGroup>
	</configSections>
  <appSettings>
    <add key="fromEmailAddress" value="cards@holidayimpressions.com"/>
    <add key="com.amazonaws.ecs.AWSECommerceService" value="http://soap.amazon.com/onca/soap?Service=AWSECommerceService"/>
    <add key="AssociateTag" value="XXXXX"/>
    <add key="SubscriberID" value="XXXXX"/>
    <add key="SecretSubscriberID" value="XXXXX"/>
  </appSettings>
  <connectionStrings>
    <add name="XXXXX" connectionString="Data Source=XXXXX;Initial Catalog=XXXXX;Persist Security Info=True;User ID=sa;Password=XXXXX" />
 
  </connectionStrings>
	<system.web>
 
    <membership defaultProvider="CustomizedProvider">
      <providers>
        <clear/>
        <add name="CustomizedProvider"
             type="System.Web.Security.SqlMembershipProvider"
             enablePasswordRetrieval="true"
             connectionStringName="XXXXX"
             minRequiredPasswordLength="5"
             minRequiredNonalphanumericCharacters="0"
             passwordFormat="Clear" />
      </providers>
    </membership>
 
    <profile enabled="true">
      <properties>
        <add name="Location" type="string"/>
        <add name="First_Name" type="string"/>
      </properties>
    </profile>
 
    <!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
 
            Visual Basic options:
            Set strict="true" to disallow all data type conversions 
            where data loss can occur. 
            Set explicit="true" to force declaration of all variables.
        -->
    
    
		<compilation debug="true" strict="false" explicit="true">
         
			<assemblies>
				<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
				<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
				<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
				<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
		
				<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
				<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies>
		</compilation>
 
    <pages validateRequest="false" enableEventValidation="false" viewStateEncryptionMode="Never" >
			<namespaces>
				<clear/>
				<add namespace="System"/>
				<add namespace="System.Collections"/>
				<add namespace="System.Collections.Generic"/>
				<add namespace="System.Collections.Specialized"/>
				<add namespace="System.Configuration"/>
				<add namespace="System.Text"/>
				<add namespace="System.Text.RegularExpressions"/>
				<add namespace="System.Linq"/>
				<add namespace="System.Xml.Linq"/>
				<add namespace="System.Web"/>
				<add namespace="System.Web.Caching"/>
				<add namespace="System.Web.SessionState"/>
				<add namespace="System.Web.Security"/>
				<add namespace="System.Web.Profile"/>
				<add namespace="System.Web.UI"/>
				<add namespace="System.Web.UI.WebControls"/>
				<add namespace="System.Web.UI.WebControls.WebParts"/>
				<add namespace="System.Web.UI.HtmlControls"/>
			</namespaces>
			<controls>
				<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
				<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			</controls>
		</pages>
		<!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        -->
		<authentication mode="Forms"/>
		<!--
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.
 
        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
    <customErrors mode="Off"/>
 
    <httpHandlers>
   <remove path="*.asmx" verb="*" />
   <add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
    validate="false" />
   <add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
    validate="false" />
   <add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
    validate="false" />
   <add path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2007.3.1425.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
    validate="false" />
   <add path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2007.3.1425.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
    validate="false" />
   <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2007.3.1425.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
    validate="false" />
  </httpHandlers>
		<httpModules>
			<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
		</httpModules>
	</system.web>
	<system.codedom>
		<compilers>
			<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
				<providerOption name="CompilerVersion" value="v3.5"/>
				<providerOption name="WarnAsError" value="false"/>
			</compiler>
			<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
				<providerOption name="CompilerVersion" value="v3.5"/>
				<providerOption name="OptionInfer" value="true"/>
				<providerOption name="WarnAsError" value="false"/>
			</compiler>
		</compilers>
	</system.codedom>
	<!-- 
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
    -->
	<system.webServer>
		<validation validateIntegratedModeConfiguration="false"/>
		<modules>
			<remove name="ScriptModule"/>
			<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
		</modules>
		<handlers>
			<remove name="WebServiceHandlerFactory-Integrated"/>
			<remove name="ScriptHandlerFactory"/>
			<remove name="ScriptHandlerFactoryAppServices"/>
			<remove name="ScriptResource"/>
			<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
		</handlers>
	</system.webServer>
 
  <system.net>
      <mailSettings>
      <smtp from="forgotpassword@holidayimpressions.com" deliveryMethod="Network">
        <network host="mail.holidayimpressions.com" port="25" password="XXXXX" userName="forgotpassword@holidayimpressions.com" />
      </smtp>
    </mailSettings>
  </system.net>
  
  
	<runtime>
		<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
			<dependentAssembly>
				<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
				<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
			</dependentAssembly>
			<dependentAssembly>
				<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
				<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
			</dependentAssembly>
		</assemblyBinding>
	</runtime>
 
  <location path="MyProfile.aspx">
 
    <system.web>
      <authorization>
        <deny users="?"/>
        <allow users="*"/>
      </authorization>
    </system.web>
 
  </location>
 
  <location path="ChangePassword.aspx">
 
    <system.web>
      <authorization>
        <deny users="?"/>
        <allow users="*"/>
      </authorization>
    </system.web>
 
  </location>
 
 
</configuration>

Open in new window

0
 
LVL 1

Accepted Solution

by:
szabogi earned 500 total points
ID: 22984931
It looks like the issue has to do with the way you are connecting to the database -- namely, you are using "named pipes".  To resolve this issue, try using TCP to connect to the SQL Server instead.  You simply need to modify the connection string and put the word "TCP:" in the DataSource="" section of the connection string.  See this link -- which provides exact guidance for your problem:

http://community.discountasp.net/default.aspx?f=16&m=18611

Here are some additional links on the topic of your issue that might be helpful as well:

http://blogs.msdn.com/sql_protocols/archive/2007/05/13/sql-network-interfaces-error-26-error-locating-server-instance-specified.aspx

Lastly, a good site to know about is www.connectionstrings.com which provides loads and loads of connection string examples for nearly anything you might ever need to connect your application to.

http://msdn.microsoft.com/en-us/library/ms191260.aspx

0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question