Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Services (http://www.velocityreviews.com/forums/f64-asp-net-web-services.html)
-   -   Asynchronous Web Service Method Failure (http://www.velocityreviews.com/forums/t784217-asynchronous-web-service-method-failure.html)

Turbo 12-10-2004 09:13 PM

Asynchronous Web Service Method Failure
 
Greetings to all

I have a set of web services that create reports upon request. These
reports can take the form of XML Spreadsheets or dynamically generated .pdf
files. I call the create report methods async to give the user the
opportunity to cancel a long running report. However, any create report
method that opens a stream reader (in order to import some XML for a
spreadsheet) or writer (in order to generate the XML spreadsheet file) cannot
be run async. They run fine synchronously, but for some reason, opening an
IO.Stream causes a "there was an error during async processing" error. The
interesting thing is, this error is given in a message box, not a typical
ASP.NET error page. Any thoughts?

Dan Rogers 12-13-2004 08:44 PM

RE: Asynchronous Web Service Method Failure
 
Some questions,

When you say async - do you mean you have created a one-way SOAP method?
(this is the right way to think about async for web services). When you
have a one-way method, you don't get to write a response. In other words,
async server side methods have a "void" signature always. If you try
marking a non-void method with the one way soap attribute, that is an error.

That aside, you should consider using SOAP with attachments if you are
returning files (no longe async methods).

I hope this helps

Dan Rogers
Microsoft Corporation
--------------------
>Thread-Topic: Asynchronous Web Service Method Failure
>thread-index: AcTe/QkQd8iqbozvTCKTbAiYn3Wy0A==
>X-WBNR-Posting-Host: 65.118.1.233
>From: "=?Utf-8?B?VHVyYm8=?=" <Turbo@discussions.microsoft.com>
>Subject: Asynchronous Web Service Method Failure
>Date: Fri, 10 Dec 2004 13:13:03 -0800
>Lines: 12
>Message-ID: <4F6A0DC8-92A1-4BB9-9E07-43123A799944@microsoft.com>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
>NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
>Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
>Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.aspnet.webservic es:27146
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
>
>Greetings to all
>
>I have a set of web services that create reports upon request. These
>reports can take the form of XML Spreadsheets or dynamically generated

pdf
>files. I call the create report methods async to give the user the
>opportunity to cancel a long running report. However, any create report
>method that opens a stream reader (in order to import some XML for a
>spreadsheet) or writer (in order to generate the XML spreadsheet file)

cannot
>be run async. They run fine synchronously, but for some reason, opening

an
>IO.Stream causes a "there was an error during async processing" error.

The
>interesting thing is, this error is given in a message box, not a typical
>ASP.NET error page. Any thoughts?
>



Bruce Johnson 12-13-2004 08:49 PM

Re: Asynchronous Web Service Method Failure
 
The fact that you're getting the error message in a message box means
that the client side of the process is catching and processing the
exception. You might want to try getting some information closer to the
actual call to see if you see anything useful.

Also, how large are the files that you're moving back and forth. I seem
to recall some default limit of around 4MB for request/response sizes in
ASP.NET.

Bruce Johnson [.NET MVP]
http://www.objectsharp.com/blogs/bruce

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Turbo 12-15-2004 07:43 PM

RE: Asynchronous Web Service Method Failure
 
Here is the procedure. I call an asynchronous web service method for a
particular report. I don't pass any files, just parameters for the report,
such as start date and end date. The web service methods don't return any
files, just URL's to the files so I can execute a response.redirect when the
web service is done creating the report. Some of my reports are XML
spreadsheets, so to avoid have to create the XML from scratch, I use existing
files and then add the necessary data elements to them. Within the web
service method that is creating the report, I open a streamreader or use the
XMLDocument Load method in order to get the static XML loaded into the
XMLDocument. When I'm done, I use a streamwriter to create an XmlTextWriter
to save the document. These methods work fine when done synchronously, but
fail when done async. Only methods that use objects derived from
streamreaders and writers fail when run async. I hope I'm making myself
clear. The error message box that pops up only occurs during development.
It isn't a client issue.

"Dan Rogers" wrote:

> Some questions,
>
> When you say async - do you mean you have created a one-way SOAP method?
> (this is the right way to think about async for web services). When you
> have a one-way method, you don't get to write a response. In other words,
> async server side methods have a "void" signature always. If you try
> marking a non-void method with the one way soap attribute, that is an error.
>
> That aside, you should consider using SOAP with attachments if you are
> returning files (no longe async methods).
>
> I hope this helps
>
> Dan Rogers
> Microsoft Corporation
> --------------------
> >Thread-Topic: Asynchronous Web Service Method Failure
> >thread-index: AcTe/QkQd8iqbozvTCKTbAiYn3Wy0A==
> >X-WBNR-Posting-Host: 65.118.1.233
> >From: "=?Utf-8?B?VHVyYm8=?=" <Turbo@discussions.microsoft.com>
> >Subject: Asynchronous Web Service Method Failure
> >Date: Fri, 10 Dec 2004 13:13:03 -0800
> >Lines: 12
> >Message-ID: <4F6A0DC8-92A1-4BB9-9E07-43123A799944@microsoft.com>
> >MIME-Version: 1.0
> >Content-Type: text/plain;
> > charset="Utf-8"
> >Content-Transfer-Encoding: 7bit
> >X-Newsreader: Microsoft CDO for Windows 2000
> >Content-Class: urn:content-classes:message
> >Importance: normal
> >Priority: normal
> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
> >NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> >Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
> >Xref: cpmsftngxa10.phx.gbl

> microsoft.public.dotnet.framework.aspnet.webservic es:27146
> >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
> >
> >Greetings to all
> >
> >I have a set of web services that create reports upon request. These
> >reports can take the form of XML Spreadsheets or dynamically generated

> .pdf
> >files. I call the create report methods async to give the user the
> >opportunity to cancel a long running report. However, any create report
> >method that opens a stream reader (in order to import some XML for a
> >spreadsheet) or writer (in order to generate the XML spreadsheet file)

> cannot
> >be run async. They run fine synchronously, but for some reason, opening

> an
> >IO.Stream causes a "there was an error during async processing" error.

> The
> >interesting thing is, this error is given in a message box, not a typical
> >ASP.NET error page. Any thoughts?
> >

>
>


Dan Rogers 12-16-2004 07:24 PM

RE: Asynchronous Web Service Method Failure
 
I'm still confused about what you mean by async. How are you invoking them
a) when it works, and b) when it doesn't work. Since you are returning
values to the caller, I am pretty sure that these are not async server side
operations, but you are referring to the non-blocking (beginMethodXX) on
the caller side as "async".

