Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

Issue with profiles

$
0
0

Back again with another question for your learned ones. I am having trouble implementing a profile system for my project. I have successfully implemented authentication, roles and membership, however when I try to use profiles, as demonstrated by this guide, and other tutorials out there, such as the one here, it simply does not work. Here is my web.config:

<?xml version="1.0"?><!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  --><configuration><connectionStrings><add name="SqlServices" connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\Users\George\Documents\Visual Studio 2013\Projects\SupportTicketProject1\SupportTicketProject1\App_Data\aspnetdb.mdf; Integrated Security=SSPI;" /><add name="aspnetdbConnectionString" connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\aspnetdb.mdf;Integrated Security=True"
      providerName="System.Data.SqlClient" /><add name="ticketdbConnectionString" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\ticketdb.accdb;Persist Security Info=True"
      providerName="System.Data.OleDb" /></connectionStrings><system.web><authentication mode="Forms"><forms name=".ASPXFORMSAUTH" loginUrl="Account/login.aspx" /></authentication><membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="15"><providers><add name="SqlProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="SqlServices" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" passwordFormat="Clear" applicationName="SupportTicketApplication"/></providers></membership><roleManager defaultProvider="SqlRoleProvider" enabled="true"><providers><add name="SqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="SqlServices" applicationName="SupportTicketApplication"/></providers></roleManager><profile defaultProvider="SqlProfileProvider"><providers><clear /><add name="SqlProfileProvider"
          type="System.Web.Profile.SqlProfileProvider"
          connectionStringName="SqlServices"
          applicationName="SupportTicketApplication"
          description="SqlProfileProvider for Support Ticket Application" /></providers><properties><add name="FirstName" /><add name="Surname" /></properties></profile><compilation debug="true"/></system.web></configuration>

According to the multiple guides I have read again and again, I should simply be able to access a profile property by initializing a variable like this:

Dim userFirstName as Profile.FirstName

However when I try to do that it simply states that 'Profile.FirstName is not defined'. If you look at this screenshot, you can see that it cannot seem to detect that I have implemented a profile. I have run this application several times so it should at least take notice of the changes in web.config, however it just doesn't seem to like whatever it is I've done. Could you wise people help me out with this?

Thanks.


Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>