469,927 Members | 2,022 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,927 developers. It's quick & easy.

Got 403 error after the first call to a web service

The web service is called by a program running on pocket pc. When to
call the web service, the first call is still ok, but for the second
or later calls, it will throw "403 Forbidden" WebException. When to
test it using the web interface on pocket IE, everything is fine.

Before there was no such problem, it only happened within a week or
so. I suspect it's caused by the server's firewall settings, but how
come the first call is ok? This is quite wired.

Is there anyone who can help or met this problem before?

Aug 13 '07 #1
6 3101
"alho" <xi**********@gmail.comwrote in message
news:11**********************@i13g2000prf.googlegr oups.com...
The web service is called by a program running on pocket pc. When to
call the web service, the first call is still ok, but for the second
or later calls, it will throw "403 Forbidden" WebException. When to
test it using the web interface on pocket IE, everything is fine.

Before there was no such problem, it only happened within a week or
so. I suspect it's caused by the server's firewall settings, but how
come the first call is ok? This is quite wired.

Is there anyone who can help or met this problem before?
Is the second call exactly like the first call?
--
John Saunders [MVP]

Aug 13 '07 #2
On Aug 13, 10:28 pm, "John Saunders [MVP]" <john.saunders at
trizetto.comwrote:
"alho" <xiaolong....@gmail.comwrote in message

news:11**********************@i13g2000prf.googlegr oups.com...
The web service is called by a program running on pocket pc. When to
call the web service, the first call is still ok, but for the second
or later calls, it will throw "403 Forbidden" WebException. When to
test it using the web interface on pocket IE, everything is fine.
Before there was no such problem, it only happened within a week or
so. I suspect it's caused by the server's firewall settings, but how
come the first call is ok? This is quite wired.
Is there anyone who can help or met this problem before?

Is the second call exactly like the first call?
--
John Saunders [MVP]
Yes, first I got this error at the second call, later when I test it,
I repeated the first call twice in a try catch, and the second line
got this exception too. So the second call always goes wrong no matter
the same or not.

Aug 14 '07 #3
"alho" <xi**********@gmail.comwrote in message
news:11*********************@z24g2000prh.googlegro ups.com...
On Aug 13, 10:28 pm, "John Saunders [MVP]" <john.saunders at
trizetto.comwrote:
>"alho" <xiaolong....@gmail.comwrote in message

news:11**********************@i13g2000prf.googleg roups.com...
The web service is called by a program running on pocket pc. When to
call the web service, the first call is still ok, but for the second
or later calls, it will throw "403 Forbidden" WebException. When to
test it using the web interface on pocket IE, everything is fine.
Before there was no such problem, it only happened within a week or
so. I suspect it's caused by the server's firewall settings, but how
come the first call is ok? This is quite wired.
Is there anyone who can help or met this problem before?

Is the second call exactly like the first call?
--
John Saunders [MVP]

Yes, first I got this error at the second call, later when I test it,
I repeated the first call twice in a try catch, and the second line
got this exception too. So the second call always goes wrong no matter
the same or not.
I would try to determine whether the service itself is getting called, both
the first and second times. In particular, I'd try to find out whether an
exception is being thrown by the service.

The only difference I know about between the first and second calls is that
on the second call, the service is already running. This should not increase
the likelihood of a 403 error. So, I have several questions:

* Is this a normal, ASP.NET "ASMX" web service?
* Is there anything unusual about the service itself, or about the client?
* Does the problem happen when you call the service from two separate
clients, one time apiece? This is to distinguish between a single client
having a problem calling twice, and the service having a problem being
called twice.
* Can you reproduce the problem with a simple "Hello, World" service? This
is to determine whether the issue has to do with the "contents" of the
server, or only with the "structure".
* Can you reproduce the problem with a trivial client? This is to determine
whether the issue is with the client or with the service.

Sorry for all the questions, but this problem doesn't make sense based on
the information given, so I'm looking for more information.
--
John Saunders [MVP]

Aug 14 '07 #4
On Aug 14, 7:37 pm, "John Saunders [MVP]" <john.saunders at
trizetto.comwrote:
"alho" <xiaolong....@gmail.comwrote in message

news:11*********************@z24g2000prh.googlegro ups.com...


