473,388 Members | 1,340 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,388 software developers and data experts.

C# web service/website ?

I have a strange problem with a website and a web service.

They're both on the same server, running Windows server 2003. The website is
set up as the default website for the server.

I've got the same code running in several different environments, it just so
happens this is the production server we're having problems with. Not ideal,
typically.

What happens is this.

When code tries to access the web service, it gets a "302 redirect" response
from the IIS.

If you go to a browser on a machine that can see the production server and
just type in the address of the web service, rather than getting the web
service interface page you get redirected to the default website and thrown
to the error page. Which doesn't come up, because you're not logged in :D

As best I can tell from looking thru the database activity the web service
is firing up, and not obviously throwing an error, altho it may be subtly
throwing an error. In any event, it's not logging anything anywhere, which is
should do if it catches an error.

This thing is secured out the wazzoo - SSL, only specific IP addresses
allowed, the whole bit.

Any ideas?

I'm going to crosspost this in one of the other news groups just to make
sure I've got all my bases covered.
--
C. Woody Butler
Nov 17 '05 #1
16 3134
Hi Woody,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that on a certain server, your webservice is
redirected to another page. If there is any misunderstanding, please feel
free to let me know.

Since this issue only happens on your production server, I assume this
might be a configuration error on the IIS. Please open the IIS
configuration on the machine, right click on the webservice and click the
Directory tab. on the top, "When connecting to this resource, the content
should com from" option has to be set to "The designated directory". It
might have been set to "A redirection to a URL" and the redirection occurs.

If that is not the case, could you provide me with more information about
your web service? Is it a webservice project or some asmx pages in an
ASP.NET project? If so, a forms authentication ASP.NET app might also cause
this redirection.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 17 '05 #2
That's exactly it. Nice succinct summary :).

I'll check the configuration and let you know. I'm pretty sure it's set to
get content from the directory the asmx pages are in, and not to redirect
anywhere else.

It's just a web service project, nothing but ASMX pages and associated
"stuff" in that directory, there's nothing in the web.config about
redirecting to a login page, etc.

We did discover last night that apparently the web application that's
catching the error is set up as the "home site" for the entire server, which
is different than the other servers in the "dev/test/train/prod" set of
servers, we're investigating that to see if that's the problem.

Thanks -

--woody

"Kevin Yu [MSFT]" wrote:
Hi Woody,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that on a certain server, your webservice is
redirected to another page. If there is any misunderstanding, please feel
free to let me know.

Since this issue only happens on your production server, I assume this
might be a configuration error on the IIS. Please open the IIS
configuration on the machine, right click on the webservice and click the
Directory tab. on the top, "When connecting to this resource, the content
should com from" option has to be set to "The designated directory". It
might have been set to "A redirection to a URL" and the redirection occurs.

If that is not the case, could you provide me with more information about
your web service? Is it a webservice project or some asmx pages in an
ASP.NET project? If so, a forms authentication ASP.NET app might also cause
this redirection.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 17 '05 #3
Just to confirm - I checked the properties and the webservices folder is not
set to redirect to the folder that's catching the errors.

The base website IS set to redirect to the folder that's catching the errors
- and it looks sorta like the web.config file from that folder is being
applied to the web services folder. but only partially?

It's all very strange and hard to explain.

I had my admin change the web.config in the web services folder to set the
customErrors mode to Off. We also changed the SSL settings so that SSL is not
required for the web service.

Then we typed in the address to the ASMX file.

We got a full error message complaining that the web.config file fom the
OTHER site couldn't be applied in this directory, as not all the required
files are available.

So atleast some parts of the web services web.config file are applicable,
but it's still trying to use an HTTP handler that's only available for the
web site's web.config file.

Gah - I'm gonna take my marbles and go home.

--woody

"Kevin Yu [MSFT]" wrote:
Hi Woody,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that on a certain server, your webservice is
redirected to another page. If there is any misunderstanding, please feel
free to let me know.

Since this issue only happens on your production server, I assume this
might be a configuration error on the IIS. Please open the IIS
configuration on the machine, right click on the webservice and click the
Directory tab. on the top, "When connecting to this resource, the content
should com from" option has to be set to "The designated directory". It
might have been set to "A redirection to a URL" and the redirection occurs.

If that is not the case, could you provide me with more information about
your web service? Is it a webservice project or some asmx pages in an
ASP.NET project? If so, a forms authentication ASP.NET app might also cause
this redirection.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 17 '05 #4
Hi Woody,

Good to know that you have got the detailed error message. It seems that
the web.config file is corrupt in the WebService directory. We can try to
create a new web.config file and copy it to the directory to see if it
works.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 17 '05 #5
Hm. That's worth a shot but I don't think that's it.

It's certainly a simple and easy thing to try that I haven't tried yet, and
I will cuz it's worth trying :).

Just for grins -

here's how things are arranged:

root web/web site (requires SSL)
root web/web service

The "root web" is set to redirect to "web site", so if you type in
"www.site.com" you really get "www.site.com/web site/login.aspx".

When you attempt to execute
//www.whateveritis.com/webservice/webservice.asmx rather than getting the web
service interface documentation you actually get an error that indicates that
IIS/ASP.NET thinks things are organized:

web site/web service

because it's combining web site/web config with web service/web.config.

The error actually refers to the web site web.config as being in error.

ALL of our various development and test servers have exactly the same
configuration and the only one that acts like this is the production one. I
know(!) this is something stupid and obvious, but I'm so close to it at this
point I can't SEE it. Or I'm not enough of an IIS/Win2k3 admin to recognize
it.

Anyway - For whatever all this is worth - thanks for all your help!

--woody

