473,425 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,425 software developers and data experts.

Profiles problem

Hello,

First, sorry because I am spanish and my english are not good.

My problem is that i am trying to work with profiles in visual studio 2005,
but i have an error.
the error is that:

"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)."

My web aplication work correctly in the database access, but i use an class
library to get the conecctionString, not use the connectionString from
web.config.

The code of the web.config is:
--*******************-----------
<connectionStrings>
<add name="MainConnStr" connectionString="data source=BAMP-SRV-02;initial
catalog=EJEMPLO_CULTURAS;password=sa;persist security info=True;user id=sa"
providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<anonymousIdentification enabled="true"/>
<profile>
<providers>
<remove name="SqlProvider" />
<add
name="SqlProvider"
connectionStringName="MainConnStr"
applicationName="EjemploCulturasASP"
type="System.Web.Profile.SqlProfileProvider" />
</providers>
<properties>
<add name="LanguagePreference" type="System.String"
defaultValue="Auto" allowAnonymous="true" />
<add name="Age" type="System.Int32"
defaultValue="0" allowAnonymous="true" />
<add name="Gender" type="System.String"
defaultValue="" allowAnonymous="true" />
<add name="Country" type="System.String"
defaultValue="Auto" allowAnonymous="true" />
</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.
-->
<compilation debug="true">
<assemblies>
<add assembly="Microsoft.Office.Tools.Excel, Version=8.0.0.0,
Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="Microsoft.Office.Tools.Word, Version=8.0.0.0,
Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=B77A5C561934E089"/>
<add assembly="Microsoft.Office.Interop.Excel, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/>
<add assembly="office, Version=11.0.0.0, Culture=neutral,
PublicKeyToken=71E9BCE111E9429C"/>
<add assembly="Microsoft.Vbe.Interop, Version=11.0.0.0, Culture=neutral,
PublicKeyToken=71E9BCE111E9429C"/>
<add assembly="Microsoft.Office.Interop.Word, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/>
<add assembly="Microsoft.Office.Tools.Common, Version=8.0.0.0,
Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="VSTOStorageWrapper.Interop, Version=8.0.0.0,
Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="stdole, Version=7.0.3300.0, Culture=neutral,
PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="Microsoft.VisualStudio.Tools.Application s.Runtime,
Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="Microsoft.Office.Interop.SmartTag, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/>
<add
assembly="Microsoft.VisualStudio.OfficeTools.Contr ols.ManagedWrapper,
Version=8.0.0.0, Culture=neutral,
PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation>
<!--
The <authenticationsection enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrorssection 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>
-->
</system.web>

-******************------

And I am trying to make an generic class for the aplication pages:

-**************-
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Globalization;
using System.Threading;
using System.Web.Profile;
public class PageHereda: System.Web.UI.Page
{
protected override void InitializeCulture()
{
base.InitializeCulture();
ProfileCommon perfil = (ProfileCommon)Context.Profile;
string languagePreference = perfil.LanguagePreference.ToString();

}
}

-*****************-

When I try to access to perfil.LanguagePreference give me the error:
"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)."
May 30 '07 #1
0 1485

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Test Test | last post by:
Hi, group! Here is some interesting problem: Our company has developed a large VB6 application that runs very smoothly on most environments. However, all of a sudden one of our customers...
0
by: Wayne Gibson | last post by:
Hi all, Please ignore the other post.. The cat jumped on the machine and sent it before I could stop it!! Was wondering if anybody has expericence this problem.. I am writting an application...
9
by: Srinivas | last post by:
hi all how to access the outlook user profiles through VB.net any help.... thanks in advanc Srinivas
0
by: Selden McCabe | last post by:
I have a VB6 application running on a number of computers at a school. These all have Microsoft Office (and also Outlook) installed. They are using an Exchange server. This app uses the...
1
by: Anurag | last post by:
Hi, I have 2 related questions. DB2 UDB ESE v8.x (8.1 till 8.2 FP2 - all fixpaks included) on AIX 5.4.x _____________________________________________________________________________ (QUESTION 1)...
0
by: george_Martinho | last post by:
It seems that the ASP.NET Microsoft team didn't think about this!! The profilemanager class has the following methods: - DeleteInactiveProfiles. Enables you to delete all profiles older than a...
3
by: Jeff | last post by:
Hey asp.net 2.0 I want to populate a GridView with the profile properties off all users registered on a website! For example like this: <profile enabled="true"> <properties>
1
by: =?Utf-8?B?Vmlua2k=?= | last post by:
Hello Everyone, I really need help in this email. I am using pop3 service to connect to microsoft exchange. I have two profiles defined in microsoft exchange. One is west1 and another one is...
1
by: =?Utf-8?B?Vmlua2k=?= | last post by:
Hello Everyone, I really need help in this email. I am using pop3 service to connect to microsoft exchange. I have two profiles defined in microsoft exchange. One is west1 and another one is...
3
by: garyvale | last post by:
Hi, I am experiencing a recurrent bug with my secondary user profiles. I am using WIN XP Pro with SP2 and all current critical upgrades/patches. I am able to create secondary and tertiary...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.