ASP.NET 3.5 / IIS 6 Output Garbled / Corrupt - asp.net

I have inherited a web application and when trying when trying to put it on the same server on a different IP and IIS site I get a page full of stuff like this in all browsers. (not sure how the server here will output this but it is basically the same as if you were to open a binary in a text editor or bad character encoding).
���r#ə6��{��Ί��&��6�K�MЀh��"Pd�AP;�RN�K9�r��<ϛ���!��GZ�4��J�z�����R'���i�j�uZLe�V`=��&��T!e]rGVx#d��N���V���w>���pc�hw��B>��^�|L�]��3�~-��g��n��n�i�>Z� �ٲ������z_�����U�,i��2��\�+���F��FB���m��r�7�v��7�}�U�N�o�G�K�o?�w凲��و�����ߓ�x!���_?��V��v�/V��olt˭Z����� >M�kwkh&��j�C3�|̓��=�8��jJ����Uo�~��T7�\w�eW�������u*���f0c��}�.����]o������7���|�;}�&O���N�)[ys��+Q��o�T�~����F����c���έm��.�Q�ů�2#P���i�ˠ�~g��u�<| $ۭ>zZ/e��'�;R�'���v�ˠ�����
I've copied the same build and all its files to the site running under another IP, used the <globalization> web.config tag and set all encoding to UTF-8 and for the hell of it I even tried setting it to ASCII.
The application, although written for users in only US cities does make use of localization resource files for Russian and Romanian since it had been outsourced to developers there. I guess they did so to make things easier on developers who may have been less fluent in english, who knows.
Besides using the exact same copy running in production and changing web.config encoding settings I have found it runs fine on my IIS 7/Windows 7 workstation, tried throwing a uncompiled copy up there with .cs files and all, wrote a simple ASPX page that performed a response.write (which came out fine).
So as you can see I am pretty much at a roadblock and decided to ask the fine professional community we have here. Any input you may have on this matter would be highly appreciated.

I fixed it by exporting the IIS settings for the production system that it worked fine on and created a new IIS site from that file. Sadly I could see no difference between the 2 before I did this but if you run into this issue then here is another thing you can add to your list of troubleshooting tasks.

It's probably a long shot based on your description, but from a little Internet digging, a couple of forum posters have mentioned bad NICs corrupting packets. You did say you had the app on a different IP on the server -- does your server have more than 1 NIC?

Related

How send redirects whithout the extension file on asp.net

Right now I'm working in a software developed by another programmer who it's no longer part of the project anymore, he send the complete source code of the project.
The thing is, that in some points he make calls to asp pages whithout the extension '.aspx', and this work perfectly fine on the server (Virutal Machine on AWS with Windows Server 2019 and IIS 10), but on my local machine, it gaves me an 404 error, everytime that finds this kind of redirects whithout the properly extension.
Login1.DestinationPageUrl = "./CPersonalRegister" <--- this works perfectly fine on the server, but not on my local machine.
I dont know what other configuration i could search for, or if it's somethind wrong with the IIS.
The used .net framework is 4.0
Most sites (at lest for a very long time) have what is called Friendly URL's turned on.
This means that URL's look a lot nicer, and you don't have to include the .aspx extension for each page you navigate to.
Probably the most easy way to setup this to to nuget the package "friendly" url's.
This one - even for a asp.net webforms site should work:
So, starting from vs2010, "friendly" URLS should have been installed for your given project.
but, give the above a try. (make a backup copy before you do this, since it sounds like you not heard of this "basic" and "often" used feature of asp.net sites for the last 13+ years).
There is also a step by step floating around on how you can add the bits and parts manually, but nuget package above should do the trick for you.

IIS 7 SQL Server session management: Where can I find COM object dll for asp classic

Basically, I'm following this guide: https://msdn.microsoft.com/en-us/library/aa479313.aspx#converttoaspnet_topic5
which states that there's a download link at the top with example code (including COM modules needed for ASP Classic). However, there's no such link/material. Thus, I'm looking to find these COM modules (dlls) somewhere else. But where?
Any help is greatly appreciated!
PS. I'm running win 2008 server r2, iis 7.5.
Couple minutes of Googling led me to the Japanese version of the article which does contain a download link.
Unfortunately that link no longer works (moved, removed etc) but what it did do was expose the originally file name sessionsample.exe.
http://download.microsoft.com/download/9/8/0/980e634a-f4ba-43a0-9d6d-119ba7e86403/sessionsample.exe
With this information in hand another Google brought up a link on CNet.com to the file.
Code Sample: Session Sharing Between Classic ASP and ASP.NET
WARNING: Be very careful when using CNet to download software only use the download link at the top of the article (see image below) as other links are misleading advertisments that will more then likely lead to spam and/or malware.