"Kevin Yu [MSFT]" wrote:
Hi Woody,

Good to know that you have got the detailed error message. It seems that
the web.config file is corrupt in the WebService directory. We can try to
create a new web.config file and copy it to the directory to see if it
works.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 17 '05 #6
Hi Woody,

I'm a little confused. the web.config file should only apply to a single
application. But how did IIS mix them together? :-S

As you can see, this is more likely an IIS configuration issue. So besides
posting here, you can also post in the following newsgroup. I think there
will be more professionals who can help you on it. HTH.

microsoft.public.inetserver.iis

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 17 '05 #7
well, now you know why WE'RE confused!

I'll check the other NG.

-w

"Kevin Yu [MSFT]" wrote:
Hi Woody,

I'm a little confused. the web.config file should only apply to a single
application. But how did IIS mix them together? :-S

As you can see, this is more likely an IIS configuration issue. So besides
posting here, you can also post in the following newsgroup. I think there
will be more professionals who can help you on it. HTH.

microsoft.public.inetserver.iis

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 17 '05 #8
Hi,

could you tell me please if both webs helds by the same Application
Pool? I had once a similar problem, and after i changed the application
pool, created for the web one and another one for the webservice, it was
working perfect.

By the way, check your policies.

in my point of view it seems really to be a conifiguration problem and
nothing else.

kind regards,
Roni

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #9
I'll haveta check the App Pool settings - I didn't configure this originally
so I don't know.

I agree it's a probably either config. problem (as in misconfigured or a
broken configuration), I just don't know what it is and I can't find any
differences between this server and the other similarly configured servers
that ARE working. Especially since this one did work and then stopped.

Lovely fun! :)

"Roni" wrote:
Hi,

could you tell me please if both webs helds by the same Application
Pool? I had once a similar problem, and after i changed the application
pool, created for the web one and another one for the webservice, it was
working perfect.

By the way, check your policies.

in my point of view it seems really to be a conifiguration problem and
nothing else.

kind regards,
Roni

*** Sent via Developersdex http://www.developersdex.com ***

Nov 17 '05 #10


hi

change the extension from web.config to web.xml and then try to open it
in internet explorer.

does it appears well?

best regards

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #11
It's fine.

-w

"Roni Schuetz" wrote:


hi

change the extension from web.config to web.xml and then try to open it
in internet explorer.

does it appears well?

best regards

*** Sent via Developersdex http://www.developersdex.com ***

Nov 17 '05 #12

:-(
now i'm out of idea . . . .

have you tried to get answers in IIS newsgroups? Maybe people there have
better idea's.

Good luck
roni

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #13
Yup - so far it's just a request for info - I'm not at work today but I
emailed my cohorts so hopefully I'll have an answer for them.

-w

"Roni Schuetz" wrote:

:-(
now i'm out of idea . . . .

have you tried to get answers in IIS newsgroups? Maybe people there have
better idea's.

Good luck
roni

*** Sent via Developersdex http://www.developersdex.com ***

Nov 17 '05 #14
hi,

wish you good luck with it and keep us up-to-date with it. Im intersted
in to know whats the probleme.

best regards,
roni

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #15
I got an IM from work that they'd fixed it.

Apparently the redirect decided to start messing things up.

I should point out that this has been set up for atleast 6 months, probably
more.

Why now? who knows, probably something changed deep in the network and it
just twitched enough to mess this up.

I love Windows and the Internet :).

-w

"Roni Schuetz" wrote:
hi,

wish you good luck with it and keep us up-to-date with it. Im intersted
in to know whats the probleme.

best regards,
roni

*** Sent via Developersdex http://www.developersdex.com ***

Nov 17 '05 #16
Hi Woody,

Nice to hear that you have had the problem resolved.

Thanks for sharing your experience with all the people here. If you have
any questions, please feel free to post them in the community.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 17 '05 #17

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

Similar topics

2
by: msnews.microsoft.com | last post by:
Hello everyone I was wondering if anyone has come across my problem? I programmed a Windows Service that uses httpWebRequest and httpWebResponse in VB.NET. Everything works fine until I use the...
2
by: | last post by:
Hi all, I have vs.net 2003 locally installed on my XP PRO machine. I have a web server on the LAN which has a website configured at http://services. This is accessible via my web browser and...
2
by: timsohn | last post by:
I am trying to deploy the most basic web service (Hello World) example to my website, but am having significant trouble doing so. Here is what I am doing: 1) Create a New Web Service in VS 2005...
10
by: JLuis Estrada | last post by:
Hi there Its my 1st post in this group and I hope we could have a great time. well, this is my problem I was debbuging my app (a website) and the system get stuck and I had to reboot the...
8
by: =?Utf-8?B?RGF2aWQrKw==?= | last post by:
Hi, I have been developing Web Services in VS2005. Usually I use the built in server in VS2005 to test and develop the Web Service. However I now want to make this Web Service available to...
4
by: =?Utf-8?B?VGFrdW1p?= | last post by:
I have a ASP.NET web page that calls a web service on a server with IIS installed on it. When it calls the web service, it gives a HTTP status 401 error stating that it is unauthorized to call the...
6
by: Lalit | last post by:
I want to create an application possibly windows service that will generate PDF files and place them into a specific folder. I have a website that will use this service to generate PDF files and...
5
by: Oriane | last post by:
Hi, I have a .Net Visual Studio solution with one asp.net Web application, which uses a Asp.Net Web service. Both are compiled in debug mode, and both are using the Studio development web server...
0
by: cosmo | last post by:
Hello, I would like to develop a: - Windows Service for doing specific Tasks - Web Service as a communication gateway between the Windows Service and a ASP.NET Website - ASP.NET Website The...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.