C# and IIS - SSL dropping connections, fine over HTTP - asp.net

In a testing environment, I self-signed a cert and installed it on a web site in IIS 6. This is using .NET 2.0. Cert seems fine (minus the fact that client services don't fully trust it as one would expect). I can do whatever I want to by hitting the site locally from the server on HTTPS or HTTP.
The problem is coming in when accessing this site remotely. If the page has an exception on it, the connection drops. Not return an error, but just flat-out drops, where the browser says it couldn't find the site (this is after it churns for a few seconds, where I can see TCP traffic from the client IP coming in).
The interesting part is that I can create a blank ASPX page, with nothing on it, and it's fine over HTTPS. But the minute I put throw new Exception(); on the page, it goes back to dropping. By the way, it seems to act completely normal if I hit the same page using HTTP instead.
So I'm a bit stuck. Anyone seen something like this?
My first inclination is to go after the proxy/firewall rules between my remote client machine and the server, but I want to make sure it's not something I could fix before I bug other teams.
EDIT ...looks to be a firewall whitelisting problem. Others on my subnet have the same problem, but people in other locations can hit it just fine.

This is not a proxy or firewall issue, because the Yellow Screen Of Death is just text which transmits through any firewall just fine. Here are a couple things that I would try first.
Make sure that the fact that you are using HTTPS isn't the root cause of the problem, such as the problem isn't caused in your program, by handling HTTPS. Such as some special handling of Error code.
Create a new cert and see if the same issues occures.
Try to reproduce this issue on another machine, it could just be a configuration issue.
Try getting a real cert from GoDaddy, they are only 29.99.
That is all that I can come up with right now. One thing that you didn't mention was which version of IIS you were using, which will be helpful.

Have your thrown the exception and then tested the page using regular HTTP? Is the same thing happening, or does it only happen if you throw an exception and access it using HTTPS?

Related

SSL Error for only one website, meanwhile other one is working | ERR_CERT_COMMON_NAME_INVALID

I'm editing two websites for my client. He asked for a HTTPS connection.
While one is working perfectly we have a problem in another one (same IP address, same certificate).
First website throws an error in browser, other one is fine.
I even made a SSL Report by ssllabs.com and I checked the differences, everything should work fine.
Here is a screen from test:
DIFFCHECKER SSL COMPARSION
Client get ERR_CERT_COMMON_NAME_INVALID on both Mozilla Firefox and Chrome as in thread name.
I guess something is wrong with website, but i don't get it at all.
Is there anyone who had similar problem or could look at both and tell me where should I search for problems?
Actually I figured this out.
Client was connecting via www.domain.com while I was connecting via domain.com.
SSL wasn't configured by default to support www before the domain name.
Why first website was working for client and second not? Because he connected to first one via www and he didn't while connecting to another one. And browser remembered that choice.
Always check SSL Wildcards fellas!

Access website using server name instead of www

I am new to IIS, setting up servers and load balancer so please do not mind my ignorance.
I have an old website, say, www.mywebsite.com.
There are 3 IIS 6.1 web servers on which my ASP.NET code is hosted.
Lets call them web01, web02 and web03.
They are identical in configuration like OS, etc.
There is a load balancer which handles the requests coming in from the clients through www and routes it to the respective server based on whatever algorithm is put in place.
However, we were able to send requests directly to individual servers like this web01.mywebsite.com for all 3 servers.
I do not have access to the load balancer.
Recently there were some problems with the web02 server so the client took it out from the load balancer.
We then reinstalled IIS and now, when we are trying to access the server using web02.mywebsite.com, it is throwing 404 - Not Found error.
I am able to open the website from inside the server using www.mywebsite.com and I am able to see that the requests is catered by the web02 server.
However, from inside the server also web02.mywebsite.com is throwing 404 - Not Found error.
I am sure I am missing something in configuration at the IIS level but not able to figure out.
I tried searching on the internet but they all gave me generic solutions.
Please help.
Thanks in advance!
I was able to get this resolved on my own.
Strangely there was not a single answer or comment to this question.
I will try to answer so that others might also benefit.
There were 2 things that were required, out of which 1 was already present in my case:
In the hosts file, the mapping of IP address of the server to the actual name of the server should be present (This was there in my case)
In IIS, under bindings, I removed the host name i.e. www.mywebsite.com.
I was able to figure this through the posts here and here although they did not give the answer directly.
Hope this helps others.

Issue with intranet site

We have a lamp word press intranet site running, however, the first time I load the site it doesn't load and says the page cannot be displayed. When I refresh the site it loads. Is this a problem with our server or dns or what?! We have no proxy and sometimes get this error message as well ERR_CONNECTION_RESET. Any ideas?
I suppose the best way forward is to first figure out which part of the process is failing, browser, computer or web server.
Determine the most likely point of failure
If the fault occurs on more than one computer, and with different browsers then it not likely to be browser or computer issue. Therefore the next step is to look at the webserver.
if it looks like a computer or browser issue
If its only failing on one computer or browser the try flushing your browser cache, if that fails then it could be a network setup issue. You could try setting you computers DNS network settings to point to your internet router and to your web servers IPs.
if it seems like a web server issue
1) Check settings of your network, try setting DNS to router and webserver.
2)If you have a spare computer install fresh webserver and try using new test webserver to see if you get the same problems
and if all else fails get windows PC install WAMP;) or the ultimate solution switch it off and go the pub.