On Aug 13, 10:28 pm, "John Saunders [MVP]" <john.saunders at
trizetto.comwrote:
"alho" <xiaolong....@gmail.comwrote in message
>news:11**********************@i13g2000prf.googleg roups.com...
The web service is called by a program running on pocket pc. When to
call the web service, the first call is still ok, but for the second
or later calls, it will throw "403 Forbidden" WebException. When to
test it using the web interface on pocket IE, everything is fine.
Before there was no such problem, it only happened within a week or
so. I suspect it's caused by the server's firewall settings, but how
come the first call is ok? This is quite wired.
Is there anyone who can help or met this problem before?
Is the second call exactly like the first call?
--
John Saunders [MVP]
Yes, first I got this error at the second call, later when I test it,
I repeated the first call twice in a try catch, and the second line
got this exception too. So the second call always goes wrong no matter
the same or not.

I would try to determine whether the service itself is getting called, both
the first and second times. In particular, I'd try to find out whether an
exception is being thrown by the service.

The only difference I know about between the first and second calls is that
on the second call, the service is already running. This should not increase
the likelihood of a 403 error. So, I have several questions:

* Is this a normal, ASP.NET "ASMX" web service?
* Is there anything unusual about the service itself, or about the client?
* Does the problem happen when you call the service from two separate
clients, one time apiece? This is to distinguish between a single client
having a problem calling twice, and the service having a problem being
called twice.
* Can you reproduce the problem with a simple "Hello, World" service? This
is to determine whether the issue has to do with the "contents" of the
server, or only with the "structure".
* Can you reproduce the problem with a trivial client? This is to determine
whether the issue is with the client or with the service.

Sorry for all the questions, but this problem doesn't make sense based on
the information given, so I'm looking for more information.
--
John Saunders [MVP]- Hide quoted text -

- Show quoted text -
Thank you for the attention and the questions.

* It's a normal ASP.NET "ASMX" web service.
* The service itself is fine. Actually before everything was ok. The
client is a PocketPC program.
* It happens in a single client, when calling the service twice.
* It has nothing to do with the content I think, I used complex and
simple web methods to test, got the same result.
* I've done testing using a window application on a PC, it works well
without the problem. But when I did the same testing using a PocketPC
application, the error will occur. The test program is just a textbox
to display result and a button to call a web method. On the PocketPC,
when I click on the button for more than one time, it will throw the
(403) Forbidden exception, but on a PC there is no exception.

This happens on both device and emulator.

Aug 15 '07 #5
"alho" <xi**********@gmail.comwrote in message
news:11**********************@j4g2000prf.googlegro ups.com...
>
Thank you for the attention and the questions.

* It's a normal ASP.NET "ASMX" web service.
* The service itself is fine. Actually before everything was ok. The
client is a PocketPC program.
* It happens in a single client, when calling the service twice.
* It has nothing to do with the content I think, I used complex and
simple web methods to test, got the same result.
* I've done testing using a window application on a PC, it works well
without the problem. But when I did the same testing using a PocketPC
application, the error will occur. The test program is just a textbox
to display result and a button to call a web method. On the PocketPC,
when I click on the button for more than one time, it will throw the
(403) Forbidden exception, but on a PC there is no exception.

This happens on both device and emulator.
Sorry, but I still can't make sense out of this. I hope that you've been
able to solve the problem on your own.
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer

Sep 7 '07 #6
This sounds very similar to a problem I was having. In my case, the
service ALWAYS worked fine on the first call, but never worked the
second time. I too was receiving 403 errors the second time I
submitted the request.

I don't know what version of .Net your have on your desktop, but I
found that I never had problems when the app was run against .Net 1.1,
but I always got the errors when running on .Net 2.0.

With the help of MS tech support, we finally got our issue resolved.
Here is a link to the thread:

http://groups.google.com/group/micro...80c57d255f71/#

Sep 14 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Peter Frost | last post: by
reply views Thread by Nawanat | last post: by
reply views Thread by Francois Guerin | last post: by
7 posts views Thread by Jorgen Haukland, Norway | last post: by
10 posts views Thread by Jim Underwood | last post: by
4 posts views Thread by Jason Richmeier | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.