简体   繁体   English

已发布的asp.net应用中的应用代码

[英]App code in published asp.net app

I published my asp.net app using the basic capability (publish to disk). 我使用基本功能发布了asp.net应用程序(发布到磁盘)。 Now I look at the published content and it contains .cs files. 现在,我看一下已发布的内容,其中包含.cs文件。 Is this correct? 这个对吗? I did right-click 'convert to web application', but the .cs files still appear. 我确实右键单击了“转换为Web应用程序”,但是.cs文件仍然出现。

Apparently your conversion didn't take or your publish went wrong - according to MSDN: 根据MSDN的说法,显然您的转换没​​有完成,或者您的发布出错了:

"The conversion process causes Visual Studio to recursively examine every page, master page, and user control in the project, and to automatically generate a .designer.cs or .designer.vb file for each. Visual Studio also changes the .aspx or .ascx files to use the codeBehind attribute instead of the codeFile attribute. This conversion process also renames the App_Code folder to Old_App_Code. " “转换过程使Visual Studio递归检查项目中的每个页面,母版页和用户控件,并自动为每个页面生成.designer.cs或.designer.vb文件。VisualStudio还会更改.aspx或。 ascx文件使用codeBehind属性而不是codeFile属性。 此转换过程还将App_Code文件夹重命名为Old_App_Code。

See: MSDN Article 请参阅: MSDN文章

So if you see App_Code after conversion - something is screwy and you need to try it again. 因此,如果您在转换后看到App_Code-有点麻烦,则需要再次尝试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 C# Asp.net Css class 在代码后面发布时不起作用 - C# Asp.net Css class in code behind does not work when app is published ASP.NET Core-发布应用程序后无法使用signInManager登录 - ASP.NET Core - Unable to signIn with signInManager when app is published 发布的asp.net Web应用程序和发布的wcf服务无法在IIS中连接 - published asp.net web app and published wcf service not connectiing in IIS 发布到 Azure 的 Asp.Net 应用仅显示“您的应用服务应用已创建” - Asp.Net App published to Azure only shows “Your App Service app has been created” 如果应用程序在 ASP.NET 中关闭,则执行代码 - Execute code if the app closes in ASP.NET 使用VS Code调试ASP.NET 5 App - Debugging ASP.NET 5 App in VS Code 使用Backload上传文件的已发布ASP.NET MVC4应用程序出现异常 - Getting Exception on published ASP.NET MVC4 app using Backload for file upload 发布并通过身份验证后,ASP.NET MVC Web应用程序重定向到localhost - ASP.NET MVC Web app redirecting to localhost after being published and authenticated ASP.NET Core-发布应用程序时找不到具有[Authorize]属性的页面 - ASP.NET Core - Pages with `[Authorize]` attribute cannot be found when app is published ASP.NET MVC 应用程序在调试中工作,但在使用 Plesk 和 GoDaddy 发布时不起作用 - ASP.NET MVC app works in debug but not when published using Plesk and GoDaddy
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM