none
C# Execution Errors on code built with VS 2013

    Question

  • We have code that builds and executes just fine with VS 2010.   When migrated to VS 2013 the migrate is fairly clean with just minor warnings.  The code builds just fine on VS 2013.  It is just at execution there a set of problems that make the code built in the VS 2013 environment unuseable.  From within global.asax a reponse.redirect won't even display a brand new test.aspx that does nothing other than display a simple comment.  Their are problems with Identity code, etc.

    Is there a check list I could use of some kind that someone could point me to as to what I need to do to the solution to resolve problems like this with the execution?

    Thanks,

    Karl

    Sunday, March 06, 2016 4:16 PM

All replies

  • Hi Karl,

    Please provide some screenshots and detailed errors when execute your project to help us understanding your problem.

    There has a Visual Studio 2012 between VS2010 and VS2013. I suggest you migrated from VS2010 to VS2012, and then migrated to VS2013, which can make sure the project migrated step by step.

    If you don't want migrated through VS2012, please create a new project with Visual Studio 2013. Then move the original files to the new project one by one. It can help us confirm which file causes this issue.

    In addition, please check all packages and extensions in your project. You need to upgrade them to let them correspond to Visual Studio 2013.

    Best Regards,
    Weiwei

    Monday, March 07, 2016 9:12 AM
    Moderator
  • I can't provide screen shots. I can't work with VS 2010 or anything before VS 2013 because of authorized software requirements.  

    I would still like input on the check list idea.

    The upgrade of packages is not an easy task.   For example NHibernate has been restructured and will require a rewrite of code.

    Thursday, March 10, 2016 2:18 PM
  • Hi Karl,

    >>From within global.asax a reponse.redirect won't even display a brand new test.aspx that does nothing other than display a simple comment.  Their are problems with Identity code, etc.

    Is it the web project?

    Before we merge the old VS version project to the high version, we would think about the VS Compatibility:

    https://msdn.microsoft.com/en-us/library/hh266747(v=vs.120).aspx

    And make sure that the VS2013 really supports this kind of projects.

    So please install the sp1 for VS2010, update 5 for VS2013 before you really merge this project, check it again.

    Actually you know that this forum is to discuss the VS IDE usage, if the project merged successfully, but it has some compiled error or warnings under the Output or Error list window, you would resolve them one by one, since the real issue would be not the VS IDE issue, it would be related to the project code, the reason why I want to know the real project type is that if just the specific web project has this issue, I suggest you post this issue to the ASP.NET forum:http://forums.asp.net. If then, you could get an answer more quickly and professional.

    You could share a simple sample or the main code in your new thread, I think you would get better response from the ASP.NET members.

    You could also add breakpoints in your project, and then really debug it, so we could know that whether it is related the specific line.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, March 11, 2016 8:53 AM
    Moderator
  • Thanks! I reviewed the link provided.  I don't see any information in the link that sheds any light on the situation.   The project meets the VS 2013 requirements from the link supplied. The code converts easily with just minor warnings.   It is the execution environment that has troubles.

    I need information on potential problems with the execution environment of the VS 2013 built code.

    The solution has 3 projects.   One is strictly database related items that are there for reference.   The database project does not get built - it does not need to be built. One project is a Core project that strictly contains class code that supports the main WebUI project which is an ASP.Net project.  The core project and the ASP.Net code project get built.

    I have to make several changes to the project settings to allow both projects to build from the menu rather than to build the Core project first then the WebUI ASP.Net project.   Visual Studio 2013 is not doing a good job of keeping the settings of the projects through the conversion.

    Also, I question the IIS Express environment.. PF4 has to be used against the ASP.Net project to set Integrated security to enabled and to turn off Anonymous Security.

    The execution environment gets errors not being able to add files to the ASP.Net Temporary directory, C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files and trying to read or write to the Registry.   This looks like it is the IIS Express execution failing a bit.   I don't necessarily think this is the cause of the next set of problems but it could be.  This  abend is an abort of a system thread in  Windows Core code.  The abort is in a simple redirect to the text.aspx from global.aspx like noted before just after entry into the code.   The text.aspx is simply set to write a comment to the screen - nothing else.  Yes, I have set break points and the code blows up at the point of wanting to display the nearly empty test.aspx.

    I don't have Admin authority on my workstation at work so I don't have the ability to change the permissions of the ASP.Net temporary directory.  I may in a few days or a week or two.

    There are a bunch of old Nuget packages that I start with but I have replaced most with newer levels like changeing from NHibernate 1.0.0.0 to a 4.x level with appropriate replacement of the old Expression subclass.   Personally I don't see the Nuget packages being the problem since I am trying to just get a simple aspx page to display for now. I would think none of the Nuget packages would come into play.   The configuration as is worked fine on VS 2010 which I don't have use of.   I only have use of VS 2013.

    Tuesday, March 15, 2016 2:32 AM
  • Hi Karl,

    Do yo have try create a new project and move the original project files to the new project one by one to confirm which file causes this issue?

    >>The execution environment gets errors not being able to add files to the ASP.Net Temporary directory, C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files and trying to read or write to the Registry.  

    According to the error, there may be caused by the permission of ASP.NET Temporary directory. Please try assign write permission to ASP.NET Temporary folder with below article's gudiance.

    https://msdn.microsoft.com/en-us/library/aa545633(v=cs.70).aspx

    If possible, please provide a sample proejct to help us reproduce your problem in our side, which can help us find out what the real reason for this problem.

    Best Regards,
    Weiwei

    Tuesday, March 15, 2016 3:34 AM
    Moderator
  • I have discovered that just the loading of this old code and other old code we have is corrupting the larger Visual environment. This is an internal writeup on the issue:

    In working with Visual Studio 2013 and opening two applications at the same time I have discovered that the Older Change Management code being pulled into Visual Studio looks like it is corrupting the Visual Studio executable environment.  This old code is just being loaded into Visual Studio.  It is not being executed.

    In other words if I open Pay Calendar from the Start Menu by opening Visual Studio 2013 and then Open the New Change Management code via another open of Visual Studio  2013 from the start menu all works fine.   I can run the New Change Management code via Internet Explorer just fine.  And I can also run the Pay Calendar code and that runs just fine.  But just the inclusion of the Older Change Management code in a larger Visual Studio environment corrupts the execution of a totally separate Solution.

    If I combine the Old Change Management code and say the new Change Management code in the same way as above the new Change Management code will not work.   

    I will be looking to see if I can find anything on this problem given the added information about the problem and plan to probably open a ticket with Microsoft about the problem.

    If anyone has any insights into the old code and the corruption of the Visual Studio environment please reply to this added note.  My new version of our code is getting close to being completed and works fine but we have other larger solutions with the same problem. 

    Karl

    Thursday, April 14, 2016 2:48 PM