Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I deleted my web.config, how to recreate?

Tags:

asp.net

Is there a simple way to recreate my accidently deleted web.config file from Visual Studio?

like image 434
Sophie88 Avatar asked Jan 27 '10 15:01

Sophie88


People also ask

How do I recreate a web config file?

If you just recently created the project, you could just create a new project, copy the file into your original project folder, then open it and perform a search and replace to ensure the namespace and other project-specific info correspond to your original project.

What happens if web config file is deleted?

If you remove the web. config file the website will still work. when you press F5 it will prompt you for the web.

Can I delete web config?

basically web. config, unlike any other file, can be deleted..

Is Web config necessary?

Yes, we can run an Asp.Net web application without web. config file but without in debugging mode. If we don't configure any settings in web. config file then it consider machine.


1 Answers

You'll lose all your custom settings, but...

Right Click on your Project -> Add Item... -> Select 'Web Configuration File' (name it web.config)

In the future, you might want to use some form of Source Control (Git would be good for a single developer that doesn't want to worry about setting up a Source Control server).

like image 51
Justin Niessner Avatar answered Sep 25 '22 23:09

Justin Niessner