开发者

Recover ASP.NET Project from IIS Deployment

I'm a real newbie for ASP.NET web development, having a background in Java. A friend has an ASP.NET 3.0 deployment running on IIS. He can't find the original project files created in Visual Studio 2008 and has asked me to give him a hand.

Is it possible to recreate the project from the deployment on IIS? I see lots of ASPX and and CS files so in the inetpub[domain]\httpdocs directory.

I don't see the .SLN file. I assume that's what he needs. Would it be a real chore to rebuild? Are there any assets or source files that won't be deployed to ISS that I'd need to recreate?

Th开发者_高级运维anks


Re-creating the soloution/project files is (potentially) a small part of the recovery. Do you see any .aspx.cs or .aspx.vb files on the web server? If not, you'll need to extract the code from the code for each .aspx file from the DDL's in the web site's /bin folder. You can reverse engineer any .Net code quite easyily luckily with reflector, however all comments will be lost.


If you have the aspx and the cs files, you are in business: all you need to do is create a new Web Project in Visual Studio and select "Add Existing Files". You would then select all your aspx pages only and the cs files should get automatically imported for you.

Obviously, as anything, you'd probably have some references missing and what not, but shouldn't be incredibly painful to fix all those issues.


If it's a compiled web application project the code will be in a compiled assembly in the bin folder. This can be decompiled with .NET reflector. The source will be readable but not as original.

If it's a website project you're in luck. The code files will be in the website structure (*.aspx.cs or *.aspx.vb). These will constitute pretty much all of the assets you need to recreate the site in Visual Studio. Creating a project and solution file to manage these in VS will be the easy bit.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