473,406 Members | 2,220 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,406 software developers and data experts.

Profile Object Issue

I just tried to use the Profile Object for the first time. I created a new
website, added the below items to the web.config, and then tried to set the
property in C# code.

Intellisense works, and everything compiles, but I'm getting the error that
is also below. I don't have SQL Server 2005 installed on this box, so I
don't know why it would be trying to connect to that...I do have SQL Server
2000 installed.

I'm using ASP.Net 2.0, and Visual Studio 2005.

Here's the top level exceptions and the 2 inner exceptions:
1) Unable to connect to SQL Server database.
2) Unable to connect to SQL Server database.
3) 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)

Here's the entire contents of my web.config:
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<compilation debug="true"/>
<authentication mode="Windows"/>
<anonymousIdentification enabled="true"/>
<profile>
<properties>
<add name="MyNewProperty" allowAnonymous="true" type="int"/>
</properties>
</profile>
</system.web>
</configuration>

--
My BizTalk blog:
http://stevestechnotes.blogspot.com/

Jun 27 '08 #1
1 1083
You does not have included connection string in your web.config

Please replace your web.config with this one

<configuration>
<appSettings/>
<connectionStrings>
<add name="DSN" connectionString="Server=yoursqlservername;
Database=yourdatabasename; uid=yourusername; pwd=yourpassword;"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<compilation debug="true"/>
<authentication mode="Windows"/>
<anonymousIdentification enabled="true"/>
<profile>
<properties>
<add name="MyNewProperty" allowAnonymous="true" type="int"/>
</properties>
</profile>
</system.web>
</configuration>
Regards,
Mudassar Hassan
http://mudassarhassan.spaces.live.com/
"Steve Harclerode" wrote:
I just tried to use the Profile Object for the first time. I created a new
website, added the below items to the web.config, and then tried to set the
property in C# code.

Intellisense works, and everything compiles, but I'm getting the error that
is also below. I don't have SQL Server 2005 installed on this box, so I
don't know why it would be trying to connect to that...I do have SQL Server
2000 installed.

I'm using ASP.Net 2.0, and Visual Studio 2005.

Here's the top level exceptions and the 2 inner exceptions:
1) Unable to connect to SQL Server database.
2) Unable to connect to SQL Server database.
3) 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)

Here's the entire contents of my web.config:
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<compilation debug="true"/>
<authentication mode="Windows"/>
<anonymousIdentification enabled="true"/>
<profile>
<properties>
<add name="MyNewProperty" allowAnonymous="true" type="int"/>
</properties>
</profile>
</system.web>
</configuration>

--
My BizTalk blog:
http://stevestechnotes.blogspot.com/

Jun 27 '08 #2

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

Similar topics

2
by: | last post by:
Hi all, How can I get a reference to my custom profile provider in my .aspx page? I have looked at httpcontext.current.profile. But from there where do I go? Ideally I would like to be able to...
3
by: RedHair | last post by:
If the Profile provider is db, since ASP.NET will create profile class to append to HttpContext object for each request , it means there is a db access for each request? if so, does it cause...
1
by: Mike | last post by:
Hi: I have been trying to create a web application that provides suport for two membership/profile databases: one for private users and one for another set of users. These tw user have a...
3
by: Oriane | last post by:
Hi there, I would like to open my Asp.Net project as a "Web Application" rather than as a "Web Site" in Visual Studio. But the thing is that I use the System.Web.Profile and the auto-generated...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.