is this the case? If so, there is no difference in the way the call is
dispatched and handled on the server side - so again, my confusion as to
why the stream reader thinks the thread is async.

Something in the description here (topology - e.g. what code are you trying
to invoke on what side of a web service method call) is eluding me.

Dan
--------------------
>Thread-Topic: Asynchronous Web Service Method Failure
>thread-index: AcTi3k4zag4FdGNeSzOsg9ucQ1yLug==
>X-WBNR-Posting-Host: 65.118.1.233
>From: "=?Utf-8?B?VHVyYm8=?=" <Turbo@discussions.microsoft.com>
>References: <4F6A0DC8-92A1-4BB9-9E07-43123A799944@microsoft.com>

<00lXKSV4EHA.3388@cpmsftngxa10.phx.gbl>
>Subject: RE: Asynchronous Web Service Method Failure
>Date: Wed, 15 Dec 2004 11:43:09 -0800
>Lines: 77
>Message-ID: <E3D1275E-5CE8-4DCE-8145-0BAA1A0BE8EB@microsoft.com>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
>NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
>Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
>Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.aspnet.webservic es:27228
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
>
>Here is the procedure. I call an asynchronous web service method for a
>particular report. I don't pass any files, just parameters for the

report,
>such as start date and end date. The web service methods don't return any
>files, just URL's to the files so I can execute a response.redirect when

the
>web service is done creating the report. Some of my reports are XML
>spreadsheets, so to avoid have to create the XML from scratch, I use

existing
>files and then add the necessary data elements to them. Within the web
>service method that is creating the report, I open a streamreader or use

the
>XMLDocument Load method in order to get the static XML loaded into the
>XMLDocument. When I'm done, I use a streamwriter to create an

XmlTextWriter
>to save the document. These methods work fine when done synchronously,

but
>fail when done async. Only methods that use objects derived from
>streamreaders and writers fail when run async. I hope I'm making myself
>clear. The error message box that pops up only occurs during development.


>It isn't a client issue.
>
>"Dan Rogers" wrote:
>
>> Some questions,
>>
>> When you say async - do you mean you have created a one-way SOAP method?


>> (this is the right way to think about async for web services). When you
>> have a one-way method, you don't get to write a response. In other

words,
>> async server side methods have a "void" signature always. If you try
>> marking a non-void method with the one way soap attribute, that is an

error.
>>
>> That aside, you should consider using SOAP with attachments if you are
>> returning files (no longe async methods).
>>
>> I hope this helps
>>
>> Dan Rogers
>> Microsoft Corporation
>> --------------------
>> >Thread-Topic: Asynchronous Web Service Method Failure
>> >thread-index: AcTe/QkQd8iqbozvTCKTbAiYn3Wy0A==
>> >X-WBNR-Posting-Host: 65.118.1.233
>> >From: "=?Utf-8?B?VHVyYm8=?=" <Turbo@discussions.microsoft.com>
>> >Subject: Asynchronous Web Service Method Failure
>> >Date: Fri, 10 Dec 2004 13:13:03 -0800
>> >Lines: 12
>> >Message-ID: <4F6A0DC8-92A1-4BB9-9E07-43123A799944@microsoft.com>
>> >MIME-Version: 1.0
>> >Content-Type: text/plain;
>> > charset="Utf-8"
>> >Content-Transfer-Encoding: 7bit
>> >X-Newsreader: Microsoft CDO for Windows 2000
>> >Content-Class: urn:content-classes:message
>> >Importance: normal
>> >Priority: normal
>> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>> >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
>> >NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
>> >Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
>> >Xref: cpmsftngxa10.phx.gbl

>> microsoft.public.dotnet.framework.aspnet.webservic es:27146
>> >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
>> >
>> >Greetings to all
>> >
>> >I have a set of web services that create reports upon request. These
>> >reports can take the form of XML Spreadsheets or dynamically generated

>> .pdf
>> >files. I call the create report methods async to give the user the
>> >opportunity to cancel a long running report. However, any create

report
>> >method that opens a stream reader (in order to import some XML for a
>> >spreadsheet) or writer (in order to generate the XML spreadsheet file)

>> cannot
>> >be run async. They run fine synchronously, but for some reason,

opening
>> an
>> >IO.Stream causes a "there was an error during async processing" error.

>> The
>> >interesting thing is, this error is given in a message box, not a

typical
>> >ASP.NET error page. Any thoughts?
>> >

>>
>>

>



Turbo 12-17-2004 12:31 AM

RE: Asynchronous Web Service Method Failure
 
Let's say I have a web service called wsReportGenerator that has a method
called CreateReport. This method will create a .pdf or XML spreadsheet and
return the URL of the file created.

Class wsReportGenerator
Inherits System.Web.Services.WebService
<WebMethod()> Public Function CreateReport() as String

