Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirecting a web service path

Status
Not open for further replies.

RichS

Programmer
Apr 24, 2000
380
US
I have read the many articles about redirecting a path in a web app to a different url for a web server. Most talk about how to go from development to production. Which is exactly what I am doing. They say that it is simple:

1) set your web url behavior to dynamic
2) copy your app and web service projects out to the production server and edit the url appSetting in web.config

easy enough but it isn't working.

I am getting the following error:
"The request failed with HTTP status 401: Unauthorized"

The error message details the reference to the routine called as being at "c:\inetpub\ but our web directories are on the D: drive of the server.

Does anyone have any ideas about how to approach a solution to this?

Thanks
 
What happens when you point your web browser at the URL?

Can you put a small .htm file in the same directory, and browse to it?

I'm guessing this is a permissions problem.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Many thanks for the reply. This problem is holding everything up.

Yes, it seems like a permission problem. when I point to the web service from my local box I get the service description which looks good except that the html tags that I use in my description of each of the web service's methods are visible (< br >, < b >, etc.) Maybe this is a clue to something.

Also, I can bring up an htm file ok.

The web server is Win 2003, using IIS 6, and my local development machine is using IIS 5.1. Is this a possible cause? The properties of the web service directories show that the NETWORK and NETWORK SERVICE accounts only have "list folder contents" permission. What should be the permissions here?

 
Just to close this thread out:

The problem was resolved by nuking the virtual directories on the web server and setting them up from scratch again. A key part of the solution was that after the reference to the web service in the consuming app, the default credentials had to be applied. I believe this would wind up being the web server's credentials (?) since in my case both the app and web service are on the same server. Passing the credentials would not work prior to recreating the virtual directories so there must have been a problem with the way one or both of them were set up.

The code in the consuming app:
Code:
myApp.myWS ws = new myApp.myWS();
ws.Credentials = CredentialCache.DefaultCredentials;
txtMyTextBox.Text = ws.GetTodaysDate();
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top