I'm doing a console applications that will tell the EpiServer webservice to add a page. My problem is that I can't get the autentication to work. I've created a webservice user in Epi backofice. I can login to the webservice through the browser with my account.
A code sample from the console app is as follows.
var client2 = new ContentChannel.ContentChannelServiceSoapClient();
client2.ClientCredentials.UserName.UserName = "username";
client2.ClientCredentials.UserName.Password = "password";
client2.Open();
client2.ImportPage1(null, "Pagename", null, null, "sv", newGuid, parentGuid, "pagetype");
client2.Close();
The error message I get is
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.ContentChannelService.ValidateWebServiceAccess() at EPiServer.WebServices.ContentChannelService.ImportPage(String channelId, String pageName, String[] propertyKeys, String[] propertyValues, String cultureName, Guid pageId, Guid parentPageId, String pageTypeName) --- End of inner exception stack trace ---
I don't know if I need to show how I've done in the config files but if I should add that, just tell me. If anyone know how to go from here, please answer. Thanks in advance!
EDIT
I get the error with a name, I get the login prompt, not the forms authentication, I can use some webservice-methods, such as
ContentChannel.GetMaxRequestLength()
but I get this error whenever I try to use the webservice properly or call the ValidateWebServiceAccess()
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 andreas