create report logic is here and the file (either .pdf or XML
spreadsheet) is
is saved to the hard drive somewhere on the server.

return "\ReportFolder\ReportName.pdf" ' virtual location of report

End Function
End Class

So, when I call this method where appropriate, it's

dim ws as new wsReportGenerator()
or using the proxy from a web reference, ProxyReportGenerator()
dim URL as string = wsReportGenerator.CreateReport()
Response.Redirect(URL, True)

Because the CreateReport method can take a while to run, I call it
asynchronously using a proxy so it looks more like

dim ws as new ProxyReportGenerator()
ws.BeginCreateReport(callback, ws)

Obviously I need to check to see if it's finished every now and then so in
my callback procedure I have
dim URL as string = ws.EndCreateReport(iAsyncResult)
I save the URL in a session variable so the next time I check, it's there
and I can redirect.

When I call a method that opens stream readers or writers somewhere within,
I have no problem running them using the first way, which is synchronous.
They fail when I use the Proxy/Begin method, which invokes the method
asynchronously. Methods that don't open streams run either way with no
problem.

I appreciate you taking the time to look at this. I'm having trouble
explaining it. When I say async in this case, I mean using the
Proxy.BeginMethodName where Proxy would be derived from
System.Web.Services.Protocols.SoapHttpClientProtoc ol, the class generated
from setting a web reference to a service.

"Dan Rogers" wrote:

> I'm still confused about what you mean by async. How are you invoking them
> a) when it works, and b) when it doesn't work. Since you are returning
> values to the caller, I am pretty sure that these are not async server side
> operations, but you are referring to the non-blocking (beginMethodXX) on
> the caller side as "async".
>
> is this the case? If so, there is no difference in the way the call is
> dispatched and handled on the server side - so again, my confusion as to
> why the stream reader thinks the thread is async.
>
> Something in the description here (topology - e.g. what code are you trying
> to invoke on what side of a web service method call) is eluding me.
>
> Dan
> --------------------
> >Thread-Topic: Asynchronous Web Service Method Failure
> >thread-index: AcTi3k4zag4FdGNeSzOsg9ucQ1yLug==
> >X-WBNR-Posting-Host: 65.118.1.233
> >From: "=?Utf-8?B?VHVyYm8=?=" <Turbo@discussions.microsoft.com>
> >References: <4F6A0DC8-92A1-4BB9-9E07-43123A799944@microsoft.com>

> <00lXKSV4EHA.3388@cpmsftngxa10.phx.gbl>
> >Subject: RE: Asynchronous Web Service Method Failure
> >Date: Wed, 15 Dec 2004 11:43:09 -0800
> >Lines: 77
> >Message-ID: <E3D1275E-5CE8-4DCE-8145-0BAA1A0BE8EB@microsoft.com>
> >MIME-Version: 1.0
> >Content-Type: text/plain;
> > charset="Utf-8"
> >Content-Transfer-Encoding: 7bit
> >X-Newsreader: Microsoft CDO for Windows 2000
> >Content-Class: urn:content-classes:message
> >Importance: normal
> >Priority: normal
> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
> >NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> >Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
> >Xref: cpmsftngxa10.phx.gbl

> microsoft.public.dotnet.framework.aspnet.webservic es:27228
> >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
> >
> >Here is the procedure. I call an asynchronous web service method for a
> >particular report. I don't pass any files, just parameters for the

> report,
> >such as start date and end date. The web service methods don't return any
> >files, just URL's to the files so I can execute a response.redirect when

> the
> >web service is done creating the report. Some of my reports are XML
> >spreadsheets, so to avoid have to create the XML from scratch, I use

> existing
> >files and then add the necessary data elements to them. Within the web
> >service method that is creating the report, I open a streamreader or use

> the
> >XMLDocument Load method in order to get the static XML loaded into the
> >XMLDocument. When I'm done, I use a streamwriter to create an

> XmlTextWriter
> >to save the document. These methods work fine when done synchronously,

> but
> >fail when done async. Only methods that use objects derived from
> >streamreaders and writers fail when run async. I hope I'm making myself
> >clear. The error message box that pops up only occurs during development.

>
> >It isn't a client issue.
> >
> >"Dan Rogers" wrote:
> >
> >> Some questions,
> >>
> >> When you say async - do you mean you have created a one-way SOAP method?

>
> >> (this is the right way to think about async for web services). When you
> >> have a one-way method, you don't get to write a response. In other

> words,
> >> async server side methods have a "void" signature always. If you try
> >> marking a non-void method with the one way soap attribute, that is an

> error.
> >>
> >> That aside, you should consider using SOAP with attachments if you are
> >> returning files (no longe async methods).
> >>
> >> I hope this helps
> >>
> >> Dan Rogers
> >> Microsoft Corporation
> >> --------------------
> >> >Thread-Topic: Asynchronous Web Service Method Failure
> >> >thread-index: AcTe/QkQd8iqbozvTCKTbAiYn3Wy0A==
> >> >X-WBNR-Posting-Host: 65.118.1.233
> >> >From: "=?Utf-8?B?VHVyYm8=?=" <Turbo@discussions.microsoft.com>
> >> >Subject: Asynchronous Web Service Method Failure
> >> >Date: Fri, 10 Dec 2004 13:13:03 -0800
> >> >Lines: 12
> >> >Message-ID: <4F6A0DC8-92A1-4BB9-9E07-43123A799944@microsoft.com>
> >> >MIME-Version: 1.0
> >> >Content-Type: text/plain;
> >> > charset="Utf-8"
> >> >Content-Transfer-Encoding: 7bit
> >> >X-Newsreader: Microsoft CDO for Windows 2000
> >> >Content-Class: urn:content-classes:message
> >> >Importance: normal
> >> >Priority: normal
> >> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> >> >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
> >> >NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> >> >Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
> >> >Xref: cpmsftngxa10.phx.gbl
> >> microsoft.public.dotnet.framework.aspnet.webservic es:27146
> >> >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
> >> >
> >> >Greetings to all
> >> >
> >> >I have a set of web services that create reports upon request. These
> >> >reports can take the form of XML Spreadsheets or dynamically generated
> >> .pdf
> >> >files. I call the create report methods async to give the user the
> >> >opportunity to cancel a long running report. However, any create

