1

Hoping someone has an idea on how to use a type from my linq-to-sql datacontext as the type attribute in my web.config providers property.

    <profile enabled="true">
        <properties>
            <add name="UserSetting" allowAnonymous="true" type="MyApp.DataAccess.UserSetting" />
        </properties>
    </profile>

So, in this case, UserSetting is a table in my database, which I've mapped using Linq to Sql. Alternatively, in the past I've specified a class which I've expressly written in my application and it's worked fine. I'd rather have it dynamically linked though.

Hopefully this makes sense - thanks!

localman
  • 497
  • 4
  • 14

1 Answers1

1

I got it to work.

I needed to add the system.data.linq assembly to the web.cofig.

    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
      </assemblies>
    </compilation>

oh - and dont forget the profile provider.

localman
  • 497
  • 4
  • 14