DotNetNuke Module keeps converting itself into Application in IIS7

Bit of a weird one. For some reason one of my DNN modules keeps being converted into an Application in IIS7 in my development environment. Meaning when I try to view a page that contains that module it can't find the module correctly. It's ok if I go into IIS and delete the application, then restart the site but is a bit of a pain and am little worried it might do this when uploaded to the live server and disable the whole site.
Anyone encountered anything like this before? Any thoughts?
This is a common problem with my VS templates, though not for everyone, and it doesn't happen all the time. It stems from Visual Studio, so it shouldn't ever be a problem on your production servers, unless you upload source and try to compile there, than it might be an issue.
HuwD,
A good resource might be my module template installation video which gives good information on setting up your development environment and debugging issues (regardless of the template you use). Check out between 1:30 and 5:00 minutes for the environment setup, and after 19 minutes some of the troubleshooting.
A couple common problems I see Visual Studio doing is creating an unwanted virtual directory on the DesktopModules folder and/or creating an unwanted web.config in the module's root.
Another good resource is Dnnhero.com. In the development section there is a series on DNN7 environment and template setup.
You may want to give a try a free module called Users Importer - A bit old but worth a try.
Here is a paid alternative: Bulk User Manager

Convert File System Website to IIS Website

We recently migrated from VS 2008 to VS 2010. The migration went fine, except for our web project. Before, in VS 2008, the site showed up as http://localhost/Website. Now, it appears as C:...\Website. It appears that when we did the migration, VS started to treat it as a file system website.
I've tried removing the existing site and re-adding it as an existing website, but it still displays it as C:...\Website. Is there any way to convert it back to show it as a http://localhost/website, and run through IIS, as opposed to the default ASP.NET Development Server?
Special thanks to John Dundon at Microsoft for helping me resolve the issue. Here's what he said:
Thanks for all the details. This actually sounds like a quirky behavior
in VS that I think I can help you work
around.
I believe the reason it’s remembering
to use the local development server is
because it got stored in the SUO file.
So there are two possible ways to fix
this:
Re-open your solution from source control as an administrator on the
machine with IIS installed and
everything should get downloaded to
its right place
If you close VS, delete the SUO file (note – this will erase some
settings about the state of your
solution but shouldn’t cause any real
data loss), and then re-open the
solution, it should ask you to
re-download that particular web site
and will try to make it an IIS web
site again.
Note however though that since your
virtual directory already exists on
your machine, it’s going to ask you if
you want to use it – I’m assuming you
do, but it will overwrite any files
when it does.
Let me know if this works for you (and
while you technically shouldn’t need
to, it may be a good idea to back up
any work you’ve done in this
enlistment that hasn’t been checked in
prior to trying this).
I followed his advice and removed my SUO file and re-opened the solution. The website was automatically fixed as http://localhost/Website and it also checked out the .SLN file as well, and when I checked it in, it fixed the issue for other developers as well. Hope this solution helps out others as well with this quirky issue.
Look in the project properties, on the Web tab. You'll be able to select whether to use IIS or the development server, and which virtual directory to use.

Replicate IIS setup from one machine to another

Looked for an answer to this and didn't see it.
This is for IIS 6.0 / Windows Server 2003.
I'm working with an extremely large ASP/ASP.NET application and I'm trying to get my development environment to match my team members environment. This process is basically trial and error: get an error, go into IIS, make a change, hope the error is fixed. Ugh. I'm hoping to find a way to replicate a set of IIS directories and their configurations on one machine onto my machine.
I did find a script that will iterate through and give me a list of all virtual directories on a machine. It helped, but not a lot since I still have to go in and set up all those virtual directories (I think there are like 20 of them ballpark). The whole process is complicated by the fact that we're mixing ASP and ASP.NET applications in the same application which spans many solutions and projects. Getting the whole thing up and going seems like way too much work but I've never heard of a real solution to this.
Would Powershell be helpful here?
You should export and import IIS metabase.
These might help:
IIS Settings Replication
IIS Metabase Backup and Restore
Fortunately, in IIS7, ASP.NET config is integrated with IIS config so the job is done by copying Web.config.
Here's Microsofts' documentation for iiscnfg. iiscnfg documentation
When I ran it the first time, I got an error that said "This script does not work with WScript." If that happens to you:
1. Click OK.
2. At the "Would you like to register Cscript as your default host for VBscript?" click Yes.
3. At "Successfully registered Cscript" click OK.
4. Run the command again

Resources