> report
> >> >method that opens a stream reader (in order to import some XML for a
> >> >spreadsheet) or writer (in order to generate the XML spreadsheet file)
> >> cannot
> >> >be run async. They run fine synchronously, but for some reason,

> opening
> >> an
> >> >IO.Stream causes a "there was an error during async processing" error.
> >> The
> >> >interesting thing is, this error is given in a message box, not a

> typical
> >> >ASP.NET error page. Any thoughts?
> >> >
> >>
> >>

> >

>
>


Turbo 12-17-2004 04:11 PM

RE: Asynchronous Web Service Method Failure
 
In clarification of my previous post, I have found that I cannot call web
service methods through a proxy if the method opens a stream reader or stream
writer. If I call the CreateReport method using the proxy, it will timeout.
If I call the BeginCreateReport method, it fails when attempting the use the
stream. The only way I can get the method to run successfully is to create
an instance of the web service directly, without using a proxy.

"Dan Rogers" wrote:

> I'm still confused about what you mean by async. How are you invoking them
> a) when it works, and b) when it doesn't work. Since you are returning
> values to the caller, I am pretty sure that these are not async server side
> operations, but you are referring to the non-blocking (beginMethodXX) on
> the caller side as "async".
>
> is this the case? If so, there is no difference in the way the call is
> dispatched and handled on the server side - so again, my confusion as to
> why the stream reader thinks the thread is async.
>
> Something in the description here (topology - e.g. what code are you trying
> to invoke on what side of a web service method call) is eluding me.
>
> Dan
> --------------------
> >Thread-Topic: Asynchronous Web Service Method Failure
> >thread-index: AcTi3k4zag4FdGNeSzOsg9ucQ1yLug==
> >X-WBNR-Posting-Host: 65.118.1.233
> >From: "=?Utf-8?B?VHVyYm8=?=" <Turbo@discussions.microsoft.com>
> >References: <4F6A0DC8-92A1-4BB9-9E07-43123A799944@microsoft.com>

> <00lXKSV4EHA.3388@cpmsftngxa10.phx.gbl>
> >Subject: RE: Asynchronous Web Service Method Failure
> >Date: Wed, 15 Dec 2004 11:43:09 -0800
> >Lines: 77
> >Message-ID: <E3D1275E-5CE8-4DCE-8145-0BAA1A0BE8EB@microsoft.com>
> >MIME-Version: 1.0
> >Content-Type: text/plain;
> > charset="Utf-8"
> >Content-Transfer-Encoding: 7bit
> >X-Newsreader: Microsoft CDO for Windows 2000
> >Content-Class: urn:content-classes:message
> >Importance: normal
> >Priority: normal
> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
> >NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> >Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
> >Xref: cpmsftngxa10.phx.gbl

> microsoft.public.dotnet.framework.aspnet.webservic es:27228
> >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
> >
> >Here is the procedure. I call an asynchronous web service method for a
> >particular report. I don't pass any files, just parameters for the

> report,
> >such as start date and end date. The web service methods don't return any
> >files, just URL's to the files so I can execute a response.redirect when

> the
> >web service is done creating the report. Some of my reports are XML
> >spreadsheets, so to avoid have to create the XML from scratch, I use

> existing
> >files and then add the necessary data elements to them. Within the web
> >service method that is creating the report, I open a streamreader or use

> the
> >XMLDocument Load method in order to get the static XML loaded into the
> >XMLDocument. When I'm done, I use a streamwriter to create an

> XmlTextWriter
> >to save the document. These methods work fine when done synchronously,

> but
> >fail when done async. Only methods that use objects derived from
> >streamreaders and writers fail when run async. I hope I'm making myself
> >clear. The error message box that pops up only occurs during development.

>
> >It isn't a client issue.
> >
> >"Dan Rogers" wrote:
> >
> >> Some questions,
> >>
> >> When you say async - do you mean you have created a one-way SOAP method?

>
> >> (this is the right way to think about async for web services). When you
> >> have a one-way method, you don't get to write a response. In other

> words,
> >> async server side methods have a "void" signature always. If you try
> >> marking a non-void method with the one way soap attribute, that is an

> error.
> >>
> >> That aside, you should consider using SOAP with attachments if you are
> >> returning files (no longe async methods).
> >>
> >> I hope this helps
> >>
> >> Dan Rogers
> >> Microsoft Corporation
> >> --------------------
> >> >Thread-Topic: Asynchronous Web Service Method Failure
> >> >thread-index: AcTe/QkQd8iqbozvTCKTbAiYn3Wy0A==
> >> >X-WBNR-Posting-Host: 65.118.1.233
> >> >From: "=?Utf-8?B?VHVyYm8=?=" <Turbo@discussions.microsoft.com>
> >> >Subject: Asynchronous Web Service Method Failure
> >> >Date: Fri, 10 Dec 2004 13:13:03 -0800
> >> >Lines: 12
> >> >Message-ID: <4F6A0DC8-92A1-4BB9-9E07-43123A799944@microsoft.com>
> >> >MIME-Version: 1.0
> >> >Content-Type: text/plain;
> >> > charset="Utf-8"
> >> >Content-Transfer-Encoding: 7bit
> >> >X-Newsreader: Microsoft CDO for Windows 2000
> >> >Content-Class: urn:content-classes:message
> >> >Importance: normal
> >> >Priority: normal
> >> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> >> >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
> >> >NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> >> >Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
> >> >Xref: cpmsftngxa10.phx.gbl
> >> microsoft.public.dotnet.framework.aspnet.webservic es:27146
> >> >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
> >> >
> >> >Greetings to all
> >> >
> >> >I have a set of web services that create reports upon request. These
> >> >reports can take the form of XML Spreadsheets or dynamically generated
> >> .pdf
> >> >files. I call the create report methods async to give the user the
> >> >opportunity to cancel a long running report. However, any create

