asp.net - How to regenerate web.config file? -


i making asp.net mvc project. works fine on localhost after deploying causing many errors related web.config file. deleted web.config file. want application regenerate web.config file. how can achieve that? know there problem web.config file because replaced web.config file of , working don't want take risks prefer file of project only.

i believe have few options here:

  1. you can add web.config file @ time right clicking web project, clicking add new item, , selecting "web configuration file." copy contents of known web.config new file through visual studio.

web configuration file

  1. you can copy web.config deployed project through file system. place web.config in project folder:

project folder

then, click on "show files" button in solution explorer , include new web.config in project right clicking file , selecting "include in project."

include in project

  1. if don't have copy of web.config, can create new web project through visual studio, , copy web.config described in #2. have update settings connection string , assembly bindings.

may suggest using source control in future, if applicable , project. there tons of free options out there vso/team services , github name couple.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -