[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

accessing web service

Posted on 2009-12-22
11
Medium Priority
?
432 Views
Last Modified: 2013-11-16
i have a web server with 2 web services, one is working well
the other one has all the same properties in iis and in the filesystem,
but still, when i try to access it, i get "not authorized (401.1)" reply, and when accessed from a browser, i am requested for a username and password and only then the page (with all functions and soap samples) loads

please, does anyone know where this could be wrong?

the actual files are located on parallel directories (both on the harddrive and in iis) - i mean that are on the same place in  the directory tree

iis6, windows server2003sp2
 
0
Comment
Question by:ErezMor
  • 5
  • 5
11 Comments
 
LVL 11

Expert Comment

by:ICaldwell
ID: 26105153
Check the permissions on the folder... it may be that the IIS user does not have access to the files....
0
 
LVL 8

Expert Comment

by:deepu chandran
ID: 26105174
hi,
I guess windows authorization is set for that website, in this case you have pass username and password from the client.
You have to use NetworkCredentials to the server, refer the below link,
http://msdn.microsoft.com/en-us/library/system.net.networkcredential.aspx

Regards
Deepu
0
 
LVL 12

Author Comment

by:ErezMor
ID: 26105400
but why doesnt it break for the first web service? they are the same (true! copied from C# to vb, but otherwise same)
0
 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

 
LVL 11

Expert Comment

by:ICaldwell
ID: 26105636
how were the folders created, over network or on each machine?  were they created over the network or from the webservices server? were the projects built on a separate machine or on each web services server?
0
 
LVL 12

Author Comment

by:ErezMor
ID: 26106999
the projects were built on my pc and loaded into the server by copy and paste (using remote desktop)

there is 1 web server
on the hard drive:
under inetpub->wwwroot there are 2 subfolders: \service1 and \service2
under each there are the asmx files and the vb files comprising the 2 services

inside iis:
the above 2 are virtual directories (as applications) under 1 common (root) web site

if i call http://mywebserver:port/service1/service1.asmx, i get a page listing all the web methods and their soap calling syntax , and if i use that soap, it executes the methods with no problems)
but if i call http://mywebserver:port/service2/service2.asmx, i am asked to enter usename and password to get to that page, and if i use soap, it fails saying i am not authorized)
 
0
 
LVL 11

Expert Comment

by:ICaldwell
ID: 26107111
Have you checked the security between the two folders yet by right clicking on both, clicking on properties, and clicking the security tab...  Sounds like either the ASP.Net machine account does not have access or the IUSR_Machine....
0
 
LVL 12

Author Comment

by:ErezMor
ID: 26107180
i'll check that (about all i did in the past 8 hours was trying to find differences in the properties pages of both), but i'll try again,
0
 
LVL 11

Expert Comment

by:ICaldwell
ID: 26107353
you may also want to push down the security across all files and folders under the main folder... you can do this by right clicking, going to properties, click on security.... click on advanced... and click "Replace permission entries on all child objects with entries shown here that apply to child objects".

If you have different security on the files this will correct that..... Hope it fixes the issue..
0
 
LVL 12

Author Comment

by:ErezMor
ID: 26108809
did that. (your last offer - to propagate settings from the parent folder to both of the child sub-folders service1 and service2 - now they are identical for sure, right?

still, service1 loads and service2 returns asking for username and password

i'm going crazy, any more suggestions?
0
 
LVL 11

Accepted Solution

by:
ICaldwell earned 2000 total points
ID: 26109050
only other thing would be to go into IIS, right click on the project, click properties, click on document security... click Edit on Anonymous access and authentication control... make sure it has Anonymous access and "Integrated Windows Authentication" is checked...

if none of those works I would try removing the project from the IIS server and attempt to re-deploy....
0
 
LVL 12

Author Closing Comment

by:ErezMor
ID: 31669003
i eventually put the service in a sub-folder of the working one (any other solution failed)
i hate when things a solved that way - but as it now works - i cant complain...
thanks for the followup
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question