> report
> >> >method that opens a stream reader (in order to import some XML for a
> >> >spreadsheet) or writer (in order to generate the XML spreadsheet file)
> >> cannot
> >> >be run async. They run fine synchronously, but for some reason,

> opening
> >> an
> >> >IO.Stream causes a "there was an error during async processing" error.
> >> The
> >> >interesting thing is, this error is given in a message box, not a

> typical
> >> >ASP.NET error page. Any thoughts?
> >> >
> >>
> >>

> >

>
>


Dan Rogers 12-20-2004 11:24 PM

RE: Asynchronous Web Service Method Failure
 
Hi,

Where does this fail - on the caller, or on the service implementation?

The tricky part is that the service implementation (on some far away
server) has no clue that it was called via a delegate. So if it is failing
on the server, I'm at a loss to understand why.

You mentioned that you can call it directly or call it via the proxy. If
you are calling it directly, well, then yes, I can see how the server might
know. What is the fault that you are receiving? Can you provide the stack
trace?

The message box part is still confusing to me. This isn't something you
would see on a web service implementation since there is no logged in
winstation to display a dialog box through.

I'm pretty sure that something in the description of the topology you are
seeing is still not clear to me.

There are several things that I can think of that would make IO on a stream
and async run afoul. The first would be two threads operating on the same
stream simultaneously. But I can't see your implementation, so it isn't
clear to me if you are somehow sharing a stream between two threads. My
own imagined implementation of your report writer is that it opens a file,
writes to it, and then closes it. Is there any chance that you're
encountering two requests hitting the same file name at the same time?

Dan

--------------------
>Thread-Topic: Asynchronous Web Service Method Failure
>thread-index: AcTjz7CGUISXN6yDRvuJPaoyQ6gWjg==
>X-WBNR-Posting-Host: 68.74.70.108
>From: "=?Utf-8?B?VHVyYm8=?=" <Turbo@discussions.microsoft.com>
>References: <4F6A0DC8-92A1-4BB9-9E07-43123A799944@microsoft.com>

<00lXKSV4EHA.3388@cpmsftngxa10.phx.gbl>
<E3D1275E-5CE8-4DCE-8145-0BAA1A0BE8EB@microsoft.com>
<DUddYT64EHA.1964@cpmsftngxa10.phx.gbl>
>Subject: RE: Asynchronous Web Service Method Failure
>Date: Thu, 16 Dec 2004 16:31:03 -0800
>Lines: 184
>Message-ID: <CD5D3F82-4B60-4875-B71E-0A9B0E7443B7@microsoft.com>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
>NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
>Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
>Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.aspnet.webservic es:27255
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
>
>Let's say I have a web service called wsReportGenerator that has a method
>called CreateReport. This method will create a .pdf or XML spreadsheet

and
>return the URL of the file created.
>
>Class wsReportGenerator
>Inherits System.Web.Services.WebService
><WebMethod()> Public Function CreateReport() as String
>
> create report logic is here and the file (either .pdf or XML
>spreadsheet) is
> is saved to the hard drive somewhere on the server.
>
> return "\ReportFolder\ReportName.pdf" ' virtual location of report
>
>End Function
>End Class
>
>So, when I call this method where appropriate, it's
>
>dim ws as new wsReportGenerator()
> or using the proxy from a web reference, ProxyReportGenerator()
>dim URL as string = wsReportGenerator.CreateReport()
>Response.Redirect(URL, True)
>
>Because the CreateReport method can take a while to run, I call it
>asynchronously using a proxy so it looks more like
>
>dim ws as new ProxyReportGenerator()
>ws.BeginCreateReport(callback, ws)
>
>Obviously I need to check to see if it's finished every now and then so in
>my callback procedure I have
>dim URL as string = ws.EndCreateReport(iAsyncResult)
>I save the URL in a session variable so the next time I check, it's there
>and I can redirect.
>
>When I call a method that opens stream readers or writers somewhere

within,
>I have no problem running them using the first way, which is synchronous.
>They fail when I use the Proxy/Begin method, which invokes the method
>asynchronously. Methods that don't open streams run either way with no
>problem.
>
>I appreciate you taking the time to look at this. I'm having trouble
>explaining it. When I say async in this case, I mean using the
>Proxy.BeginMethodName where Proxy would be derived from
>System.Web.Services.Protocols.SoapHttpClientProto col, the class generated
>from setting a web reference to a service.
>



Dan Rogers 12-21-2004 12:00 AM

RE: Asynchronous Web Service Method Failure
 
This could be a security issue. Because the request is originating thru
the web service (asp.net), the permissions granted to the thread are indeed
sandboxed. If you are calling the class dirctly, you are not encountering
the sand box. Have you tried treating this as a permissions thing? For
instance, if you only try to write to the services directory, and not to a
root qualified path, do you have better luck? I should have thought of
this possibility since it is such a common case.

If you try to over-write an existing file in the local service directory,
and you've explicitely granted permissions to the ASPNET_IIS web service
account to that file, does it work any better? WS that write files are
indeed problematic because they are so tightly sand boxed. If you think
about it, the potential under high load to knock your server over when the
disk is full is extremely likely. A common attack scenario involves web
exposed calls that save files.

