London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
The strack trace indicates there is still a problem with 'Permission for functions > Allow the user to act as a web service user'. I would say either the user has not been granted access or the credentials are not being sent correctly with the web service call.
Looking at the code in EPiServer.WebServices.DataFactoryService.ValidateWebServiceAccess(), the exception message should be appended with the current users name. In your message above, have you removed the users name from the message?
The user does not have the 'Permission.WebServiceAccess' access right to access web services on the remote site, for user [users name should be here]
Thanks for your reply!
As for your question, "In your message above, have you removed the users name from the message?", the answer is no.
So your statement 'the credentials are not being sent correctly with the web service call' seems to be correct.
In an Episerver-project a call is made from a website on one server to an ASMX-webservice at another server. The user calling has all right set in IIS 7 to write, create and retrieve files from folders.
The 401-error I had was solved ([Link][1]) and now I get another error.
The following error-message appears when the webservice-call is made:
Referer [url removed]
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> EPiServer.Core.EPiServerException: The user does not have the 'Permission.WebServiceAccess' access right to access web services on the remote site, for user
at EPiServer.WebServices.DataFactoryService.ValidateWebServiceAccess()
at EPiServer.WebServices.DataFactoryService.GetDefaultPageData(PageReference pageLink, Int32 pageTypeID)
--- End of inner exception stack trace ---
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.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> EPiServer.Core.EPiServerException: The user does not have the 'Permission.WebServiceAccess' access right to access web services on the remote site, for user
at EPiServer.WebServices.DataFactoryService.ValidateWebServiceAccess()
at EPiServer.WebServices.DataFactoryService.GetDefaultPageData(PageReference pageLink, Int32 pageTypeID)
--- End of inner exception stack trace ---
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:
[SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> EPiServer.Core.EPiServerException: The user does not have the 'Permission.WebServiceAccess' access right to access web services on the remote site, for user
at EPiServer.WebServices.DataFactoryService.ValidateWebServiceAccess()
at EPiServer.WebServices.DataFactoryService.GetDefaultPageData(PageReference pageLink, Int32 pageTypeID)
--- End of inner exception stack trace ---]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +431766
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204
RemotePublishForLedigeStillinger.DataFactoryService.DataFactoryService.GetDefaultPageData(PageReference pageLink, Int32 pageTypeID) in C:\Programmering\RemotePublishTest\RemotePublishTest\Web References\DataFactoryService\Reference.cs:150
RemotePublishForLedigeStillinger.Program.PublishPageToRemoteService(PageData pageLedigeStillingerOriginal) in C:\Programmering\RemotePublishTest\RemotePublishTest\Program.cs:143
EPiServer.Templates.RelatePlus.Pages.JobAd.RemotePublishPage(PageData pageToPublish) in C:\Repo\Projects\dikt.intranett\www\Templates\RelatePlus\Pages\JobAd.aspx.cs:125
EPiServer.Templates.RelatePlus.Pages.JobAd.Godkjent_OnClick(Object sender, EventArgs e) in C:\Repo\Projects\dikt.intranett\www\Templates\RelatePlus\Pages\JobAd.aspx.cs:110
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
[1]: http://stackoverflow.com/questions/12674071/asmx-web-service-call-the-request-failed-with-http-status-401-unauthorized/12674152#comment17103554_12674152
The webservice can be browsed on its webservice-URL [/WebServices/DataFactoryService.asmx ]
Try for solution:
I have given the user that is calling the web-service (dr-2\epi.admin) rights to execute the web service. [under the Admin-mode of Episerver; config; security]
Some of my current code in web.config: