Impersonation doesn't help.

Discussion in 'ASP .Net' started by =?Utf-8?B?RG1pdHJp?=, Feb 16, 2004.

  1. It seems I got stuck with interesting problem.
    I'm trying to send email using System.Web.Mail and connecting to my mail on different server (not IIS Smtp Server).

    Now my problem is, if I run my code in winforms application it works perfectly, but if i put exactly same code into my web application it gives me error saying it cant connect to server.

    Now I thought if i impersonate account im logged in as, it would fix my problem, by using System.Security.Principal.WindowsIdentity.GetCurrent.Name i can see that my web application impersonated my account just fine, but it still hasnt fixed my problem.

    Please can someone direct me where is my problem?

    Best regards,
    Dmitri.
     
    =?Utf-8?B?RG1pdHJp?=, Feb 16, 2004
    #1
    1. Advertising

  2. =?Utf-8?B?RG1pdHJp?=

    Yuri Belenky Guest

    Be sure that you use delegatable protocol. Check into your codebehind the
    type of authentification. If this type is equal to NTLM than it the core of
    your problem. NTLM does not support delegation.
    Only Kerberos and Basic Auth.
    "Dmitri" <> wrote in message
    news:...
    > It seems I got stuck with interesting problem.
    > I'm trying to send email using System.Web.Mail and connecting to my mail

    on different server (not IIS Smtp Server).
    >
    > Now my problem is, if I run my code in winforms application it works

    perfectly, but if i put exactly same code into my web application it gives
    me error saying it cant connect to server.
    >
    > Now I thought if i impersonate account im logged in as, it would fix my

    problem, by using System.Security.Principal.WindowsIdentity.GetCurrent.Name
    i can see that my web application impersonated my account just fine, but it
    still hasnt fixed my problem.
    >
    > Please can someone direct me where is my problem?
    >
    > Best regards,
    > Dmitri.
     
    Yuri Belenky, Feb 16, 2004
    #2
    1. Advertising

  3. Hi, Yuri.
    Thanks for reply.

    How would I check what protocol am I using?

    I do use this method for authentication:
    System.Web.Security.FormsAuthentication.RedirectFromLoginPage(txtUsername.Text, True)

    Could that cause problem?

    Best regards,
    Dmitri Lipski.
     
    =?Utf-8?B?RG1pdHJp?=, Feb 17, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sean McKaharay

    Impersonation Problems HELP!!!!!!!!

    Sean McKaharay, Feb 20, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    393
    Sean McKaharay
    Feb 20, 2004
  2. Garrett
    Replies:
    4
    Views:
    4,825
    Garrett
    Dec 2, 2004
  3. Replies:
    2
    Views:
    410
  4. Help with impersonation.

    , Oct 19, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    308
    Kevin Spencer
    Oct 19, 2007
  5. Tom Bennart

    Impersonation doesn't work with UNC

    Tom Bennart, Jun 9, 2006, in forum: ASP .Net Security
    Replies:
    4
    Views:
    144
    Tom Bennart
    Jun 11, 2006
Loading...

Share This Page