Dan
--------------------
>Thread-Topic: Asynchronous Web Service Method Failure
>thread-index: AcTkUwPdMeARkT8bTT+WHDnZWsK+gg==
>X-WBNR-Posting-Host: 65.118.1.233
>From: "=?Utf-8?B?VHVyYm8=?=" <Turbo@discussions.microsoft.com>
>References: <4F6A0DC8-92A1-4BB9-9E07-43123A799944@microsoft.com>

<00lXKSV4EHA.3388@cpmsftngxa10.phx.gbl>
<E3D1275E-5CE8-4DCE-8145-0BAA1A0BE8EB@microsoft.com>
<DUddYT64EHA.1964@cpmsftngxa10.phx.gbl>
>Subject: RE: Asynchronous Web Service Method Failure
>Date: Fri, 17 Dec 2004 08:11:07 -0800
>Lines: 143
>Message-ID: <79A48C7F-F977-4764-9037-78B1ECE7565B@microsoft.com>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
>NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
>Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
>Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.aspnet.webservic es:27277
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
>
>In clarification of my previous post, I have found that I cannot call web
>service methods through a proxy if the method opens a stream reader or

stream
>writer. If I call the CreateReport method using the proxy, it will

timeout.
>If I call the BeginCreateReport method, it fails when attempting the use

the
>stream. The only way I can get the method to run successfully is to

create
>an instance of the web service directly, without using a proxy.
>
>"Dan Rogers" wrote:
>
>> I'm still confused about what you mean by async. How are you invoking

them
>> a) when it works, and b) when it doesn't work. Since you are returning
>> values to the caller, I am pretty sure that these are not async server

side
>> operations, but you are referring to the non-blocking (beginMethodXX) on
>> the caller side as "async".
>>
>> is this the case? If so, there is no difference in the way the call is
>> dispatched and handled on the server side - so again, my confusion as to
>> why the stream reader thinks the thread is async.
>>
>> Something in the description here (topology - e.g. what code are you

trying
>> to invoke on what side of a web service method call) is eluding me.
>>
>> Dan
>> --------------------
>> >Thread-Topic: Asynchronous Web Service Method Failure
>> >thread-index: AcTi3k4zag4FdGNeSzOsg9ucQ1yLug==
>> >X-WBNR-Posting-Host: 65.118.1.233
>> >From: "=?Utf-8?B?VHVyYm8=?=" <Turbo@discussions.microsoft.com>
>> >References: <4F6A0DC8-92A1-4BB9-9E07-43123A799944@microsoft.com>

>> <00lXKSV4EHA.3388@cpmsftngxa10.phx.gbl>
>> >Subject: RE: Asynchronous Web Service Method Failure
>> >Date: Wed, 15 Dec 2004 11:43:09 -0800
>> >Lines: 77
>> >Message-ID: <E3D1275E-5CE8-4DCE-8145-0BAA1A0BE8EB@microsoft.com>
>> >MIME-Version: 1.0
>> >Content-Type: text/plain;
>> > charset="Utf-8"
>> >Content-Transfer-Encoding: 7bit
>> >X-Newsreader: Microsoft CDO for Windows 2000
>> >Content-Class: urn:content-classes:message
>> >Importance: normal
>> >Priority: normal
>> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>> >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
>> >NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
>> >Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
>> >Xref: cpmsftngxa10.phx.gbl

>> microsoft.public.dotnet.framework.aspnet.webservic es:27228
>> >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
>> >
>> >Here is the procedure. I call an asynchronous web service method for a
>> >particular report. I don't pass any files, just parameters for the

>> report,
>> >such as start date and end date. The web service methods don't return

any
>> >files, just URL's to the files so I can execute a response.redirect

when
>> the
>> >web service is done creating the report. Some of my reports are XML
>> >spreadsheets, so to avoid have to create the XML from scratch, I use

>> existing
>> >files and then add the necessary data elements to them. Within the web
>> >service method that is creating the report, I open a streamreader or

use
>> the
>> >XMLDocument Load method in order to get the static XML loaded into the
>> >XMLDocument. When I'm done, I use a streamwriter to create an

>> XmlTextWriter
>> >to save the document. These methods work fine when done synchronously,

>> but
>> >fail when done async. Only methods that use objects derived from
>> >streamreaders and writers fail when run async. I hope I'm making

myself
>> >clear. The error message box that pops up only occurs during

development.
>>
>> >It isn't a client issue.
>> >
>> >"Dan Rogers" wrote:
>> >
>> >> Some questions,
>> >>
>> >> When you say async - do you mean you have created a one-way SOAP

method?
>>
>> >> (this is the right way to think about async for web services). When

you
>> >> have a one-way method, you don't get to write a response. In other

>> words,
>> >> async server side methods have a "void" signature always. If you try
>> >> marking a non-void method with the one way soap attribute, that is an

>> error.
>> >>
>> >> That aside, you should consider using SOAP with attachments if you

are
>> >> returning files (no longe async methods).
>> >>
>> >> I hope this helps
>> >>
>> >> Dan Rogers
>> >> Microsoft Corporation
>> >> --------------------
>> >> >Thread-Topic: Asynchronous Web Service Method Failure
>> >> >thread-index: AcTe/QkQd8iqbozvTCKTbAiYn3Wy0A==
>> >> >X-WBNR-Posting-Host: 65.118.1.233
>> >> >From: "=?Utf-8?B?VHVyYm8=?=" <Turbo@discussions.microsoft.com>
>> >> >Subject: Asynchronous Web Service Method Failure
>> >> >Date: Fri, 10 Dec 2004 13:13:03 -0800
>> >> >Lines: 12
>> >> >Message-ID: <4F6A0DC8-92A1-4BB9-9E07-43123A799944@microsoft.com>
>> >> >MIME-Version: 1.0
>> >> >Content-Type: text/plain;
>> >> > charset="Utf-8"
>> >> >Content-Transfer-Encoding: 7bit
>> >> >X-Newsreader: Microsoft CDO for Windows 2000
>> >> >Content-Class: urn:content-classes:message
>> >> >Importance: normal
>> >> >Priority: normal
>> >> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>> >> >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
>> >> >NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
>> >> >Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
>> >> >Xref: cpmsftngxa10.phx.gbl
>> >> microsoft.public.dotnet.framework.aspnet.webservic es:27146
>> >> >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
>> >> >
>> >> >Greetings to all
>> >> >
>> >> >I have a set of web services that create reports upon request.

