None of my “code behind” code is being called

前端 未结 9 1909
予麋鹿
予麋鹿 2021-02-08 00:40

I have just created an ASP.NET C# project and a virtual directory for it in IIS in (as far as I know) the normal way, but I am seeing very strange behavior that I have never see

9条回答
  •  迷失自我
    2021-02-08 01:03

    I think IIS thinks your project is a 'ASP.NET site' whereas you and/or your VS.NET may think that you actually have a 'ASP.NET Web Application'. Hitting convert to web application on the project within VS.NET and ensuring you have a properly configured (see other comments) virtual directory on project in IIS, everything should work fine.

    Reading your post & comments, I see contradictory comments (unless I am misreading)

    You say:

    1. "Work with the "ASP.NET Web Application" template (vs. ASP.NET Site)".
    2. "I hope this is not the only solution, because I am unable to do this (the customer requires my app to be in a subdirectory - they won't permit any of my code in ~ or ~/bin.)"

    "ASP.NET Web Application" requires compiled dlls when deployed, not the base .cs files.

    Is the root cause conceptual confusion between what you want to use as a dev and what you are allowed to deploy by the customer?

提交回复
热议问题