这是预编译工具生成的标记文件,不应被删除!
发布到服务器上之后出现如下乱码错误。
杩棰璇伐风版浠讹涓琚!
经百度查询翻译乱码是如下错误。
这是预编译工具生成的标记文件,不应被删除!
用的万网M3型空间,.NET版本是 .NET Framework V2.0/V3.0/V3.5
以下是web.config
- C# code
<?xml version="1.0"?><configuration> <configSections> <section name="ReplaceUrl" type="URLRewriter.Config.UrlsSection, URLRewriter"/> <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/> <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> </sectionGroup> </sectionGroup> </sectionGroup> </configSections> <ReplaceUrl> <urls> <add virtualUrl="~/index.html" destinationUrl="~/index.aspx"/> <add virtualUrl="~/page/html/company.html" destinationUrl="~/page/html/company.aspx"/> <add virtualUrl="~/page/html/company(.+)\.html" destinationUrl="~/page/html/company.aspx?id=$1"/> <add virtualUrl="~/page/html/HR.html" destinationUrl="~/page/html/HR.aspx"/> <add virtualUrl="~/page/html/HR(.+)\.html" destinationUrl="~/page/html/HR.aspx?id=$1"/> <add virtualUrl="~/page/html/contact.html" destinationUrl="~/page/html/contact.aspx"/> <add virtualUrl="~/page/html/guestbook.html" destinationUrl="~/page/html/guestbook.aspx"/> <add virtualUrl="~/news/class/newslist.html" destinationUrl="~/news/class/newslist.aspx"/> <add virtualUrl="~/news/class/newslist(.+)\.html" destinationUrl="~/news/class/newslist.aspx?id=$1"/> <add virtualUrl="~/news/class/newscontent(.+)\.html" destinationUrl="~/news/class/newscontent.aspx?id=$1"/> <add virtualUrl="~/news/class/SolutionsList(.+)\.html" destinationUrl="~/news/class/SolutionsList.aspx?id=$1"/> <add virtualUrl="~/news/class/SolutionsContent(.+)\.html" destinationUrl="~/news/class/SolutionsContent.aspx?id=$1"/> </urls> </ReplaceUrl> <appSettings> <add key="conn" value="~/App_Data/access.mdb"/> </appSettings> <connectionStrings> <add name="AccessConnStr1" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" providerName="System.Data.OleDb" /> <add name="ConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\access.mdb;Persist Security Info=True" providerName="System.Data.OleDb" /> </connectionStrings> <system.web> <customErrors mode="Off"/> <compilation debug="true"> </compilation> <httpModules> <add type="URLRewriter.RewriterModule, URLRewriter" name="RewriterModule"/> <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> </httpModules> </system.web> </configuration>
[解决办法]
asp.net网站的运行机制,当有网站上的任何一个aspx、ascx文件被修改,就会导致整个网站的重新编译,如果网站的页面数量很多,而且编译的时候正好赶上有大量的用户访问,那个这个更新是很致命的。
asp.net 2.0提供了一个新的机制,叫做部署预编译(Precompilation deployment),其实说白了,就是把asp.net网站编译好了,再发布出去,比如app_code和resource什么的,都会被预编译成dll文件,既然已经被编译好了,当然就不涉及到第一次访问比较慢的过程了。
这个部署预编译功能,还有一个比较强大的地方,就是在知识产权保护方面,为什么这样说呢,因为他会把所有的aspx、ascx和cs文件,都编译到dll文件里面,也就是说用户就算进去了服务器,有权限在本地浏览网站目录,也是看不到源代码的。所有的网页文件中,只有一句话,“这是预编译工具生成的标记文件,不应被删除!”。
网上找的 仅供参考