These
>> >> >reports can take the form of XML Spreadsheets or dynamically

generated
>> >> .pdf
>> >> >files. I call the create report methods async to give the user the
>> >> >opportunity to cancel a long running report. However, any create

>> report
>> >> >method that opens a stream reader (in order to import some XML for a
>> >> >spreadsheet) or writer (in order to generate the XML spreadsheet

file)
>> >> cannot
>> >> >be run async. They run fine synchronously, but for some reason,

>> opening
>> >> an
>> >> >IO.Stream causes a "there was an error during async processing"

error.
>> >> The
>> >> >interesting thing is, this error is given in a message box, not a

>> typical
>> >> >ASP.NET error page. Any thoughts?
>> >> >
>> >>
>> >>
>> >

>>
>>

>



Turbo 12-21-2004 04:11 PM

RE: Asynchronous Web Service Method Failure
 
You're probably right, and it's something I should have thought of myself.
Here are the steps involved:

When a session begins, I create a folder for that session in a virtual
directory that is set up for that and nothing else. Let's call it the
application file cache. It is not in the c:\inetpub\wwwroot folder. The
resulting folder looks like \application file caches\sessionid\ so each
session has a temporary disk space where the reports are created. This
folder is removed when the session ends.

When the user requests a report, sometimes a stream is opened to load some
xml that I would need for the report. To open a stream, I use
server.mappath(\application root\subfolder\textfilename).

When the report is completed, a file is created in his/her specific session
folder using server.mappath(\application file caches\sessionid\filename) and
the URL of the file is returned by the web service method. If I use a
streamwriter, the method fails. The error is generated when I try to make
the call to EndCreateReport(IAsyncResult) and this is where the message box
comes up. The real rub is that I don't know if the error occurs when opening
the streams, reading from them, or writing to them. The error is not caught
in the Try/Catch block.

Anyway, I'll look at the security thing.

"Dan Rogers" wrote:

> This could be a security issue. Because the request is originating thru
> the web service (asp.net), the permissions granted to the thread are indeed
> sandboxed. If you are calling the class dirctly, you are not encountering
> the sand box. Have you tried treating this as a permissions thing? For
> instance, if you only try to write to the services directory, and not to a
> root qualified path, do you have better luck? I should have thought of
> this possibility since it is such a common case.
>
> If you try to over-write an existing file in the local service directory,
> and you've explicitely granted permissions to the ASPNET_IIS web service
> account to that file, does it work any better? WS that write files are
> indeed problematic because they are so tightly sand boxed. If you think
> about it, the potential under high load to knock your server over when the
> disk is full is extremely likely. A common attack scenario involves web
> exposed calls that save files.
>
> Dan
> --------------------
> >Thread-Topic: Asynchronous Web Service Method Failure
> >thread-index: AcTkUwPdMeARkT8bTT+WHDnZWsK+gg==
> >X-WBNR-Posting-Host: 65.118.1.233
> >From: "=?Utf-8?B?VHVyYm8=?=" <Turbo@discussions.microsoft.com>
> >References: <4F6A0DC8-92A1-4BB9-9E07-43123A799944@microsoft.com>

> <00lXKSV4EHA.3388@cpmsftngxa10.phx.gbl>
> <E3D1275E-5CE8-4DCE-8145-0BAA1A0BE8EB@microsoft.com>
> <DUddYT64EHA.1964@cpmsftngxa10.phx.gbl>
> >Subject: RE: Asynchronous Web Service Method Failure
> >Date: Fri, 17 Dec 2004 08:11:07 -0800
> >Lines: 143
> >Message-ID: <79A48C7F-F977-4764-9037-78B1ECE7565B@microsoft.com>
> >MIME-Version: 1.0
> >Content-Type: text/plain;
> > charset="Utf-8"
> >Content-Transfer-Encoding: 7bit
> >X-Newsreader: Microsoft CDO for Windows 2000
> >Content-Class: urn:content-classes:message
> >Importance: normal
> >Priority: normal
> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
> >NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> >Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
> >Xref: cpmsftngxa10.phx.gbl

> microsoft.public.dotnet.framework.aspnet.webservic es:27277
> >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
> >
> >In clarification of my previous post, I have found that I cannot call web
> >service methods through a proxy if the method opens a stream reader or

> stream
> >writer. If I call the CreateReport method using the proxy, it will

> timeout.
> >If I call the BeginCreateReport method, it fails when attempting the use

> the
> >stream. The only way I can get the method to run successfully is to

> create
> >an instance of the web service directly, without using a proxy.
> >
> >"Dan Rogers" wrote:
> >
> >> I'm still confused about what you mean by async. How are you invoking

> them
> >> a) when it works, and b) when it doesn't work. Since you are returning
> >> values to the caller, I am pretty sure that these are not async server

