HELP! Web Services Permissions/Security Settings problem

U

Usman Shami

Hie,

I have developed some codes both in C# and VB using CDO
and ADO,which work perfectly fine in a windows
application, but they donot seem to work in a web services
application.
I am using the .NET platform with win 2k server and
exchange 2k server, with service pack 2.

The small code part is as follows(which works okay in a
windows application but not in a ASP NET web service web
method. Is it that my machine security/settings policies
need to be changed??? );

ADODB.Connection EmailCon=new ADODB.Connection();
EmailCon.Provider ="ExOLEDB.Datasource";
ADODB.Record EmailRec=new ADODB.RecordClass();
ADODB.Recordset EmailRs=new ADODB.RecordsetClass ();
string strInboxQuery,strURLInbox, strURLMailbox,
strUserName,strPassword;
ADODB.Fields Flds;
ADODB.Field Fld;
strUserName="admin";
strPassword="adminpass";
strURLMailbox="file://./backofficestorage/mytestdomain.com/
MBX/" + strUserName;
/*THROWS EXCEPTION HERE IN ASP .NET WEBSERVICES APPLICATION
/*EXCEPTION IS "Authentication Failed" while the same code
works for a forms(windows application)*/

EmailCon.Open(strURLMailbox,strUserName,strPassword,0);

EmailRec.Open( strURLMailbox,EmailCon ,
ADODB.ConnectModeEnum.adModeReadWrite,
ADODB.RecordCreateOptionsEnum.adFailIfNotExists,
ADODB.RecordOpenOptionsEnum.adOpenSource, strUserName,
strPassword);

strURLInbox = EmailRec.Fields
["urn:schemas:httpmail:inbox"]. Value. ToString () ;
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top