473,394 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

exception handling when asynchronously calling a web service?

I have two new questions.
1. my exception handling codes works well when I synchronously call a web
service,but How can I use it in asynchronously calling? I tried in the same
way,but when error happened,my main programe is always waiting the response
from the service,but nothing is returned,until I terminate it by myself.Any
help on "how to" ,thanks.
2.I found the web.config file in asp.net somewhat confusing.I work under the
version 2 of dotnet framework. and I noted the machine.config has been
seperated into two files in my system directory. a machine.config file and a
new global web.config file,and the latter configs some web application
features.I want to add authentication and authorization features in my web
service.And I found the global web.config file has a <authorization><allow
users="*"></authorization> section.
I've read the .net framework SDK, and know this global configuration can
affect my own app-level configuration(also a web.config file).for example,I
config in my own web.config file like this:
<authentication mode= "Windows">
</authentication>
<authorization>
<deny users="administrator">
</authorization>
But it doesn't work when I use administrator to request the service. for the
global configuration allows "*",that is everyone can use this web service.So
I get rid of the global allow section use "<!-- -->",and keep my own
configuration.I think this is correct,but the result is that all request to
the service is now turned to be "unauthorized".
Now the trouble is When I keep the global configuration, my service is work
for everyone,but When I forbid the it, my service is also forbid everyone. I
cannot understand the usage of global<authorization> section. need your
help, thank you.
Nov 23 '05 #1
0 1307

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: | last post by:
How can I handle an error while I calling web service asynchronously?
7
by: Dan Bass | last post by:
In a somewhat complex application, I've developed plug-in architecture and am having a problem as to when to catch general exceptions for logging purposes. In each plug-in class library, for...
2
by: Natalia DeBow | last post by:
Hi there, I am working on an client-server app, where the client asynchronously issues a request for the server to perform some action and the server is supposed to notify the client when the...
44
by: craig | last post by:
I am wondering if there are some best practices for determining a strategy for using try/catch blocks within an application. My current thoughts are: 1. The code the initiates any high-level...
6
by: Nick Reeves | last post by:
While developing the below code I noticed that exceptions were not working as expected. An exception is thrown inside an XML import DLL and not being caught inside the Main() code fragment,...
2
by: Adrian Burka | last post by:
HELP! I have written a web service, and a program in C# using Microsoft Visual C#.NET to interact with the web service. Exception handling isn't working in my application, though. One function...
3
by: Rahul Anand | last post by:
As per our requirements we have a web service which internally connects (Simple HTTP Post Request) to a remote server to initiate some work. We are calling the web service method asynchronously...
2
by: Richard Collette | last post by:
Hi, I have a service, that runs perfectly when executed outside of the web service environment. When called as a web service I get the exception listed below sporadically. A call to the web...
1
by: Ethan Strauss | last post by:
Hi, I have a C#.net Web application which calls a web service (http://eutils.ncbi.nlm.nih.gov/entrez/eutils/soap/eutils.wsdl). It has run just fine for months. Recently I started getting...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.