Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
I have solution with 2 projects and web application.
And my appsettings are added in app.config which is present in one of the project.
And then I published the webapplication.

But when i deploy the published folder in the test server, the appsettings are missing and that need to be added which I read from internet...And when I try to add my appsettings in the web.config(Published Web.config),and run the application, I am getting 500 server Internal error

app.config:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<applicationSettings>
.......
</applicationSettings>
</configuration>

web.config:
<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="error1" type="test, test1, Version=1.0.1.3, Culture=neutral, PublicKeyToken=77d9ae8727c9ec66"/>
    <section name="error2" type="test2,test3, Version=1.0.0.0, Culture=neutral, PublicKeyToken=77d9ae8727c9ec66"/>
  </configSections>

"If i add app setting here I am getting error"
<applicationSettings>
.......
</applicationSettings>
</configuration>


Can you please help me with this?
Posted
Updated 19-Aug-15 11:05am
v2
Comments
virusstorm 19-Aug-15 20:11pm    
What kind of projects are the other two (class library, console, etc.)?
apr1234 20-Aug-15 10:42am    
Class library
virusstorm 20-Aug-15 11:04am    
The easy solution, manually add the configuration settings into the web.config. The hard way, setup build and publish scripts to copy the configuration file into the bin folder of your web application. How to do this greatly depends on your build and deployment process.

1 solution

try
<appsettings></appsettings>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900