none
HELP! I didn't know synchronizing files will actually delete them! I'm trying to get aspx files to run on IIS

    Question

  • Hello! Out of all of Microsoft's forum topics, I didn't know which one to put this under, so I tried to get as close as I could..... I have read a number of articles trying to get an ASP.Net application to work in IIS. The one that seemed to fit the configurations I have on my machine are in this article. I edited my permissions so that I could synchronize because before I was getting an error indicating that I couldn't create a folder  'App Data' as access was denied. SO, I went back to the 'Copy Web Site' screen and certain files had a red circle with an x in them (error Icon). When I clicked the syncronize button, almost all of my files got deleted from the main source as opposed to copying over to the wwwroot section like this page suggests. You can see below, that it says all of these files are now deleted....

    Luckily, I had a copy of these files, on a flash drive, and I tried to copy those back to the location where Visual Studio picks up projects from. I tried to open the aspx files from there, but Solution Explorer still didn't recognize those. Here are the files in Windows Explorer:

    At this point, I am afraid to do any more, so please be respectful of that in your response. I have tried to do my research, and paste as much information as I can in here. I am wondering:

    A) Is there any way to get those .aspx files to be recognized again by Solution Explorer,

    B) What I need to do in order to copy these files to the right folder so I can test them in IIS

    C) How in the heck to you COPY files rather than DELETE them in the synchronization? Note that I even tried copying one by one on the left side of the screen, and that seemed to have the effect of deleting rather than copying.

    Your help is appreciated. 

    Thursday, February 04, 2016 8:56 PM

All replies

  • Hi,

    Thanks for posting to our forum.

    It seems that you were deploying a Web Site Project by using the Copy Web Site Tool.

    Please refer to the following document about Deploy a Web Site Project by using the Copy Web Site Tool:

    https://msdn.microsoft.com/en-us/library/c95809c0.aspx

    On the other hand. Since Our forum is discussing about VS general question like how to set/configure Visual Studio and Visual Studio tools.

    http://forums.asp.net/

    For your question. I suggest you’d better post it to the asp.net forum for better support.

    Thanks for your understanding.

    Best Regards,

    Lake Xiao

    Saturday, February 06, 2016 3:48 AM
    Moderator
  • Lake Xiao,

    So, I tried this, and to no avail. No real responses thus far, and I think understandably because this really is more of a Visual Studio problem. I don't understand at all why those files were deleted, and now I am having a heck of a time trying to not lose any further work, and create some code behind files to keep going. Honestly, this is something that really shouldn't be made as hard as Microsoft has made it. 

    I looked through the link you provided me, and while it gave a little understanding to what was happening, it really didn't make too much sense to me why the code behind files were being deleted, or showed up as deleted. I can't find anything that specifically addresses this issue, and I really would prefer not to start all over if I can help it. Also, I don't want to regenerate everything and find out the same exact problem happens in which my code behind gets deleted. I tried to see if I could debug what is left to see if the code logic was still working, and unfortunately it is gone. 

    Any help would be appreciated as this honestly seems to be more of a Deployment (within Visual Studio) issue. Thanks for any help you can give,

    Gen

    Tuesday, February 09, 2016 4:32 AM
  • Hi Gen,

    Please create a new website to check whether the new project also has this issue or just this specific project.

    Then please try add this project file through Add Existing Items to check whether they can be added with this way.

    According to your screenshot, your Visual Studio is version 2008, which has out of lifecycle. Please check whether you have installed Visual Studio 2008 SP2. If not, please download and install from below link.

    http://www.microsoft.com/en-us/download/details.aspx?id=12548

    If still has this issue, I suggest you upgrade your Visual Studio. The Visual Studio Community 2013 and 2015 are free version, you can get them from official site.

    https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx

    Best Regards,
    Weiwei

    Thursday, February 11, 2016 7:28 AM
    Moderator
  • Hi Weiwei,

              I am actually using a quite old version of Visual Studio, only because that was what I paid for, and I don't want to lose functionality, but I really should try some of these newer versions once I have learned what I need to. I also wonder if the IIS and applications that I have developed would have any version issues if I were to continue to work on those in the new version. I assume not, but if there is some process that I would need to be aware of before upgrading, that would be good to know here.

             So I tried a new "TestWeb" application, and without adding any database, I was able to copy all of the code behind. There is one thing that I remember following from the link I mentioned above, and that was in IIS, at one point, I was guided to change the web site to a web application. I am still trying to wrap my head around this whole conversion. Perhaps that is what deleted the files, because I think I looked for the web site in IIS before copying over. Could that be part of the problem?

    To your guidance regarding Visual Studio 2008, I am actually using 2005, which again, I know is old. I tried to search for ways inside of Visual Studio to determine what version information, and updates I have with regard to SQL Server, and the whole nine yards. I tried following this and how to view assembly info but I think all I need is found in this screenshot:

    So, it looks like from this, I have the SP2 under the .Net framework. Is that different than the download you propose? 

    Finally, I was able to recover the files from my recycle bin, and the app seems to work alright, but the problem is all of the code seems to be inline instead of in the Code Behind class files. I searched, and it seems rather difficult to separate them again. Is there no way to simply convert those files back? It would be so much easier to edit in the future. Thanks, and I am still trying to figure out what exactly caused all of these unwanted changes in the first place. 

    Saturday, February 13, 2016 12:20 AM
  • Hi Gen,

    Sorry for the late reply.

    >>So I tried a new "TestWeb" application, and without adding any database, I was able to copy all of the code behind.

    Please also test it with adding a database for the new created web application to check whether the database cause this issue.

    If after adding the database, it works well. In this case, I think the cause is still in your Visual Studio 2005.

    I suggest you could install the VS2005 SP1, the latest update of VS2005. Please refer to the following downloading site:

    http://www.microsoft.com/en-us/download/details.aspx?id=7524

    On the other hand, since it works well in my side in VS2008 sp2. If after installing the latest update of VS2005, it still no help.

    I suggest you could share us the sample of your project so that we could reproduce this issue in our sides then we can troubleshoot it.

    Best Regards,

    Lake Xiao


    Monday, February 15, 2016 7:31 AM
    Moderator
  • My apologies as well,

            I will try this with a database over the next couple of days and get back with you. What would be beneficial to share? The code behind? It is hard to share since I am having difficulty retrieving those files within Visual Studio. It seems that there are so many configuration options between production and deployment that I am reading about, and I am puzzled about what happened to those files. The best understanding I have is somehow the logic was stored in one of the .dll files, but that doesn't seem to be running right now, and doesn't lend itself nicely to modifications that I might want to make down the line. I will look into the software updates as well. Thank you Lake, and let me know what would be helpful for you to see.

     
    Wednesday, February 24, 2016 5:26 AM
  • Hi Gen,

    >>I am actually using a quite old version of Visual Studio, only because that was what I paid for, and I don't want to lose functionality, but I really should try some of these newer versions once I have learned what I need to.

    VS2005 is an such old version of VS. And we don't support it now. For this function you use. You could follow WeiWei's suggestion to use the Visual Studio Community 2013 and 2015.

    They are all free version and the function is better than VS2005.

    Best Regards,

    Lake Xiao


    Thursday, February 25, 2016 1:38 AM
    Moderator
  • I will download one and see if I can get this working.
    Thursday, February 25, 2016 7:17 AM