开发者

I deleted my web.config, how to recreate?

Is there a simple way to recreate my accidently deleted web.confi开发者_JAVA技巧g file from Visual Studio?


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).


I went to the Recycle Bin and luckily was able to restore my Web.config that I accidently deleted.


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.

Of course, you could restore from the backup you remembered to make, right?? ;-)


I'm assuming that you are not using Source control. If you can't restore your item you pretty much can't "recreate" your web.config. The settings you've created in this .config file are now just gone. If you make a new web.config file and your project wasn't very big yet you might be lucky. You might have a web.config local copy available somewhere, try a good search!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