FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
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 ?
Débuté par Peter DEWACHTERE, 10 déc. 2018 16:54 - Aucune réponse
Connectez-vous…
Peter DEWACHTERE
#1
Membre enregistré
1 message
Posté le 10 décembre 2018 - 16:54
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
Signaler
0
0
→ Revenir à WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte