简体   繁体   中英

IIS7 Strange characters appear instead of a website

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

在此处输入图片说明

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. Ie 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.

ActionExecutingContext
HttpRequestBase 
Headers["Accept-Encoding"];
HttpResponseBase
.AppendHeader("Content-encoding", "gzip");
.Filter
GZipStream
CompressionMode.Compress
DeflateStream

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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