Subject: user profile creation problem
Posted By: yasminnnnn Post Date: 12/9/2006 1:22:30 PM
hello

this is how my web.config file looks. when i run the site, i face the problem

"Error    1    The property name specified is invalid. (C:\Documents and Settings\Neslihan\Desktop\mis\492\vs\web.config line 81)
.......................
web.config

<configuration>
 <appSettings>
  <add key="AMS" value="AMS" />
 </appSettings>

  <connectionStrings>
       <remove name="LocalSqlServer"/>
       <add name="LocalSqlServer" connectionString="Data Source=localhost;Initial Catalog=dernek;Integrated Security=True" providerName="System.Data.SqlClient"/>
     </connectionStrings>

  <system.web>
        <!--
            Set compilation debug="true" to insert debugging
            symbols into the compiled page. Because this
            affects performance, set this value to true only
            during development.
        -->
  <roleManager enabled="true" />
    <!--<customErrors mode="RemoteOnly" defaultRedirect="~/Missing.aspx" >
    <error statusCode="403" redirect="NoAccessPage.htm" />
            <error statusCode="404" redirect="FileNotFoundPage.htm" />
        </customErrors>-->
  <compilation debug="true"/>
        <!--
            The <authentication> section enables configuration
            of the security authentication mode used by
            ASP.NET to identify an incoming user.
        -->
    <authentication mode="Forms">
      <forms loginUrl="Default.aspx"></forms>
    </authentication>
     
    
        <!--
            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.
    -->
    <siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
      <providers>
        <add name="XmlSiteMapProvider"
                    description="Default SiteMap provider."
                    type="System.Web.XmlSiteMapProvider "
                    siteMapFile="Web.sitemap"
                    securityTrimmingEnabled="true"/>
      </providers>
    </siteMap>
    

      <profile enabled ="true" >
        <properties>
        <add name="UserName"/>
        <add name="Name"/>
        <add name="Surname"/>
        <add name="Address"/>
        <add name="City"/>
        <add name="County"/>
        <add name="PostCode"/>
        <add name="Country"/>
        <add name="Email"/>
        <add name="Association id"/>
        </properties>
    </profile>
  </system.web>

</configuration>
...............................................
what could be the problem? may it be related to provider?

thanks

Reply By: Imar Reply Date: 12/9/2006 1:26:14 PM
You can't have property names with a space in it:

Association id

should be

AssociationId

HtH,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Reply By: yasminnnnn Reply Date: 12/11/2006 7:29:21 AM
thanks a lot Imar,
how can i convert these code lines of my userProfile.aspx.cs page into c#:
......................
Profile.Name = CType(FCLoginView.FindControl("txtName"), TextBox).Text
        
..............................
and
..............................
CType(FCLoginView.FindControl("txtName"), TextBox).Text = Profile.Name
..............................
ps:i dont have a loginview on the specified page

Reply By: Imar Reply Date: 12/11/2006 7:38:11 AM
If there's no FormView in your page, I don't know how to change the code, as it deals exclusively with a FormView....

Can you elaborate a bit about what you're trying to do and maybe post some more code.

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply By: yasminnnnn Reply Date: 12/11/2006 7:48:54 AM
i am trying to get the profile information of a user via textboxes and create a profile for him/her and also to display the profile characteristics of him/her if wished.

if it is neccessary, i can put my texboxes in a loginview.

thanks..

Reply By: Imar Reply Date: 12/11/2006 7:53:17 AM
If you have just text boxes and no FormView, you can simply do this:

Profile.Name = txtName.Text;

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply By: yasminnnnn Reply Date: 12/11/2006 8:13:07 AM
thanks a lot Imar for your immediate help. We solved our problem.


Go to topic 53386

Return to index page 97
Return to index page 96
Return to index page 95
Return to index page 94
Return to index page 93
Return to index page 92
Return to index page 91
Return to index page 90
Return to index page 89
Return to index page 88