I have been receiving this error in my web config. can anyone help me with this all the suggestion that i have find does not help me.
The error gives me
Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: The connection name 'DNSConnectionString' was not found in the applications configuration or the connection string is empty.
Source Error:
Line 66: <clear />
Line 67: <remove name="AspNetSqlRoleProvider" />
Line 68: <add connectionStringName="DNSConnectionString" applicationName="/" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Line 69: </providers>
Line 70: </roleManager>
Source File: D:\My Digital Dashboard and Mini Programs\_Source Codes\DNSold2\InvoiceWebSite\web.config Line: 68
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3062.0
I have added my connection string on the IIS as per system requirements, i must not put it on the web.config file.
is there a way how can i solved this error just using my IIS config for connection string.
As far as I know, multiple IIS management console setting will also modify the web application's web config.
For exmaple,. you could modify the url rewrite setting in the IIS manager console.
If you apply the setting, you could find the url rewirte rule has already added into the web application's web config.
So I suggest you could direclty open the web.config file in the web application and modify the connection string tag.
If you want to add the connection string in the IIS manager console, I suggest you could open the IIS manager console and find the connection string setting and add the DNSConnectionString with the database connection string.
Best Regards,
Brando
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Member
16 Points
63 Posts
The connection name 'ConnectionString' was not found in the applications configuration or the con...
Jul 16, 2018 01:29 AM|ryoka012|LINK
Hi experts,
I have been receiving this error in my web config. can anyone help me with this all the suggestion that i have find does not help me.
The error gives me
Star
8119 Points
2778 Posts
Re: The connection name 'ConnectionString' was not found in the applications configuration or the...
Jul 16, 2018 04:45 AM|vahid bakkhi|LINK
hi
your connection name must be inside connectionStrings Tag
your config file must be below like :
Please MARK AS ANSWER if suggestion helps.
Member
16 Points
63 Posts
Re: The connection name 'ConnectionString' was not found in the applications configuration or the...
Jul 16, 2018 05:06 AM|ryoka012|LINK
Hi vahid,
Thanks for your reply,
I have added my connection string on the IIS as per system requirements, i must not put it on the web.config file.
is there a way how can i solved this error just using my IIS config for connection string.
Thanks and Best Regards.
Star
8119 Points
2778 Posts
Re: The connection name 'ConnectionString' was not found in the applications configuration or the...
Jul 16, 2018 05:10 AM|vahid bakkhi|LINK
you can put your connection String on your IIS with an Encrypt password, it's safe
Please MARK AS ANSWER if suggestion helps.
Star
8119 Points
2778 Posts
Re: The connection name 'ConnectionString' was not found in the applications configuration or the...
Jul 16, 2018 05:20 AM|vahid bakkhi|LINK
also, you can don't put it in web config, you can set it in your code
web config
code
please follow below links:
https://forums.asp.net/t/1670316.aspx?How+to+get+connectionstringname+property+of+membership+in+c+code+behind+
https://forums.asp.net/t/1160276.aspx?reading+the+membership+section+in+web+config
https://stackoverflow.com/questions/16903988/membershipprovider-change-connection-string-in-code
Please MARK AS ANSWER if suggestion helps.
All-Star
54508 Points
14111 Posts
Re: The connection name 'ConnectionString' was not found in the applications configuration or the...
Jul 16, 2018 08:31 AM|mudassarkhan|LINK
The correct process is to encryot connection string and decrypt in code as shown in my article
https://www.aspsnippets.com/Articles/Encrypt-and-Decrypt-Connection-Strings-in-WebConfig-file-in-ASPNet.aspx
Blog: ASPSnippets | Forum: ASPForums | Company: Excelasoft
Star
9831 Points
3120 Posts
Re: The connection name 'ConnectionString' was not found in the applications configuration or the...
Jul 18, 2018 01:52 AM|Brando ZWZ|LINK
Hi ryoka012,
As far as I know, multiple IIS management console setting will also modify the web application's web config.
For exmaple,. you could modify the url rewrite setting in the IIS manager console.
If you apply the setting, you could find the url rewirte rule has already added into the web application's web config.
So I suggest you could direclty open the web.config file in the web application and modify the connection string tag.
If you want to add the connection string in the IIS manager console, I suggest you could open the IIS manager console and find the connection string setting and add the DNSConnectionString with the database connection string.
Best Regards,
Brando