> side
> >> operations, but you are referring to the non-blocking (beginMethodXX) on
> >> the caller side as "async".
> >>
> >> is this the case? If so, there is no difference in the way the call is
> >> dispatched and handled on the server side - so again, my confusion as to
> >> why the stream reader thinks the thread is async.
> >>
> >> Something in the description here (topology - e.g. what code are you

> trying
> >> to invoke on what side of a web service method call) is eluding me.
> >>
> >> Dan
> >> --------------------
> >> >Thread-Topic: Asynchronous Web Service Method Failure
> >> >thread-index: AcTi3k4zag4FdGNeSzOsg9ucQ1yLug==
> >> >X-WBNR-Posting-Host: 65.118.1.233
> >> >From: "=?Utf-8?B?VHVyYm8=?=" <Turbo@discussions.microsoft.com>
> >> >References: <4F6A0DC8-92A1-4BB9-9E07-43123A799944@microsoft.com>
> >> <00lXKSV4EHA.3388@cpmsftngxa10.phx.gbl>
> >> >Subject: RE: Asynchronous Web Service Method Failure
> >> >Date: Wed, 15 Dec 2004 11:43:09 -0800
> >> >Lines: 77
> >> >Message-ID: <E3D1275E-5CE8-4DCE-8145-0BAA1A0BE8EB@microsoft.com>
> >> >MIME-Version: 1.0
> >> >Content-Type: text/plain;
> >> > charset="Utf-8"
> >> >Content-Transfer-Encoding: 7bit
> >> >X-Newsreader: Microsoft CDO for Windows 2000
> >> >Content-Class: urn:content-classes:message
> >> >Importance: normal
> >> >Priority: normal
> >> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> >> >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
> >> >NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> >> >Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
> >> >Xref: cpmsftngxa10.phx.gbl
> >> microsoft.public.dotnet.framework.aspnet.webservic es:27228
> >> >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
> >> >
> >> >Here is the procedure. I call an asynchronous web service method for a
> >> >particular report. I don't pass any files, just parameters for the
> >> report,
> >> >such as start date and end date. The web service methods don't return

> any
> >> >files, just URL's to the files so I can execute a response.redirect

> when
> >> the
> >> >web service is done creating the report. Some of my reports are XML
> >> >spreadsheets, so to avoid have to create the XML from scratch, I use
> >> existing
> >> >files and then add the necessary data elements to them. Within the web
> >> >service method that is creating the report, I open a streamreader or

> use
> >> the
> >> >XMLDocument Load method in order to get the static XML loaded into the
> >> >XMLDocument. When I'm done, I use a streamwriter to create an
> >> XmlTextWriter
> >> >to save the document. These methods work fine when done synchronously,
> >> but
> >> >fail when done async. Only methods that use objects derived from
> >> >streamreaders and writers fail when run async. I hope I'm making

> myself
> >> >clear. The error message box that pops up only occurs during

> development.
> >>
> >> >It isn't a client issue.
> >> >
> >> >"Dan Rogers" wrote:
> >> >
> >> >> Some questions,
> >> >>
> >> >> When you say async - do you mean you have created a one-way SOAP

> method?
> >>
> >> >> (this is the right way to think about async for web services). When

> you
> >> >> have a one-way method, you don't get to write a response. In other
> >> words,
> >> >> async server side methods have a "void" signature always. If you try
> >> >> marking a non-void method with the one way soap attribute, that is an
> >> error.
> >> >>
> >> >> That aside, you should consider using SOAP with attachments if you

> are
> >> >> returning files (no longe async methods).
> >> >>
> >> >> I hope this helps
> >> >>
> >> >> Dan Rogers
> >> >> Microsoft Corporation
> >> >> --------------------
> >> >> >Thread-Topic: Asynchronous Web Service Method Failure
> >> >> >thread-index: AcTe/QkQd8iqbozvTCKTbAiYn3Wy0A==
> >> >> >X-WBNR-Posting-Host: 65.118.1.233
> >> >> >From: "=?Utf-8?B?VHVyYm8=?=" <Turbo@discussions.microsoft.com>
> >> >> >Subject: Asynchronous Web Service Method Failure
> >> >> >Date: Fri, 10 Dec 2004 13:13:03 -0800
> >> >> >Lines: 12
> >> >> >Message-ID: <4F6A0DC8-92A1-4BB9-9E07-43123A799944@microsoft.com>
> >> >> >MIME-Version: 1.0
> >> >> >Content-Type: text/plain;
> >> >> > charset="Utf-8"
> >> >> >Content-Transfer-Encoding: 7bit
> >> >> >X-Newsreader: Microsoft CDO for Windows 2000
> >> >> >Content-Class: urn:content-classes:message
> >> >> >Importance: normal
> >> >> >Priority: normal
> >> >> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> >> >> >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
> >> >> >NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> >> >> >Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
> >> >> >Xref: cpmsftngxa10.phx.gbl
> >> >> microsoft.public.dotnet.framework.aspnet.webservic es:27146
> >> >> >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
> >> >> >
> >> >> >Greetings to all
> >> >> >
> >> >> >I have a set of web services that create reports upon request.

> These
> >> >> >reports can take the form of XML Spreadsheets or dynamically

> generated
> >> >> .pdf
> >> >> >files. I call the create report methods async to give the user the
> >> >> >opportunity to cancel a long running report. However, any create
> >> report
> >> >> >method that opens a stream reader (in order to import some XML for a
> >> >> >spreadsheet) or writer (in order to generate the XML spreadsheet

> file)
> >> >> cannot
> >> >> >be run async. They run fine synchronously, but for some reason,
> >> opening
> >> >> an
> >> >> >IO.Stream causes a "there was an error during async processing"

> error.
> >> >> The
> >> >> >interesting thing is, this error is given in a message box, not a
> >> typical
> >> >> >ASP.NET error page. Any thoughts?
> >> >> >
> >> >>
> >> >>
> >> >
> >>
> >>

> >

>
>



All times are GMT. The time now is 09:13 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.