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...
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...