PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
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 ?
Started by Peter DEWACHTERE, Dec., 10 2018 4:54 PM - No answer
Connect yourself…
Peter DEWACHTERE
#1
Registered member
1 message
Posted on December, 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
Report
0
0
→ Go back to WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text