Click here to Skip to main content
15,889,808 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Logout from Three IFrames at a time to login page Pin
Schatak4-Apr-14 3:17
professionalSchatak4-Apr-14 3:17 
QuestionHow to populate gridview based on another value clicked. Pin
Garishma27-Mar-14 7:55
Garishma27-Mar-14 7:55 
AnswerRe: How to populate gridview based on another value clicked. Pin
Bikash Prakash Dash28-Mar-14 19:50
Bikash Prakash Dash28-Mar-14 19:50 
Questiongive me the steps Pin
Member 1070426327-Mar-14 6:48
Member 1070426327-Mar-14 6:48 
AnswerRe: give me the steps Pin
Sulaiman_J3-Apr-14 0:21
Sulaiman_J3-Apr-14 0:21 
GeneralRe: give me the steps Pin
Member 1070426310-Apr-14 11:34
Member 1070426310-Apr-14 11:34 
GeneralRe: give me the steps Pin
Sulaiman_J18-Apr-14 18:58
Sulaiman_J18-Apr-14 18:58 
QuestionIs it possible to use ASP.NET ProfileCommon in a windows service? Pin
devenv.exe26-Mar-14 21:15
professionaldevenv.exe26-Mar-14 21:15 
I have my ProfileCommon Class below
C#
using System.Web.Profile;

  public class ProfileCommon : ProfileBase
  {
   public string LastName
    {
        get
        {
            return (string)base["LastName"];
        }
        set
        {
            base["LastName"] = value;
            this.Save();
        }
    }

    public ProfileCommon GetProfile(string userName)
    {
        return (ProfileCommon)ProfileBase.Create(userName);
    }
}


And the Profile section in the windows service app.config file is below

C#
<profile enabled="true" defaultProvider="SqlProfileProvider" inherits="MyWindowsService.Code.ProfileCommon">
        <providers>
            <clear />
            <add name="SqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="MyConnString" applicationName="Application1" />
        </providers>
    </profile>


And when i call sample code below

C#
ProfileCommon prf1 = new ProfileCommon();
  ProfileCommon prf = prf1.GetProfile("myWindowsLoginName");
  string name = prf.LastName;


I get an error "Could not load type 'MyWindowsService.Code.ProfileCommon' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'."

What am i doing wrong in those sample code snippets? OR is this even the right way of using ProfileCommon in a windows service (.NET 4.0), is this wrong all together, is there a better way.

All i want is given a userName, i should get that user's Profile LastName or FirstName from LDAP.
"Coming soon"



AnswerRe: Is it possible to use ASP.NET ProfileCommon in a windows service? Pin
Richard Deeming27-Mar-14 2:26
mveRichard Deeming27-Mar-14 2:26 
QuestionThe Legend hides the Plotted data in Chart control ASP.Net Pin
Kandepu Rajesh26-Mar-14 17:55
Kandepu Rajesh26-Mar-14 17:55 
AnswerRe: The Legend hides the Plotted data in Chart control ASP.Net Pin
Schatak4-Apr-14 3:24
professionalSchatak4-Apr-14 3:24 
QuestionHow to blink text Pin
vasuarya26-Mar-14 0:33
vasuarya26-Mar-14 0:33 
AnswerRe: How to blink text Pin
Kornfeld Eliyahu Peter26-Mar-14 1:15
professionalKornfeld Eliyahu Peter26-Mar-14 1:15 
AnswerRe: How to blink text Pin
Richard Deeming26-Mar-14 2:32
mveRichard Deeming26-Mar-14 2:32 
QuestionC# Web Forms: Add a context menu to a grid and outside grid also. Pin
AshwiniSH26-Mar-14 0:12
professionalAshwiniSH26-Mar-14 0:12 
AnswerRe: C# Web Forms: Add a context menu to a grid and outside grid also. Pin
Bikash Prakash Dash28-Mar-14 19:58
Bikash Prakash Dash28-Mar-14 19:58 
QuestionAjax Update Panel not working properly when using mutiple triggers contols on it Pin
Yat_desh9025-Mar-14 21:52
Yat_desh9025-Mar-14 21:52 
QuestionRe: Ajax Update Panel not working properly when using mutiple triggers contols on it Pin
Blikkies25-Mar-14 23:33
professionalBlikkies25-Mar-14 23:33 
QuestionWhatsapp group for. NET Developers Pin
rehmanabdurr25-Mar-14 19:32
rehmanabdurr25-Mar-14 19:32 
AnswerRe: Whatsapp group for. NET Developers Pin
Kornfeld Eliyahu Peter25-Mar-14 22:09
professionalKornfeld Eliyahu Peter25-Mar-14 22:09 
QuestionWindows update (KB2894843) makes my ASP.NET web application post back to behave differently Pin
Member 1069366523-Mar-14 18:21
Member 1069366523-Mar-14 18:21 
AnswerRe: Windows update (KB2894843) makes my ASP.NET web application post back to behave differently Pin
Richard Deeming24-Mar-14 3:13
mveRichard Deeming24-Mar-14 3:13 
GeneralRe: Windows update (KB2894843) makes my ASP.NET web application post back to behave differently Pin
Member 1069366524-Mar-14 4:56
Member 1069366524-Mar-14 4:56 
QuestionIHttpModule and Build Action = Compile? Or Content? Pin
Swab.Jat23-Mar-14 1:40
Swab.Jat23-Mar-14 1:40 
Questiontextile cad fabric output simulation Pin
Member 1057081122-Mar-14 1:55
Member 1057081122-Mar-14 1:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.