简体   繁体   English

asp.net网站发布/部署

[英]asp.net website publishing / deploying

How do I publish/deploy an asp.net website to a live server (like a goDaddy server)? 如何将asp.net网站发布/部署到实时服务器(如goDaddy服务器)? I moved all the files to the remote server without dataaccess layer and business layer. 我将所有文件移动到没有数据访问层和业务层的远程服务器上。 Move dlls to bin folder on live server. 将dll移动到实时服务器上的bin文件夹。 But when I try to browse website it gives errors like: 但是,当我尝试浏览网站时,出现如下错误:

Could not load file or assembly 'BusLayer' or one of its dependencies. 无法加载文件或程序集“ BusLayer”或其依赖项之一。 This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. 该程序集是由比当前加载的运行时新的运行时构建的,无法加载。

Description: An unhandled exception occurred during the execution of the current web request. 说明:执行当前Web请求期间发生未处理的异常。 Please review the stack trace for more information about the error and where it originated in the code. 请查看堆栈跟踪,以获取有关错误及其在代码中起源的更多信息。 Exception Details: System.BadImageFormatException: Could not load file or assembly 'BusLayer' or one of its dependencies. 异常详细信息:System.BadImageFormatException:无法加载文件或程序集“ BusLayer”或其依赖项之一。 This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. 该程序集是由比当前加载的运行时新的运行时构建的,无法加载。

Please help me handle these errors. 请帮助我处理这些错误。 I am not very good at English; 我的英语不太好。 maybe there are a lot of mistakes in my question. 也许我的问题有很多错误。 Thanks in advance for help. 在此先感谢您的帮助。

I assume Bus layer means business layer. 我认为总线层意味着业务层。 I believe that your presentation layer has some dependencies on the business layer. 我相信您的表示层在业务层上有一些依赖性。 Now since you didn't push the business layer to production (remote server), its looking for a file and not finding it and hence the error. 现在,由于您没有将业务层推向生产环境(远程服务器),因此它正在寻找文件而没有找到文件,从而导致错误。

the fix i guess will be to move all your files to remote server and try browsing files that doesn't have database dependencies (Again, assuming you don't have a database at production) 我猜想的解决方法是将所有文件移动到远程服务器,然后尝试浏览不具有数据库依赖性的文件(同样,假设您在生产中没有数据库)

"This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded." “此程序集由比当前加载的运行时新的运行时构建,无法加载。” usually means that you have a .NET version issue. 通常表示您有.NET版本问题。 Is the BusLayer assembly on the server compiled under a newer version that the web site? 服务器上的BusLayer程序集是否在该网站的较新版本下编译?

Also, does the app run locally? 另外,该应用是否在本地运行? If so, publish all the contents of your local BIN. 如果是这样,请发布本地BIN的所有内容。

I hope you made a backup of your site prior to deployment. 我希望您在部署之前备份了站点。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM