473,890 Members | 1,357 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3167
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 misunderstandin g, 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 misunderstandin g, 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 misunderstandin g, 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.c om" you really get "www.site.c om/web site/login.aspx".

When you attempt to execute
//www.whateveriti s.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.publi c.inetserver.ii s

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.publi c.inetserver.ii s

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

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

Similar topics

2
3310
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 webresponse object. What the Windows Service does is when the timer in the windows service elapses, the request to the website is made and a response is retrieve in a simple myhttpWebrequest.GetResponse(). I don't even do anything with the...
2
1215
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 already has a web service (built using sdk and notepad) at http://services/services/services.asmx. Now I am trying to create a new web service "services2.asmx" in vs.net. I click on File-->New-->Project. Then select Asp.net Web Service under VB...
2
1863
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 2) Build the website 3) Verify that it works by clicking "View in Browser" 4) Click Copy Website to copy to my webserver 5) Navigate to the website where I just deployed the service
10
1544
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 system. Since that day, everytime I tried to open the VS2003 and run my app, the system showed me a message like:
8
14322
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 other computers (and applications) in our local company network. When the service runs it accesses an Oracle database and pulls some data out. It works fine when running in VS2005 server. To allow the Web Service to
4
7928
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 web service. After searching the Microsoft Knowledge Base, article ID 811318 describes my exact problem. However, when I try to implement the stated solution, I still receive the same error. Basically if I add the following line of code, it...
6
6993
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 return them to user. Is it possible to call this win service from within the website? If yes how could we do this? thanks Lalit
5
5595
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 for debugging. I have also add the Web reference to the web service with the "Add Web service in the solution" choice, that is the Web app starts the Web service with the Studio development web server. So I thought I could set breakpoints on...
0
1892
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 scenario: A user clicks a button on a ASP.NET website to get some forecast. The button invokes a web service method i.e. GetForecast(). Now the web method calls a task method on the Windows Service. Finally the windows service returns a result...
0
9979
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9825
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11234
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9638
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8018
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7171
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5854
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6052
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4276
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.