locked
Editing remote website locally RRS feed

  • Question

  • User-650818078 posted

    Hi,

    I am new in .net framework, I am trying to edit a remote asp.net website locally on my computer. I am using visual studio, the application was build in Dreamweaver.  I have copied the application from the remote server. I am not sure what I need to do before editing the application and to be able to run the application locally without connecting to the production server. I tried viewing the files on design mode but some of the pages are not visible. I will appreciate your help. thanks

    Tuesday, September 12, 2017 5:15 PM

Answers

  • User-2010311731 posted

    In that case, what I would do is try creating a blank ASP.Net Website with the name you want.  Close Visual Studio, and copy the site to wherever you created the site in VS.  Open your website in VS and you should see the files.  Try an F5 to build and see if you get any errors.

    If this is a Web Application instead of a Web Site, then I suggest you create a blank Web application.  In Solution Explorer, right-click the project, and select Add Existing, then go out an find your files and add them.  This will copy them to your new application for you.  You may have to add each folder manually and then add the files in each folder manually as well.

    To tell if the original is a Web Site or a Web Application, you can usually tell if the ASPX and ASCX files also include a filename.aspx.designer.cs file.

    Matt

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 12, 2017 9:37 PM

All replies

  • User-2010311731 posted

    It sounds like the site you copied from is already pre-compiled.  If you have ASPX pages that are blank, that is usually the case.  This means the application was compiled into DLLs which you will usually find in the Bin folder.

    If you can find the source code, that will make life much simpler.  This is often stored either in a local hard drive, file system, or a source control program like Visual Studio Online (Team Foundation Server) or GIT.

    If you can't find the source code, you are left with decompiling the DLLs.  This is messy because it is translating from machine language back to something like C# or VB.  All of the original variable names, formatting, and comments go away.  The only decompiler I have used is http://www.telerik.com/products/decompiler.aspx which has a free trial, but you have to purchase the license.  I know there are other free ones out there, but I haven't used them.

    Matt

    Tuesday, September 12, 2017 5:44 PM
  • User-650818078 posted

    I can open all ASPX source code in visual studio, I can see the content of some of the files in design mode, the rest are only showing background color for the main website. if I run the application it seems like it connects to remote server. I want to be able to run it on a local server for development purpose. not sure what to do exactly. if you still think it's because it's pre-compiled then I will look at a way to decompile the DLLs. Thanks

    Tuesday, September 12, 2017 9:00 PM
  • User-2010311731 posted

    Do any of the ASPX or ASCX files have a .CS or .VB extension?  If not, then it is pre-compiled.

    Tuesday, September 12, 2017 9:02 PM
  • User-650818078 posted

    yes there is ASPX files and .CS files. the main aspx files are connecting to the .cs file extention. the aspx files contains all the html and ajax files and the .CS contain all the C# code that control the backend. I can see and read the source code.

    Tuesday, September 12, 2017 9:16 PM
  • User-2010311731 posted

    In that case, what I would do is try creating a blank ASP.Net Website with the name you want.  Close Visual Studio, and copy the site to wherever you created the site in VS.  Open your website in VS and you should see the files.  Try an F5 to build and see if you get any errors.

    If this is a Web Application instead of a Web Site, then I suggest you create a blank Web application.  In Solution Explorer, right-click the project, and select Add Existing, then go out an find your files and add them.  This will copy them to your new application for you.  You may have to add each folder manually and then add the files in each folder manually as well.

    To tell if the original is a Web Site or a Web Application, you can usually tell if the ASPX and ASCX files also include a filename.aspx.designer.cs file.

    Matt

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 12, 2017 9:37 PM
  • User-650818078 posted

    Thank you very much that works, but I am having a little glitch, when I run the application in visual studio it connect the main site to production site url, I don't want that because I need to edit the site on development mode, I want the url to show something like localhost instead of the main page url. I am thinking that I might have to change something in web.config file but not sure what. any insight please. Thank you

    Tuesday, October 3, 2017 5:00 AM