Profile Object Issue

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Steve Harclerode

    #1

    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:
    <configuratio n>
    <appSettings/>
    <connectionStri ngs/>
    <system.web>
    <compilation debug="true"/>
    <authenticati on mode="Windows"/>
    <anonymousIdent ification enabled="true"/>
    <profile>
    <properties>
    <add name="MyNewProp erty" allowAnonymous= "true" type="int"/>
    </properties>
    </profile>
    </system.web>
    </configuration>

    --
    My BizTalk blog:
    A place for me to store and share some notes about technical stuff I'm working with at the moment. The views expressed on this blog are mine alone and do not necessarily reflect the views of my employer.




  • =?Utf-8?B?TXVkYXNzYXIgSGFzc2Fu?=

    #2
    RE: Profile Object Issue

    You does not have included connection string in your web.config

    Please replace your web.config with this one

    <configuratio n>
    <appSettings/>
    <connectionStri ngs>
    <add name="DSN" connectionStrin g="Server=yours qlservername;
    Database=yourda tabasename; uid=yourusernam e; pwd=yourpasswor d;"
    providerName="S ystem.Data.SqlC lient" />
    </connectionStrin gs>
    <system.web>
    <compilation debug="true"/>
    <authenticati on mode="Windows"/>
    <anonymousIdent ification enabled="true"/>
    <profile>
    <properties>
    <add name="MyNewProp erty" allowAnonymous= "true" type="int"/>
    </properties>
    </profile>
    </system.web>
    </configuration>


    Regards,
    Mudassar Hassan



    "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:
    <configuratio n>
    <appSettings/>
    <connectionStri ngs/>
    <system.web>
    <compilation debug="true"/>
    <authenticati on mode="Windows"/>
    <anonymousIdent ification enabled="true"/>
    <profile>
    <properties>
    <add name="MyNewProp erty" allowAnonymous= "true" type="int"/>
    </properties>
    </profile>
    </system.web>
    </configuration>
    >
    --
    My BizTalk blog:
    A place for me to store and share some notes about technical stuff I'm working with at the moment. The views expressed on this blog are mine alone and do not necessarily reflect the views of my employer.

    >
    >
    >
    >

    Comment

    Working...