The request failed with HTTP status 400: Bad Request ( The data is invalid. ): Code base Works on one machine but not another

This will probably be an environmental issue but I'm stumped as where to start.
I'm attempting to call a a webservice on an external server in an asp.net web app while debugging in VS2008. The exact same code/project works on one machine calling the server but on another machine (my new one) it fails with the 400 Bad request (data is invalid) error.
Both machines are running Windows 7. What should I be looking for as differences in the two machines that could be contributing to this problem?
Edit Deleting the webreference in the project and re-creating the webreference had no effect
Update
I went to use Fidler2 to inpect the request and response which resulted in the error going away. Things are beginning to point to an internet proxy issue.
It's an Internet Proxy issue. The suspect machine had be configured to manually use a proxy server. Turning this off: Control Panel -> Internet Options -> Connections Tab -> Lan Settings Button, and enabling "Automatically detect settings" has fixed the problem.

Website accessible from everywhere except for client's network

My client has a website that is showing some strange behavior. The site is built in ASP.Net and used to be hosted on their internal network. It's now been moved to a different server outside their network. They have other sites hosted on the same server, some built using DotNetNuke, and some classic ASP. All these sites are hosted on one application server, with a database (SQL Server 2008) on a separate server (which is on the same network as the application server). They share the application server, and the database server.
Now that this site has been moved to the outside server, they can't access it. I can, and so can others that I work with (from different IPs, across the country). But the client can't from their network. They can access the landing page subsite.clientdomain.com (no db access), but nothing else. So, for instance, there's a link to subsite.clientdomain.com/folder. When they click that link, the URL changes to subsite.com/folder, which does not work. For myself and others not at the client site, the URL does not change and opens with no problems.
I didn't write the site, and didn't even know it existed before this problem cropped up, so I know very little more than this. Any help is appreciated.
I'm going to go with Martijn B's answer. There's a DNS issue on the internal network. Somewhere on of the DNS servers is a definition that maps http://companywebsite to an ip address like 192.168.1.20 or whatever.
I would open a command prompt on your PC and type
ping new_website_name.com
Take a look at the IP address that comes back. You can also do an nslookup on new_website_name.com that will give you more information. If you (person A) gets one IP address and Person B (inside the network) gets a different IP address....there is definitely a DNS issue on the internal network.
You're going to have to do some network tracing to determine exactly where any redirection is occurring. Given that the problem is only manifested in certain locations, it is likely that it is a function of network configuration in that location (as previously suggested). Without understanding exactly what redirection is occurring, it would be unwise to make configuration changes that might make the problem worse or introduce new issues.
A DNS server cannot AFAIK redirect to a different URL. So something is redirecting from subsite.clientdomain.com/folder to subsite.com/folder, which could be caused by a HTTP redirect. This can be triggered by the software/website itself or by IIS.

Resources