473,779 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 conecctionStrin g, not use the connectionStrin g from
web.config.

The code of the web.config is:
--*************** ****-----------
<connectionStri ngs>
<add name="MainConnS tr" connectionStrin g="data source=BAMP-SRV-02;initial
catalog=EJEMPLO _CULTURAS;passw ord=sa;persist security info=True;user id=sa"
providerName="S ystem.Data.SqlC lient"/>
</connectionStrin gs>
<system.web>
<anonymousIdent ification enabled="true"/>
<profile>
<providers>
<remove name="SqlProvid er" />
<add
name="SqlProvid er"
connectionStrin gName="MainConn Str"
applicationName ="EjemploCultur asASP"
type="System.We b.Profile.SqlPr ofileProvider" />
</providers>
<properties>
<add name="LanguageP reference" type="System.St ring"
defaultValue="A uto" allowAnonymous= "true" />
<add name="Age" type="System.In t32"
defaultValue="0 " allowAnonymous= "true" />
<add name="Gender" type="System.St ring"
defaultValue="" allowAnonymous= "true" />
<add name="Country" type="System.St ring"
defaultValue="A uto" 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="Micro soft.Office.Too ls.Excel, Version=8.0.0.0 ,
Culture=neutral , PublicKeyToken= B03F5F7F11D50A3 A"/>
<add assembly="Micro soft.Office.Too ls.Word, Version=8.0.0.0 ,
Culture=neutral , PublicKeyToken= B03F5F7F11D50A3 A"/>
<add assembly="Syste m.Windows.Forms , Version=2.0.0.0 , Culture=neutral ,
PublicKeyToken= B77A5C561934E08 9"/>
<add assembly="Micro soft.Office.Int erop.Excel, Version=11.0.0. 0,
Culture=neutral , PublicKeyToken= 71E9BCE111E9429 C"/>
<add assembly="offic e, Version=11.0.0. 0, Culture=neutral ,
PublicKeyToken= 71E9BCE111E9429 C"/>
<add assembly="Micro soft.Vbe.Intero p, Version=11.0.0. 0, Culture=neutral ,
PublicKeyToken= 71E9BCE111E9429 C"/>
<add assembly="Micro soft.Office.Int erop.Word, Version=11.0.0. 0,
Culture=neutral , PublicKeyToken= 71E9BCE111E9429 C"/>
<add assembly="Micro soft.Office.Too ls.Common, Version=8.0.0.0 ,
Culture=neutral , PublicKeyToken= B03F5F7F11D50A3 A"/>
<add assembly="VSTOS torageWrapper.I nterop, Version=8.0.0.0 ,
Culture=neutral , PublicKeyToken= B03F5F7F11D50A3 A"/>
<add assembly="stdol e, Version=7.0.330 0.0, Culture=neutral ,
PublicKeyToken= B03F5F7F11D50A3 A"/>
<add assembly="Micro soft.VisualStud io.Tools.Applic ations.Runtime,
Version=8.0.0.0 , Culture=neutral , PublicKeyToken= B03F5F7F11D50A3 A"/>
<add assembly="Micro soft.Office.Int erop.SmartTag, Version=11.0.0. 0,
Culture=neutral , PublicKeyToken= 71E9BCE111E9429 C"/>
<add
assembly="Micro soft.VisualStud io.OfficeTools. Controls.Manage dWrapper,
Version=8.0.0.0 , Culture=neutral ,
PublicKeyToken= B03F5F7F11D50A3 A"/></assemblies></compilation>
<!--
The <authentication section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authenticati on mode="Windows"/>
<!--
The <customErrorsse ction 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="RemoteOnl y"
defaultRedirect ="GenericErrorP age.htm">
<error statusCode="403 " redirect="NoAcc ess.htm" />
<error statusCode="404 " redirect="FileN otFound.htm" />
</customErrors>
-->
</system.web>

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

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

-**************-
using System;
using System.Data;
using System.Configur ation;
using System.Web;
using System.Web.Secu rity;
using System.Web.UI;
using System.Web.UI.W ebControls;
using System.Web.UI.W ebControls.WebP arts;
using System.Web.UI.H tmlControls;
using System.Globaliz ation;
using System.Threadin g;
using System.Web.Prof ile;
public class PageHereda: System.Web.UI.P age
{
protected override void InitializeCultu re()
{
base.Initialize Culture();
ProfileCommon perfil = (ProfileCommon) Context.Profile ;
string languagePrefere nce = perfil.Language Preference.ToSt ring();

}
}

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

When I try to access to perfil.Language Preference 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 1507

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

Similar topics

3
3892
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 (unsing WinNT SP6) experienced a dramatic performance drop. We investigated, and it turned out that it depends on the
0
1816
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 in C# using windows forms, to create windows user profiles and then updating the registry information for the new profiles. I have managed to create the user successfully and thought that I was
9
6745
by: Srinivas | last post by:
hi all how to access the outlook user profiles through VB.net any help.... thanks in advanc Srinivas
0
982
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 msmapi32.ocx to send mail. On MOST of the computers, this works. But on a few of these computers, where it was working for a long time, it now gives an invalid session ID.
1
4950
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) Output of "db2ilist" does not list all the instances on my AIX box. DB2 functions normally - I do not get any unexpected errors. Any ideas what configuration has been missed out?...
0
1685
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 specified date. - DeleteProfile. Enables you to delete a profile associated with a specified username. - DeleteProfiles. Enables you to delete a set of profiles. - FindInactiveProfilesByUserName. Returns a collection of ProfileInfo
3
6209
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
1350
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 west2. When I am trying to connect to west1. I can succesfully connect to the excahnge mail box, but if i try to connect to another west2 profile then
1
1338
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 west2. When I am trying to connect to west1. I can succesfully connect to the excahnge mail box, but if i try to connect to another west2 profile then
3
2237
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 accounts (et al) with my primary administrator access. The users can successfully enter their profiles/workspace via the log-on process, however, when applications like MS WORD and EXPLORER are launched via desktop shortcuts, a windows installer screen pops...
0
10305
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10137
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9928
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8959
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7483
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6724
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.