Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/261.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在Lightswitch中创建并使用新的ProfileProvider属性_C#_Visual Studio Lightswitch_Lightswitch 2013_Profile Provider_Sqlprofileprovider - Fatal编程技术网

C# 在Lightswitch中创建并使用新的ProfileProvider属性

C# 在Lightswitch中创建并使用新的ProfileProvider属性,c#,visual-studio-lightswitch,lightswitch-2013,profile-provider,sqlprofileprovider,C#,Visual Studio Lightswitch,Lightswitch 2013,Profile Provider,Sqlprofileprovider,如何使用Lightswitch创建和访问ProfileProvider的新属性 我试过这个: 修改了Web.config/configuration/system.Web中的下一节/ <profile enabled="True" defaultProvider="AspNetProfileProvider"> <providers> <clear /> <add name="AspNetProfileProvider" type="

如何使用Lightswitch创建和访问ProfileProvider的新属性

我试过这个: 修改了Web.config/configuration/system.Web中的下一节/

<profile enabled="True" defaultProvider="AspNetProfileProvider">
  <providers>
    <clear />
    <add name="AspNetProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="_IntrinsicData" applicationName="MyApplication" />
  </providers>
  <properties>
    <add name="FullName" />
    <add name="MyCustomProperty" />
  </properties>
</profile>
当我转到..User.FullName的定义时,我会看到一个自动生成的类,其中有属性FullName,但没有MyCustomProperty:

var a = ServerApplicationContext.CreateContext().Application.User.FullName; // Work
var b = ServerApplicationContext.CreateContext().Application.User.MyCustomProperty; // Don't work
public class ServerUser : ClaimsPrincipal, IUserInternal, IUser, IPrincipal, IIdentity
{
    public AuthenticationType AuthenticationType { get; protected set; }
    public IEnumerable<string> EffectivePermissions { get; }
    public string FullName { get; protected set; }
    public bool IsAnonymous { get; }
    ...
}
我想重建不是自动生成代码的方式,但我不知道如何实现这一点

谢谢