The request failed with HTTP status 403: Forbidden.
- Hi,
I have developed an asp.net application that update sharepoint users using Usergroup.asmx. The website is working from the remote computers( my work computer,server1,server2 ). how ever when i host(run) this website on the same server where sharepoint website is running, i am getting 403 error. I can't even browse the usergroup.asmx page locally to see the description.
here is the error:
Server Error in '/TestSP' Application.
The request failed with HTTP status 403: Forbidden.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.WebException: The request failed with HTTP status 403: Forbidden.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[WebException: The request failed with HTTP status 403: Forbidden.] System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +412862 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +300 spUserGroup.UserGroup.GetUserInfo(String userLoginName) +77 _Default.Button1_Click(Object sender, EventArgs e) +589 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +115 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +140 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981
More Info:
sharepoint server info:
WSS version - 3
OS - windows 2003 sp2
dotnet version is - Asp.net 2
sp site name - spsite
testsite name is - testsp
spsite is running as seperate website on the server, The site is https site(ssl-443).
Authentication:windows + Basic
pool account:spservice
executable + script enabled
testsp site is running under same pool(tried diffrent pool)
Authentication: anonymous(tried windows +basic)
executable + script enabled
can you pls tell me what i am doing wrong. we want to host the spsite, othersite on the same server. no proxy server is running on this server. I also created a test webservice on this server .I am able to call the test webservice (locally) from my website without any problem. I created a windows application to consume usergroup.asmx page. this windows application also giving 403 error locally. i have admin previlege.
questions:
1)how to solve the problem?
2)how to trace the error
thanks in advance
All Replies
- errors seems to be involved with webservices and Button1_Click is triggered, they are trying to get userInfo. Check user id that authenticates against webservice have proper permissions.
Never stop learning. - Thanks for the info.anyhow i double check with network admin. I used different network credentials no luck. The following things i have tried:
1)using different network credentials
2)using different pool
3)logging in as different users
4)added networkservices/spservice/netwok credential accounts to local admin group(including my account)
5)also gave fullcontrol on the virtual directories/_vti_bin/asp.net temporary folder for the above accounts for testing purpose.
6)restarted the iis/server few times.
line from config:<
add key="spUserGroup.UserGroup" value="https://one.Two.sitename.com/_vti_bin/UserGroup.asmx"/>
lines fromcode:
1)spUserGroup.
UserGroup usrGroup = new spUserGroup.UserGroup() --no error
2)usrGroup.Credentials = System.Net.
CredentialCache.DefaultCredentials;--no error
//tried with-- usrGroup.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials
//tried with -- usrGroup.Credentials =
new System.Net.NetworkCredential(ConfigurationManager.AppSettings["UserName"], ConfigurationManager.AppSettings["Password"], ConfigurationManager.AppSettings["DomainName"]);
3) System.Xml.XmlNodeList groupCollection;
groupCollection = usrGroup.GetGroupCollectionFromUser(sGroupUserName);--403 errorI get 403 error only when i run the site from sharepoint server.
- I suspect kerberos. What name are you accessing the server with? Have you used setspn?
i have not used setspn command. I will ask the network admin.
What name are you accessing the server with?when i logon to the server remotely i use the server name.
I access the website using http://mysites.sitename.com/testsite/- setspn is not used
- Have a read of the following discussion:
http://stackoverflow.com/questions/514678/how-should-i-use-this-setspn-command-when-installing-sharepoint
Then run the following n the server:
SetSPN -a http/mysites.sitename.com domainname\serviceaccountname - I will ask the network admin


