Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Asynchron WebService Calls

Status
Not open for further replies.

AsWaM007

Programmer
Nov 24, 2005
5
DE
Hi...
I would like to make an Asynchron Webservice call from another webservice. Is it clear? I guess it is not.
So I have a WebService1 which makes a long work like generating many XML reports...
I would like to call him from webservice2, but asynchron.
Do i have to use the BeginMyMethod that is generated with the webservice (if i do how do i make it?)
I did something like this but i cheated a bit actually

[WebMethod]
public string CallLongProc()
{
MyFirstWS.LongProcessWS Myfunc=new MyWs2.MyFirstWS.LongProcessWS();
Myfunc.Credentials=CredentialCache.DefaultCredentials;
Thread myworkthread = new Thread(new ThreadStart(Myfunc.LongProcess));
myworkthread.Start();
return "Still runing on thread:"+ myworkthread.GetHashCode().ToString();
}

Second question
I have an Exe file that does querry into sharepoints lists and SQL database, and it works great...
When i put this code in a WebService, even if i grant acces to NT AUTHORITY\NETWORK SERVICES to the SQL database i still have an "Acces denied" Error...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top