473,569 Members | 2,790 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 3145
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
3293
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...
2
1204
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...
2
1852
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...
10
1512
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
14299
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...
4
7905
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...
6
6979
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
5564
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...
0
1867
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...
0
7921
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. ...
0
8118
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7666
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6278
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...
1
5504
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...
0
5217
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...
1
2107
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
936
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.