Use this code in 4.0 SP1 for Login purpose

System.Net.NetworkCredential objNet = new
System.Net.NetworkCredential(ConfigurationManager.AppSettings["UserID"].ToString(),
           
ConfigurationManager.AppSettings["Password"].ToString(),
           
ConfigurationManager.AppSettings["Domain"].ToString());
       
objAx.LogonAs(ConfigurationManager.AppSettings["UserID"].ToString(),
           
ConfigurationManager.AppSettings["Domain"].ToString(),
objNet, "DAT", "En-US", null, null);


--- Agus Riyadi <[EMAIL PROTECTED]> wrote:

> Hi Thanks for your response,
> 
> I am using Ax 4.0 SP1.
> 
> Regards,
> 
> Agus
> 
> 
> On 5/1/07, Arijit Basu <[EMAIL PROTECTED]>
> wrote:
> >
> >   Hi Agus,
> > Can you tell me if you are using AX 3.0 or AX
> 4.x??
> >
> > Arijit Basu
> >
> > On 5/1/07, Agus Riyadi <[EMAIL PROTECTED]
> <agusacil%40gmail.com>> wrote:
> > >
> > > Hi All,
> > >
> > > I have search through this groups but could not
> find answer how to
> > connect
> > > Axapta through web application.
> > >
> > > I have installed both Business Connector and COM
> Connector ( I want to
> > > test
> > > both of them).
> > > It works okay for windows application, but I
> couldn't make it work with
> > > asp.net application.
> > > I have done the following :
> > > 1. enable web.config to use impersonation
> > > 2. set the windows user used in impersonation as
> business connector
> > proxy
> > > account
> > >
> > > Still, got the error like "Failed to Initialized
> Business Connector"
> > >
> > > Any help would be appreciated.
> > >
> > > Regards,
> > >
> > > Agus
> > >
> > > [Non-text portions of this message have been
> removed]
> > >
> > >
> > >
> >
> > --
> >
> > Arijit Basu
> >
> > [Non-text portions of this message have been
> removed]
> >
> > 
> >
> 
> 
> [Non-text portions of this message have been
> removed]
> 
> 


Regards
Mohit Rajvanshy


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to