GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEV
,
WEBDEV
e
WINDEV Mobile
Inicio
|
Mensagens recentes
|
Conecte-se...
|
Disconnect
|
Português
Inicio
→
WINDEV 2024
→
How to tell Windev 23 REST webservice to use a custom web.config instead of the machine.config ?
How to tell Windev 23 REST webservice to use a custom web.config instead of the machine.config ?
Iniciado por Peter DEWACHTERE, dez., 10 2018 4:54 PM - Sem resposta
Conecte-se…
Peter DEWACHTERE
#1
Membro registado
1 mensagem
Publicado em dezembro, 10 2018 - 4:54 PM
I have this REST webservice (wd23) deployed on a IIS7.5 webserver.
I added the System.Web.Security assembly of the .Net framework to be able to call the ChangePassword method on the MembershipUser class.
So I create this object:
user is "System.Web.Security.MembershipUser" dynamic
and I call this method:
bRes is boolean = user.ChangePassword(sOldPassword,sNewPassword)
This works fine in production as long as I define the membership/rolemanager providers and its connectionstring in the machine.config of the server.
This is the part of the machine.config I added:
<connectionStrings>
<add name="MySecurityDB" connectionString="..." providerName="System.Data.SqlClient"
</connectionStrings>
<membership defaultProvider="MyMembershipProvider">
<providers>
<add
name="MyMembershipProvider"
connectionStringName="MySecurityDB"
applicationName="Website"
...
type="System.Web.Security.SqlMembershipProvider" />
<add
name="AspNetSqlMembershipProvider"
connectionStringName="LocalSqlServer"
applicationName="/"
...
type="System.Web.Security.SqlMembershipProvider" />
</providers>
</membership>
<roleManager defaultProvider="MyRoleProvider">
<providers>
<add
name="MyRoleProvider"
connectionStringName="MySecurityDB"
applicationName="Website"
type="System.Web.Security.SqlRoleProvider" />
<add
name="AspNetSqlRoleProvider"
connectionStringName="LocalSqlServer"
applicationName="/"
type="System.Web.Security.SqlRoleProvider" />
</providers>
</roleManager>
The normal way of overriding the machine.config is to put a local web.config in the rootfolder.
So if I don't add it to the machine.config but to a web.config in the root of the webservice, these settings are not picked up by the windev webservice. It seems the webservice can't find the custom web.config. I can view in my log that the webservice uses the 'default membership settings' and default 'LocalSqlServer' connectionstring of the machine.config instead.
Any ideas on how to solve this ?
gr, Peter
Denunciar
0
0
→ Voltar para WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versões anteriores)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Tipo de Pesquisa
Apenas tópicos
Todas as mensagens
Período de pesquisa
Qualquer momento
Última hora
Últimas 24 horas
Semana passada
Mês passado
Ano passado
Cancelar
Pré-visualização da sua mensagem
Adicionar imagem
Importar uma imagem de uma URL
Enviar uma imagem a partir do seu disco
Deixe um ficheiro ou clique em "Procurar ..."
ou
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto