IIS7 出现奇怪的字符而不是网站
我使用 II7 asp.net 4 MS SQL 2008 C#,我在服务器上发布我的网站。
我预构建了我的网站,但在服务器上上传文件后网站未正确显示。
没有显示错误,我只能看到这个页面(附图),如果我从服务器本地浏览我的页面,浏览器不会显示该页面,而是让我下载它。
我想我的 IIS7 设置有问题...有什么想法吗?感谢您抽出时间
I use II7 asp.net 4 MS SQL 2008 C#, I'm publishing my site on the server.
I Pre Build my site and after Uploading the files on the server website is not appearing properly.
No errors are displayed, I can see only this page (image attached), if I browser my page locally from the server, browser does not display the page but instead let me DOWNLOAD IT.
I suppose smt wrong with my IIS7 Settings... any ideas? Thanks for your time
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于这个问题有一些有趣的尝试。我还认识到有一个与代码页翻译相关的类似内容(似乎是基于字符)。不过,在这种情况下,这似乎是压缩问题。
Web 服务器具有处理/管理压缩的设置,但也可以在 ASP.NET 项目内覆盖此行为。即在 Global.asax 中或者如果您选择覆盖 ActionFilterAttribute / ActionExecutingContext 对象。
试试这个,
在您的代码库和/或相关二进制文件中搜索如下字符串。
它们中的大多数可能属于相同的地方/方法,但是使用不同的 gzip 工具并以不同的方式实现(因此提出了几个建议的关键字)。
尝试注释掉这些行,看看问题是否仍然存在。如果问题得到解决,那么您必须查明是否需要这种手动编码的 gzip 处理和/或为什么/何时出现显示页面的问题。这意味着解决问题也会将页面移回到正确的视图。
问题可能很简单,因为您有服务器错误,因此无法使用此代码中给出的规则显示服务器错误页面。让我们在事件查看器中仔细检查 ASP.NET 错误的问题。
There is some interesting attempts to this issue. I also recognize there is a similiar (appear to be, based on the characters) which are related to codepage translations. Though, in this case, it appear to be a problem with compression.
The webserver have settings to handle/manage compression, but also there are possible to override this behavior inside the asp.net project. I.e. in Global.asax or if you shoose to override the ActionFilterAttribute / ActionExecutingContext object.
Try this,
Search your codebase and/or related binaries for strings such those below.
Most of them probably belong to same place/methods, but there are different gzip tools used and implemented on different way (hence the several proposed keywords).
Try comment out the lines and see if the issue still remain. If the problem is solved, then you have to find out if this hand-coded gzip handling is needed and/or why/when there is a problem with showing your page. Which mean that fixing the problem also move the page back to a correct view.
The problem can be simple as that you have a server error, so the server error page can't be shown with the rules given in this code. Let doublecheck the issue with the ASP.NET errors in Event Viewer.